21 lines
580 B
C#
21 lines
580 B
C#
|
|
using System;
|
|||
|
|
using System.Globalization;
|
|||
|
|
using System.Windows.Data;
|
|||
|
|
|
|||
|
|
namespace AciTester.Converters
|
|||
|
|
{
|
|||
|
|
public class BoolToStringConverter : IValueConverter
|
|||
|
|
{
|
|||
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
if (value is bool b)
|
|||
|
|
return b ? "运行" : "停止";
|
|||
|
|
return "未知";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
|
{
|
|||
|
|
throw new NotImplementedException();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|