예제 #1
0
        private void cmdOpenDlg1_Click(object sender, EventArgs e)
        {
            DialogURL dlg = new DialogURL();

            dlg.ShowDialog(this);
            using (ServiceController sc = new ServiceController("JidouJunkaiService"))
            {
                sc.Refresh();
                if (sc.Status == ServiceControllerStatus.Running)
                {
                    sc.Stop();
                }
                if (sc.Status == ServiceControllerStatus.Stopped)
                {
                    sc.Start();
                }
                Redisplay();
            }
        }
예제 #2
0
        private void cmdOpenDlg1_Click(object sender, EventArgs e)
        {
            DialogURL dlg = new DialogURL();

            dlg.ShowDialog();
        }