Mercurial > servermonitor
comparison ServerMonitor/Forms/SettingsForm.cs @ 11:75ca86e0862c
Add setting to hide to notification area.
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Mon, 15 Apr 2019 19:24:25 -0400 |
parents | 052aa62cb42a |
children | 7626b099aefd |
comparison
equal
deleted
inserted
replaced
10:9e77c0dccb66 | 11:75ca86e0862c |
---|---|
30 { | 30 { |
31 comboBox.DataSource = Enum.GetValues(typeof(FailAction)); | 31 comboBox.DataSource = Enum.GetValues(typeof(FailAction)); |
32 comboBox.Format += FailActionComboBox_Format; | 32 comboBox.Format += FailActionComboBox_Format; |
33 } | 33 } |
34 AutorunCheckBox.Checked = GetAutorun(); | 34 AutorunCheckBox.Checked = GetAutorun(); |
35 KeepRunningCheckBox.Checked = Settings.Default.HideToNotificationArea; | |
35 KeepLogDaysInput.Value = Settings.Default.KeepLogDays; | 36 KeepLogDaysInput.Value = Settings.Default.KeepLogDays; |
36 ErrorComboBox.SelectedItem = Settings.Default.ErrorAction; | 37 ErrorComboBox.SelectedItem = Settings.Default.ErrorAction; |
37 WarningComboBox.SelectedItem = Settings.Default.WarningAction; | 38 WarningComboBox.SelectedItem = Settings.Default.WarningAction; |
38 InformationComboBox.SelectedItem = Settings.Default.InformationAction; | 39 InformationComboBox.SelectedItem = Settings.Default.InformationAction; |
39 } | 40 } |
59 e.Value = e.Value.ToString().Substring(0, 1) + Regex.Replace(e.Value.ToString(), "(\\B[A-Z])", " $1").ToLower().Substring(1); | 60 e.Value = e.Value.ToString().Substring(0, 1) + Regex.Replace(e.Value.ToString(), "(\\B[A-Z])", " $1").ToLower().Substring(1); |
60 } | 61 } |
61 | 62 |
62 private void OkButton_Click(object sender, EventArgs e) | 63 private void OkButton_Click(object sender, EventArgs e) |
63 { | 64 { |
65 Settings.Default.HideToNotificationArea = KeepRunningCheckBox.Checked; | |
64 Settings.Default.KeepLogDays = (int)KeepLogDaysInput.Value; | 66 Settings.Default.KeepLogDays = (int)KeepLogDaysInput.Value; |
65 Settings.Default.ErrorAction = (FailAction)ErrorComboBox.SelectedItem; | 67 Settings.Default.ErrorAction = (FailAction)ErrorComboBox.SelectedItem; |
66 Settings.Default.WarningAction = (FailAction)WarningComboBox.SelectedItem; | 68 Settings.Default.WarningAction = (FailAction)WarningComboBox.SelectedItem; |
67 Settings.Default.InformationAction = (FailAction)InformationComboBox.SelectedItem; | 69 Settings.Default.InformationAction = (FailAction)InformationComboBox.SelectedItem; |
68 Settings.Default.Save(); | 70 Settings.Default.Save(); |