Esempio n. 1
0
 private void InitDataMonitor()
 {
     try
     {
         _hdDataMonitor              = new HdDataMonitorNotify();
         _hdDataMonitor.DataChanged += new Action <MonitorTask.ChangedType, dynamic[]>(_hdDataMonitor_DataChanged);
         _hdDataMonitor.MessageSend += new Action <string>(_hdDataMonitor_MessageSend);
         _hdDataMonitor.Start();
     }
     catch (Exception ex)
     {
         this.toolStripStatusLabel3.Text = "数据监控启动失败:" + ex.Message;
     }
 }
Esempio n. 2
0
 private void InitDataMonitor(bool immediately)
 {
     try
     {
         _hdDataMonitor              = new HdDataMonitorNotify(DateTime.Parse(dtSearchTime.Value.ToShortDateString()).AddHours(-8), DateTime.Parse(dtSearchTime.Value.AddDays(1).ToShortDateString()).AddSeconds(-1).AddHours(-8));
         _hdDataMonitor.DataChanged += new Action <MonitorTask.ChangedType, dynamic[]>(_hdDataMonitor_DataChanged);
         _hdDataMonitor.MessageSend += new Action <string>(_hdDataMonitor_MessageSend);
         if (immediately)
         {
             _hdDataMonitor.ImmediatelyStart();
         }
         else
         {
             _hdDataMonitor.Start();
         }
     }
     catch (Exception ex)
     {
         this.toolStripStatusLabel3.Text = "数据监控启动失败:" + ex.Message;
     }
 }