示例#1
0
 private void btnRestartServer_Click(object sender, EventArgs e)
 {
     // перезапуск службы Сервера на удалённом сервере
     if (client != null)
     {
         if (client.ControlService(sessionID, ServiceApp.Server, ServiceCommand.Restart))
         {
             ScadaUiUtils.ShowInfo(AppPhrases.ServerRestarted);
         }
         else
         {
             ScadaUiUtils.ShowError(AppPhrases.UnableRestartServer);
         }
     }
 }
示例#2
0
 private void btnRestartServer_Click(object sender, EventArgs e)
 {
     // restart the Server service on the remote server
     if (client != null)
     {
         if (client.ControlService(sessionID, ServiceApp.Server, ServiceCommand.Restart))
         {
             ScadaUiUtils.ShowInfo(AppPhrases.ServerRestarted);
         }
         else
         {
             ScadaUiUtils.ShowError(AppPhrases.UnableRestartServer);
         }
     }
 }
示例#3
0
        /// <summary>
        /// Sends the command to the service.
        /// </summary>
        public bool ControlService(ServiceApp serviceApp, ServiceCommand command)
        {
            RestoreConnection();
            bool result = client.ControlService(sessionID, serviceApp, command);

            RegisterActivity();
            return(result);
        }