Browse Source

曲线图记录修改

master
sc 1 month ago
parent
commit
11b9b99d3e
  1. 24
      ViewModel/MainWindowViewModel.cs

24
ViewModel/MainWindowViewModel.cs

@ -998,20 +998,24 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
} }
void Tick_Event_30S() void Tick_Event_30S()
{ {
/*曲线图*/ try
for (int i = 0; i < Machines.Rows.Count; i++)//曲线图
{ {
string st = Selet_Machines(Machines, "State", "ID='" + i + "'").ToString(); /*曲线图*/
if (st != "800" && st != "801" && st != "802") for (int i = 0; i < Machines.Rows.Count; i++)//曲线图
{ {
DataRow whole_Dat = Whole_dat.NewRow(); string mac_s = Selet_Machines(Machines, "State", "ID='" + i + "'").ToString();
whole_Dat["Machine"] = Selet_Machines(Machines, "NAME", "ID='" + i + "'").ToString(); if ((mac_s == "101") || (mac_s == "201") || (mac_s == "202") || (mac_s == "301") || (mac_s == "309"))
whole_Dat["DateTime"] = DateTime.Now; {
whole_Dat["DAT"] = (double)Selet_Machines(Machines, "Temperature", "ID='" + i + "'"); DataRow whole_Dat = Whole_dat.NewRow();
Whole_dat.Rows.Add(whole_Dat); whole_Dat["Machine"] = Selet_Machines(Machines, "NAME", "ID='" + i + "'").ToString();
whole_Dat["DateTime"] = DateTime.Now;
whole_Dat["DAT"] = Convert.ToDouble(Selet_Machines(Machines, "Temperature", "ID='" + i + "'"));
Whole_dat.Rows.Add(whole_Dat);
}
} }
} }
} catch (Exception EX) { LogGing.ERRDATA(EX); }
}
public static TcpClient[] MachiensTcpClient = new TcpClient[99]; public static TcpClient[] MachiensTcpClient = new TcpClient[99];
public static SerialPortClient[] MachiensPortClient = new SerialPortClient[4]; public static SerialPortClient[] MachiensPortClient = new SerialPortClient[4];

Loading…
Cancel
Save