Ejemplo n.º 1
0
 public virtual void Stop()
 {
     Running = false;
     if (ConnectionThread != null)
     {
         ConnectionThread.Abort();
     }
 }
Ejemplo n.º 2
0
 public void Disconnect()
 {
     if (this.ConnectionThread.ThreadState == ThreadState.Running)
     {
         ConnectionThread.Abort();
     }
     this.IsTerminated = true;
     this.Connection.Disconnect();
 }
Ejemplo n.º 3
0
 protected override void AfterMyWorkStateChanged(object sender, EventArgs e)
 {
     if (myWorkState)
     {
         ConnectionThread = new System.Threading.Thread(Connection_Mysql);
         ConnectionThread.Start();
     }
     else
     {
         if (ConnectionThread != null)
         {
             ConnectionThread.Abort();
         }
     }
 }
 protected override void AfterMyWorkStateChanged(object sender, EventArgs e)
 {
     if (myWorkState)
     {
         CaseSettings     = ChungHsin_MySqlMethod.CaseLoad();
         ReceiveSettings  = ChungHsin_MySqlMethod.ReceiveLoad();
         DeviceConfigs    = ChungHsin_MySqlMethod.DevicesLoad();
         ConnectionThread = new Thread(Connection_Mysql);
         ConnectionThread.Start();
     }
     else
     {
         if (ConnectionThread != null)
         {
             ConnectionThread.Abort();
         }
     }
 }
 protected override void AfterMyWorkStateChanged(object sender, EventArgs e)
 {
     if (myWorkState)
     {
         CaseSettings     = Ewatch_MySqlMethod.CaseLoad();
         AiSettings       = Ewatch_MySqlMethod.AiLoad();
         ElectricSettings = Ewatch_MySqlMethod.ElectricLoad();
         ConnectionThread = new Thread(Connection_Mysql);
         ConnectionThread.Start();
     }
     else
     {
         if (ConnectionThread != null)
         {
             ConnectionThread.Abort();
         }
     }
 }