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

            string error = String.Empty;

            try
            {
                if (!service.StartService())
                {
                    error = "The service cannot be started.  Is it installed?\n\n" +
                            "Try installing using Diagnotics > MySQL > Install Service.";
                }
            }
            catch (Exception ex)
            {
                error = ex.Message;
            }

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