Browse Source

研究所-50L-反应釜上传程序版本V1.0.1

reconfiguration
ZhaoGang 1 month ago
parent
commit
a098d332b2
1 changed files with 17 additions and 10 deletions
  1. +17
    -10
      BPASmartClient.Academy/ViewModel/ReactionKettle50LViewModel.cs

+ 17
- 10
BPASmartClient.Academy/ViewModel/ReactionKettle50LViewModel.cs View File

@@ -22,16 +22,23 @@ namespace BPASmartClient.Academy.ViewModel
switch (Content)
{
case "系统启动":
IsChecked = true;
DataFeedBack_50 dataFeedback = new ();
dataFeedback.Name = Name;
var snd = new SaveNameData(Name);
dataFeedback.ProductNumberId = snd.Id;
SqliteOperate.GetInstance.Add(snd);
PlcControl.GetInstance.id = snd.Id;
SqliteOperate.GetInstance.DataFeedBacks = dataFeedback;
PlcControl.GetInstance.Write(BoolAddEnum.系统启动, true);
Content = "系统停止";
var result = PlcControl.GetInstance.Write(BoolAddEnum.系统启动, true);
if (result!= null && result.IsSuccess)
{
IsChecked = true;
DataFeedBack_50 dataFeedback = new();
dataFeedback.Name = Name;
var snd = new SaveNameData(Name);
dataFeedback.ProductNumberId = snd.Id;
SqliteOperate.GetInstance.Add(snd);
PlcControl.GetInstance.id = snd.Id;
SqliteOperate.GetInstance.DataFeedBacks = dataFeedback;
Content = "系统停止";
}
else
{
LogHelper.GetInstance.AddRun(result.Message);
}
break;
case "系统停止":
IsChecked = false;


Loading…
Cancel
Save