private void RestartStopStartWarning(RestartData restartData) { for (int i = 0; i < 5; i++) { serverProcess.StandardInput.WriteLine(@"say ====| " + restartData.MinuteWarning + @" Minutes Till An Automated Server " + restartData.RestartType + "@! |===="); } }
private void RestartStopStart(RestartData restartData) { switch (restartData.RestartType) { case RestartType.Restart: Restart(); break; case RestartType.Start: Start(); break; case RestartType.Stop: Stop(); break; } }
public RestartControl(MainWindow mw, int count, RestartData rData, JSONHandler jHandler) { InitializeComponent(); MainWindow = mw; restartData = rData; jsonHandler = jHandler; label.Content = "Schedule " + count; for (int i = 0; i < 24; i++) { comboBoxHour.Items.Add(i); } for (int i = 0; i < 59; i++) { comboBoxMinute.Items.Add(i); comboBoxWarningMinute.Items.Add(i); } comboBoxHour.SelectedIndex = restartData.RestartHour; comboBoxMinute.SelectedIndex = restartData.RestartMinute; switch (restartData.RestartType) { case RestartType.Restart: radioButtonRestart.IsChecked = true; break; case RestartType.Stop: radioButtonStop.IsChecked = true; break; case RestartType.Start: radioButtonStart.IsChecked = true; break; } comboBoxWarningMinute.SelectedIndex = restartData.MinuteWarning; }
public void RemoveRestartData(RestartData data) { RestartInformation.Data.Remove(data); WriteJSON(); }
public void AddRestartData(RestartData data) { RestartInformation.Data.Add(data); WriteJSON(); }