Fix suffixes converter, part 1

1. fix #568, fix #566 fix #553, fix #559
2. simple refactoring
This commit is contained in:
bao-qian
2016-04-24 02:51:20 +01:00
parent 0ee3d1160a
commit e3a7d0807e
5 changed files with 50 additions and 9 deletions

View File

@@ -0,0 +1,33 @@
using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Markup;
namespace Wox.Plugin.Program
{
public class SuffixesConvert : MarkupExtension, IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var text = value as string[];
if (text != null)
{
return string.Join("", text);
}
else
{
return string.Empty;
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
public override object ProvideValue(IServiceProvider serviceProvider)
{
return this;
}
}
}