20240801_FJEQ_upperpc/FujianEarthquake_seabed_now/FujianEarthquake/Common/ConnectConvert/ConnectConvert.cs
XuMin 78cfbd3709 1 增加岸基站通信数据解析代码;
2 增加岸基站通信数据发送代码;
3 对岸基站通信数据收发代码进行测试,并解决出现的问题;
2024-09-30 14:06:43 +08:00

34 lines
961 B
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;
namespace FujianEarthquake.Common.ConnectConvert
{
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();
}
}
}