一些更改
This commit is contained in:
29
CapMachine.Wpf/Converts/BoolFinishStrConvert.cs
Normal file
29
CapMachine.Wpf/Converts/BoolFinishStrConvert.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user