信息播报页面添加
This commit is contained in:
commit
cdc7b896d9
4 files changed
+45
-53
No files matched your search
@@ -154,30 +154,29 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
|
||||
public void CountDown()
|
||||
{
|
||||
DispatcherTimer dis1s = new DispatcherTimer
|
||||
{
|
||||
Interval = TimeSpan.FromSeconds(1) //秒
|
||||
};
|
||||
dis1s.Tick += new EventHandler(Tick_Main_1S);//每执行的方法
|
||||
dis1s.Start();//计时开始
|
||||
DispatcherTimer dis50ms = new DispatcherTimer
|
||||
{
|
||||
Interval = TimeSpan.FromMilliseconds(50) //毫秒
|
||||
Interval = TimeSpan.FromMilliseconds(20) //毫秒
|
||||
};
|
||||
dis50ms.Tick += new EventHandler(DisTimer_50MS);//每执行的方法
|
||||
dis50ms.Start();//计时开始
|
||||
}//时间周期初始化
|
||||
int Time1 = 0, Time5 = 0, Time60 = 0;
|
||||
}//时间周期初始化
|
||||
int Time5 = 0, Time60 = 0;
|
||||
void DisTimer_50MS(object sender, EventArgs e)//Tick_Event周期执行事件50MS
|
||||
{
|
||||
if (stringQueue.Count > 0) //信息发送队列
|
||||
{
|
||||
QueueString t = stringQueue.Dequeue();
|
||||
MachiensTcpClient[t.ID].SendAsync(t.DAT);
|
||||
}
|
||||
|
||||
if (Time1 >= 20)
|
||||
{
|
||||
Tick_Main_1S();
|
||||
Time1 = 0;
|
||||
}
|
||||
else { Time1++; }
|
||||
}
|
||||
}
|
||||
void Tick_Main_1S()//Tick_Event周期执行事件1S
|
||||
void Tick_Main_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
||||
{
|
||||
//下传工单信息
|
||||
SQLiteHelper WorkOrderSQL = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
@@ -290,7 +289,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
});//信息插入队列
|
||||
}
|
||||
}
|
||||
|
||||
if (Time5 > 5)
|
||||
{
|
||||
Tick_Event_5S();
|
||||
@@ -300,7 +298,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
if (Time60 > 60)
|
||||
{
|
||||
Tick_Event_60S();
|
||||
Time60= 0;
|
||||
Time60 = 0;
|
||||
}
|
||||
else { Time60++; }
|
||||
}
|
||||
@@ -317,6 +315,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
});//信息插入队列
|
||||
}
|
||||
}//发送800指令
|
||||
|
||||
|
||||
|
||||
MainWindow.InfData.Rows.Add(new object[] { "1", Properties.Resources.Pequest+"a", "423", "12" });
|
||||
|
||||
|
||||
}
|
||||
void Tick_Event_60S()
|
||||
{
|
||||
@@ -357,14 +361,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
/* public static void Inf_Data()
|
||||
{
|
||||
UserInformation userInformation = new UserInformation();
|
||||
userInformation.Topmost = true;
|
||||
userInformation.Show();
|
||||
userInformation.Activate();
|
||||
}*/
|
||||
|
||||
public static string SYS_WorkNumder; //工单号
|
||||
public static int SYS_AT1; //附缸1-3
|
||||
public static int SYS_AT2;
|
||||
|
||||
Reference in new issue
Block a user