2024-09-19 10:17:46 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
|
2024-09-30 06:06:43 +00:00
|
|
|
|
namespace FujianEarthquake.Common.ConnectConvert
|
2024-09-19 10:17:46 +00:00
|
|
|
|
{
|
2024-09-30 06:06:43 +00:00
|
|
|
|
public class ConnectConvertServerState : IValueConverter
|
2024-09-19 10:17:46 +00:00
|
|
|
|
{
|
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (value.ToString() == "True")
|
|
|
|
|
|
{
|
2024-09-30 06:06:43 +00:00
|
|
|
|
return "已开启";
|
2024-09-19 10:17:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2024-09-30 06:06:43 +00:00
|
|
|
|
return "未开启";
|
2024-09-19 10:17:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|