修改监控部分功能

This commit is contained in:
2026-05-09 17:49:46 +08:00
parent 06a5f9707d
commit 52ece8211b
14 changed files with 456 additions and 383 deletions

View File

@@ -0,0 +1,33 @@
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 SamplePreSystem.UI.Converters
{
public class CommunicationColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string str = value.ToString();
if (str.Contains("PLC通信异常"))
{
return new SolidColorBrush(Colors.Red);
}
else
{
return new SolidColorBrush(Colors.Green);
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
}
}