Exemplo n.º 1
0
        private void StopMySqlService(object sender, EventArgs e)
        {
            MysqlWindowsService service = new MysqlWindowsService();

            string error = String.Empty;

            try
            {
                if (!service.StopService())
                {
                    error = "Could not stop the service.  Try restarting your computer and then running Krakatau EPM again.";
                }
            }
            catch (Exception ex)
            {
                error = ex.Message;
            }

            if (error.Length > 0)
            {
                ShowDiagnosticsDialog(error, "Stopping MySQL Service");
            }
        }