chore: use file-scoped namespace
This commit is contained in:
1 parent
99d2fafb72
commit
bbf1b7d4c6
748 files changed
+57929
-58678
No files matched your search
@@ -2,31 +2,30 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace HandyControl.Tools.Converter
|
||||
namespace HandyControl.Tools.Converter;
|
||||
|
||||
public class Boolean2StringConverter : IValueConverter
|
||||
{
|
||||
public class Boolean2StringConverter : IValueConverter
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
if (value is bool boolValue)
|
||||
{
|
||||
if (value is bool boolValue)
|
||||
if (parameter is string str)
|
||||
{
|
||||
if (parameter is string str)
|
||||
var arr = str.Split(';');
|
||||
if (arr.Length > 1)
|
||||
{
|
||||
var arr = str.Split(';');
|
||||
if (arr.Length > 1)
|
||||
{
|
||||
return boolValue ? arr[1] : arr[0];
|
||||
}
|
||||
return "";
|
||||
return boolValue ? arr[1] : arr[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user