20240301_JSEQ_upperpc/JiangsuEarthquakeNow/JiangsuEarthquake/Common/ConnectConvert.cs
XuMin 3b6c570800 1 经过电控腔测试和升压站测试;
2 解决了后一个通信连接会影响前一个通信连接的问题;
3 测试过程中存在的问题修改;
2024-09-03 16:30:34 +08:00

36 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;
using Brush = System.Windows.Media.Brush;
using Color = System.Windows.Media.Color;
namespace JiangsuEarthquake.Common
{
public class ConnectConvert : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
Brush TxtForeground = null;
if (value.ToString() == "True")
{
TxtForeground = new SolidColorBrush(Color.FromRgb(0, 255, 0));
}
else
{
TxtForeground = new SolidColorBrush(Color.FromRgb(255, 0, 0));
}
return TxtForeground;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}