2026-05-10 03:26:38 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace SunlightAggregationTerminal.Converters
|
|
|
|
|
{
|
|
|
|
|
public class StringToBoolConverter : IValueConverter
|
|
|
|
|
{
|
|
|
|
|
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
if (value !=null)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
|
|
|
{
|
2026-06-06 00:29:47 +08:00
|
|
|
// 单向绑定
|
2026-05-10 03:26:38 +08:00
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|