Bladeren bron

增加设备显示

样式分支
fyf 2 jaren geleden
bovenliggende
commit
8d69287318
2 gewijzigde bestanden met toevoegingen van 17 en 12 verwijderingen
  1. +5
    -0
      BPASmartClient.IoT/DataVClient.cs
  2. +12
    -12
      BPASmartClient.IoT/Model/IOT/IOTDevModel.cs

+ 5
- 0
BPASmartClient.IoT/DataVClient.cs Bestand weergeven

@@ -178,6 +178,7 @@ namespace BPASmartClient.IoT
{
if (DeviceDataV != null && DeviceDataV.GetIsConnected() && DeviceDataV.deviceTable != null)
{
iOTDevSXModel.Device1=String.Empty;iOTDevSXModel.Device2=String.Empty;iOTDevSXModel.Device3 = String.Empty;
List<object> dataVNode = new List<object>();
Plugin.GetInstance()?.GetPlugin<DeviceMgr>()?.GetDevices()?.ForEach(device =>
{
@@ -197,6 +198,10 @@ namespace BPASmartClient.IoT
VariableMonitor = device.GetVariableMonitor(),
};
dataVNode.Add(obj);

if (string.IsNullOrEmpty(iOTDevSXModel.Device1)) iOTDevSXModel.Device1 = $"[{device.Name}]:{(device.IsBusy ? "忙碌" : "空闲")}-{(device.IsHealth ? "健康" : "故障")}";
else if (string.IsNullOrEmpty(iOTDevSXModel.Device2)) iOTDevSXModel.Device2 = $"[{device.Name}]:{(device.IsBusy ? "忙碌" : "空闲")}-{(device.IsHealth ? "健康" : "故障")}";
else if (string.IsNullOrEmpty(iOTDevSXModel.Device3)) iOTDevSXModel.Device3 = $"[{device.Name}]:{(device.IsBusy ? "忙碌" : "空闲")}-{(device.IsHealth ? "健康" : "故障")}";
});
if (dataVNode.Count > 0)
{


+ 12
- 12
BPASmartClient.IoT/Model/IOT/IOTDevModel.cs Bestand weergeven

@@ -66,18 +66,18 @@ namespace DataVAPI.Tool.IOT
/// </summary>
public class IOTDevSXModel
{
///// <summary>
///// 硬件状态
///// </summary>
//public string HardwareStatus { get; set; }
///// <summary>
///// 扩展属性
///// </summary>
//public string KZSX { get; set; }
///// <summary>
///// 基本属性
///// </summary>
//public string JBSX { get; set; }
/// <summary>
/// 设备一状态
/// </summary>
public string Device1 { get; set; }
/// <summary>
/// 设备二状态
/// </summary>
public string Device2 { get; set; }
/// <summary>
/// 设备三状态
/// </summary>
public string Device3 { get; set; }
/// <summary>
/// 节点状态
/// </summary>


Laden…
Annuleren
Opslaan