示例#1
0
 private void StopProcess(ServiceThread thread, Button button)
 {
     try
     {
         button.Enabled = false;
         thread.Stop();
         thread = null;
     }
     finally
     {
         button.Enabled   = true;
         button.Text      = button.Text.Replace("Stop ", "Start ");
         button.ForeColor = Color.Green;
     }
 }
示例#2
0
 protected override void OnStop()
 {
     _thread.Stop();
 }