|
|
@@ -25,7 +25,7 @@ namespace UAS_PLCDataReader
|
|
|
StringBuilder DeviceStatusQuerySQL = new StringBuilder();
|
|
|
//用于设备主档资料查询界面SQL查看
|
|
|
StringBuilder DeviceListQuerySQL = new StringBuilder();
|
|
|
- DataHelper dh = SystemInf.dh;
|
|
|
+ static DataHelper dh = SystemInf.dh;
|
|
|
List<string> SQL = new List<string>();
|
|
|
|
|
|
DataHelper updatedh = new DataHelper();
|
|
|
@@ -225,8 +225,6 @@ namespace UAS_PLCDataReader
|
|
|
TimerUpdateDevice.Start();
|
|
|
TimerUpdateSQL.Start();
|
|
|
|
|
|
- Ptime = new Dictionary<int, PollingTimer>();
|
|
|
-
|
|
|
//ButtonPollingSetting.PerformClick();
|
|
|
//ButtonStartPolling.PerformClick();
|
|
|
}
|
|
|
@@ -523,9 +521,9 @@ namespace UAS_PLCDataReader
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- Dictionary<int, PollingTimer> Ptime;
|
|
|
+ static Dictionary<int, PollingTimer> Ptime = new Dictionary<int, PollingTimer>();
|
|
|
|
|
|
- private void RunTask(object i)
|
|
|
+ static private void RunTask(object i)
|
|
|
{
|
|
|
PollingTimer timer = new PollingTimer();
|
|
|
Polling pl = (Polling)i;
|
|
|
@@ -546,16 +544,16 @@ namespace UAS_PLCDataReader
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- DataTable DNC;
|
|
|
- DataTable DC;
|
|
|
+ static DataTable DNC;
|
|
|
+ static DataTable DC;
|
|
|
|
|
|
- Dictionary<string, ModBusTCPClient> client = new Dictionary<string, ModBusTCPClient>();
|
|
|
+ static Dictionary<string, ModBusTCPClient> client = new Dictionary<string, ModBusTCPClient>();
|
|
|
/// <summary>
|
|
|
/// 轮询执行的业务
|
|
|
/// </summary>
|
|
|
/// <param name="sender"></param>
|
|
|
/// <param name="e"></param>
|
|
|
- private void Timer_Tick(object sender, EventArgs e)
|
|
|
+ static private void Timer_Tick(object sender, EventArgs e)
|
|
|
{
|
|
|
PollingTimer timer = (PollingTimer)sender;
|
|
|
Polling pl = (Polling)timer.Polling;
|