|
@ -15,7 +15,9 @@ using System.Data.SqlClient; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Reflection; |
|
|
using System.Reflection; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
|
|
|
using System.Threading; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
|
|
|
using System.Timers; |
|
|
using System.Windows.Controls; |
|
|
using System.Windows.Controls; |
|
|
using System.Windows.Forms; |
|
|
using System.Windows.Forms; |
|
|
using System.Windows.Media; |
|
|
using System.Windows.Media; |
|
@ -150,13 +152,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
ERR_c++; |
|
|
ERR_c++; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void CountDown() |
|
|
public void CountDown() |
|
|
{ |
|
|
{ |
|
|
DispatcherTimer timer1s = new DispatcherTimer//初始化循环,每1秒调用一次Tick
|
|
|
DispatcherTimer timer1s = new DispatcherTimer(DispatcherPriority.Normal);//初始化循环,每1秒调用一次Tick
|
|
|
{ |
|
|
timer1s.Interval = TimeSpan.FromMilliseconds(950);//秒
|
|
|
Interval = TimeSpan.FromSeconds(1)//秒
|
|
|
timer1s.Tick += Tick_Main_1S; |
|
|
}; |
|
|
|
|
|
timer1s.Tick += Tick_Event_1S; |
|
|
|
|
|
timer1s.Start(); |
|
|
timer1s.Start(); |
|
|
|
|
|
|
|
|
DispatcherTimer dis50ms = new DispatcherTimer |
|
|
DispatcherTimer dis50ms = new DispatcherTimer |
|
@ -174,7 +175,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel |
|
|
MachiensTcpClient[t.ID].SendAsync(t.DAT); |
|
|
MachiensTcpClient[t.ID].SendAsync(t.DAT); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Tick_Main_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
|
|
{ |
|
|
{ |
|
|
DATA_view(); |
|
|
DATA_view(); |
|
|
//下传工单信息
|
|
|
//下传工单信息
|
|
|