页面显示设备状态逻辑修改
This commit is contained in:
commit
6eae137bd1
15 files changed
+456
-218
No files matched your search
@@ -0,0 +1,43 @@
|
||||
using ScottPlot.TickGenerators.Financial;
|
||||
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 SunlightCentralizedControlManagement_SCCM_.ConvertMoels
|
||||
{
|
||||
internal class StatexmlConvert : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
string Staten = "None";
|
||||
string i = value.ToString();
|
||||
if (i == "101") Staten = "Walk";//运行
|
||||
else if (i == "202") Staten = "RunFast";//运行
|
||||
else if (i == "301") Staten = "Stop";//完成
|
||||
else if (i == "309") Staten = "ErrorOutline";//错误
|
||||
else if (i == "800") Staten = "LinkOff";//未连接
|
||||
else if (i == "801") Staten = "Link";//连接成功
|
||||
else if (i == "899") Staten = "LinkOff";//关闭连接
|
||||
else if (i == "TRUE") Staten = "Lock";//锁
|
||||
|
||||
return Staten;
|
||||
}
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user