30 lines
746 B
C#
30 lines
746 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Data;
|
|
|
|
namespace CapMachine.Wpf.Converts
|
|
{
|
|
/// <summary>
|
|
/// Bool到完成字符串转换
|
|
/// </summary>
|
|
public class BoolFinishStrConvert : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value == null)
|
|
return null;
|
|
|
|
return (bool)value == true ? "完成" : "无";
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
return value;
|
|
}
|
|
}
|
|
}
|