Bladeren bron

修改

Lishi
pry 2 jaren geleden
bovenliggende
commit
6e8c851cd0
1 gewijzigde bestanden met toevoegingen van 19 en 14 verwijderingen
  1. +19
    -14
      HKControl/Main.cs

+ 19
- 14
HKControl/Main.cs Bestand weergeven

@@ -25,20 +25,25 @@ namespace HKControl
/// <returns></returns>
public bool GetIsSwipe(int CarNum)
{
if (!DataModels.ContainsKey(CarNum)) return false;
switch (CarNum)
{
case 1:
if (!DataModels.ContainsKey(1)) return false;
return DataModels[1].LeftWindowData.IsSwipe;
case 2:
if (!DataModels.ContainsKey(1)) return false;
return DataModels[1].RightWindowData.IsSwipe;
case 3:
if (!DataModels.ContainsKey(2)) return false;
return DataModels[2].LeftWindowData.IsSwipe;
case 4:
if (!DataModels.ContainsKey(2)) return false;
return DataModels[2].RightWindowData.IsSwipe;
case 5:
if (!DataModels.ContainsKey(3)) return false;
return DataModels[3].LeftWindowData.IsSwipe;
case 6:
if (!DataModels.ContainsKey(3)) return false;
return DataModels[3].LeftWindowData.IsSwipe;
default:
break;
@@ -117,17 +122,17 @@ namespace HKControl
Thread.Sleep(100);
}), $"{item.DeviceNum} 号设备监听", true);

ThreadManage.GetInstance().StartLong(new Action(() =>
{
for (int i = 0; i < 6; i++)
{
if (RTrig.GetInstance($"窗口{i + 1}").Start(GetIsComplete(i + 1)))
{
CompleteNotify[i]?.Invoke();
}
}
Thread.Sleep(100);
}), "完成通知");
//ThreadManage.GetInstance().StartLong(new Action(() =>
//{
// for (int i = 0; i < 6; i++)
// {
// if (RTrig.GetInstance($"窗口{i + 1}").Start(GetIsComplete(i + 1)))
// {
// CompleteNotify[i]?.Invoke();
// }
// }
// Thread.Sleep(100);
//}), "完成通知");

});
SiemensDicitonary[item.DeviceNum].Connect(CpuType.S7200Smart, item.IpAddress);
@@ -177,9 +182,9 @@ namespace HKControl

private void Control(int num, string add)
{
HKLog.HKLogImport.WriteInfo($"{num} 号出餐口控制");
HKLog.HKLogImport.WriteInfo($"地址:{add} {num} 号出餐口控制");
SiemensDicitonary[num].Write(add, true);
Thread.Sleep(1000);
Thread.Sleep(2000);
SiemensDicitonary[num].Write(add, false);
}



Laden…
Annuleren
Opslaan