Exemplo n.º 1
0
        //-----------------------------------------------Envroment Status--------------------------------------------------------------
        private async void btnSystemStart_Click(object sender, EventArgs e)
        {
            try
            {
                tabCtrlMain.SelectedIndex = 1;
                var confirmResult = MessageBox.Show(
                    string.Format("Are you sure to start all instances in: '{0}'? Pleae check the settings first and then click YES button!",
                                  GlobalVariables.Enviroment.ToString()),
                    "Confirm Start System",
                    MessageBoxButtons.YesNo);
                if (confirmResult == DialogResult.Yes)
                {
                    imgAppStatus.Image      = Properties.Resources.Button_Blank_Red_icon;
                    imgRdsStatus.Image      = Properties.Resources.Button_Blank_Red_icon;
                    imgScheduleStatus.Image = Properties.Resources.Button_Blank_Red_icon;
                    var manager = new SystemManagement();
                    await manager.StartSystem(lstAutoScalingGroupSettings, cboxRdsMutlAZ.Checked);

                    WriteNotification($"{GlobalVariables.Enviroment.ToString()} system is started!");
                }
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }
            finally
            {
                await PopulateSystemStatus();
            }
        }