private void btnStartStop_Click(object sender, EventArgs e)
        {
            ServiceOperation    operation = (btnStartStop.Text == "Start") ? ServiceOperation.ServiceStart : ServiceOperation.ServiceStop;
            ServiceProgressForm progress  = new ServiceProgressForm(operation);

            progress.ShowDialog(this);
        }
Exemple #2
0
 public static void OnStopServiceMenu(object sender, EventArgs e)
 {
     if (ctrlPanel.Visible)
     {
         ServiceProgressForm progress = new ServiceProgressForm(ServiceOperation.ServiceStop);
         progress.ShowDialog(ctrlPanel);
     }
     else
     {
         StopService(sender, e);
     }
 }