示例#1
0
 private void StopAll()
 {
     if (ProcessPanels != null)
     {
         new Thread(() =>
         {
             foreach (ProcessPanel p in ProcessPanels)
             {
                 if (p.IsRunning())
                 {
                     p.StopProcess();
                 }
             }
             //	Invoke(new UpdateUI(updateStatu), new object[]{false});
         }).Start();
     }
     if (SerivceHelper.IsRunningService(Config.SqlServer))
     {
         if (this.Question("是否停止数据库?"))
         {
             SerivceHelper.StopService(Config.SqlServer);
         }
     }
     if (HttpServer != null)
     {
         HttpServer.Stop();
     }
 }
示例#2
0
 private void btnSqlserver_Click(object sender, EventArgs e)
 {
     if (!SerivceHelper.ExistService(Config.SqlServer))
     {
         this.Error("SQLServer没有安装");
         return;
     }
     if (SerivceHelper.IsRunningService(Config.SqlServer))
     {
         SerivceHelper.StopService(Config.SqlServer);
     }
     else
     {
         SerivceHelper.StartService(Config.SqlServer);
     }
     updateStatu();
 }