总览信息页面曲线图

This commit is contained in:
sc committed 2025-08-30 01:24:39 +08:00
commit 8b7593dceb
4 files changed
+83 -38

No files matched your search

+12 -3
View File
@@ -86,16 +86,18 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
}
}
int t30S = 0;
private void CountDown()
{
DispatcherTimer timer1s = new DispatcherTimer//初始化循环,每1秒调用一次Tick
{
Interval = TimeSpan.FromSeconds(1)//秒
};
timer1s.Tick += Tick_Event_1S;
timer1s.Tick += Tick_Event_S;
timer1s.Start();
}//时间周期初始化
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
void Tick_Event_S(object sender, EventArgs e)//Tick_Event周期执行事件1S
{
for (int i = 0; i < MainWindowViewModel.Machines.Rows.Count; i++)
{
@@ -114,7 +116,14 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
inf[i].Message.Text = (string)Selet_Machines(MainWindowViewModel.Machines, "Message", i);
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"))
{
t30S = 0;
inf[i].DataAdd((double)Selet_Machines(MainWindowViewModel.Machines, "Temperature", i));
}
else { t30S++; }
}
}
}
}