|
|
@ -64,7 +64,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
|
|
|
|
|
WholeView.Children.Add(inf[i]); |
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0; i < MainWindowViewModel.Machines.Rows.Count; i++) |
|
|
|
{ |
|
|
|
DataRow[] rows= MainWindowViewModel.Whole_dat.Select("Machine='" + inf[i].name.Text+"'"); |
|
|
|
inf[i].DataROW(rows); |
|
|
|
} |
|
|
|
|
|
|
|
CountDown(); |
|
|
|
} |
|
|
|
|
|
|
@ -99,6 +104,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
|
|
|
|
|
void Tick_Event_S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
|
|
|
{ |
|
|
|
DateTime dateTime = DateTime.Now; |
|
|
|
for (int i = 0; i < MainWindowViewModel.Machines.Rows.Count; i++) |
|
|
|
{ |
|
|
|
string State_ = Selet_Machines(MainWindowViewModel.Machines, "State", i).ToString(); |
|
|
@ -117,13 +123,20 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
|
inf[i].Orders.Text = (string)Selet_Machines(MainWindowViewModel.Machines, "WorkOrder", i); |
|
|
|
inf[i].time.Text = (string)Selet_Machines(MainWindowViewModel.Machines, "time", i); |
|
|
|
|
|
|
|
if ((t30S > 30)&&(State_!="800")) |
|
|
|
if ((t30S > 10)&&(State_!="800")) |
|
|
|
{ |
|
|
|
t30S = 0; |
|
|
|
inf[i].DataAdd((double)Selet_Machines(MainWindowViewModel.Machines, "Temperature", i)); |
|
|
|
inf[i].DataAdd(dateTime,(double)Selet_Machines(MainWindowViewModel.Machines, "Temperature", i)); |
|
|
|
|
|
|
|
DataRow whole_Dat = MainWindowViewModel.Whole_dat.NewRow(); |
|
|
|
whole_Dat["Machine"] = Selet_Machines(MainWindowViewModel.Machines, "NAME", i).ToString(); |
|
|
|
whole_Dat["DateTime"] = dateTime; |
|
|
|
whole_Dat["DAT"] = (double)Selet_Machines(MainWindowViewModel.Machines, "Temperature", i); |
|
|
|
MainWindowViewModel.Whole_dat.Rows.Add(whole_Dat); |
|
|
|
} |
|
|
|
else { t30S++; } |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
t30S++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|