Beispiel #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;
     }
 }
Beispiel #2
0
 protected override void OnStop()
 {
     _thread.Stop();
 }