Refactoring.

This commit is contained in:
qianlifeng
2014-12-26 22:51:04 +08:00
parent 50f6044a2f
commit ccc8d7e5cd
27 changed files with 114 additions and 139 deletions

View File

@@ -0,0 +1,26 @@
using System;
using System.Windows.Data;
using System.Windows.Markup;
namespace Wox.Plugin.SystemPlugins.Program
{
public class StringEmptyConverter : MarkupExtension, IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return string.IsNullOrEmpty((string)value) ? parameter : value;
}
public object ConvertBack(
object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException();
}
public override object ProvideValue(IServiceProvider serviceProvider)
{
return this;
}
}
}