This commit is contained in:
xyy
2026-03-31 20:17:17 +08:00
parent 8bd9226955
commit e14d6de146
18 changed files with 865 additions and 206 deletions

View File

@@ -0,0 +1,19 @@
using System;
using System.Globalization;
using System.Windows.Data;
namespace MembranePoreTester.Converters
{
public class BoolToStringConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (value is bool b && b) ? "开" : "关";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value?.ToString() == "开";
}
}
}