Ejemplo n.º 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();
            }
        }
Ejemplo n.º 2
0
        private void cmdOpenDlg1_Click(object sender, EventArgs e)
        {
            DialogURL dlg = new DialogURL();

            dlg.ShowDialog();
        }