annotate ServerMonitor/Controls/TimeUnitsComboBox.cs @ 32:2342e9459444

Fix schedule times not being saved.
author Brad Greco <brad@bgreco.net>
date Sun, 16 Jun 2019 16:55:14 -0400
parents 7127d5b5ac75
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
7127d5b5ac75 Code cleanup and comments
Brad Greco <brad@bgreco.net>
parents: 3
diff changeset
1 using System.Windows.Forms;
3
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
2
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
3 namespace ServerMonitorApp
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
4 {
9
7127d5b5ac75 Code cleanup and comments
Brad Greco <brad@bgreco.net>
parents: 3
diff changeset
5 /// <summary>Combo box containing options for time units.</summary>
3
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
6 class TimeUnitsComboBox : ComboBox
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
7 {
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
8 protected override void OnCreateControl()
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
9 {
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
10 base.OnCreateControl();
9
7127d5b5ac75 Code cleanup and comments
Brad Greco <brad@bgreco.net>
parents: 3
diff changeset
11 // Clear the items to prevent duplicates added at design time and run time.
3
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
12 Items.Clear();
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
13 Items.Add("minutes");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
14 Items.Add("hours");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
15 Items.Add("days");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
16 SelectedIndex = 2;
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
17 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
18 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
19
9
7127d5b5ac75 Code cleanup and comments
Brad Greco <brad@bgreco.net>
parents: 3
diff changeset
20 /// <summary>Time units.</summary>
3
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
21 public enum TimeUnits { Minute = 0, Hour = 1, Day = 2 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
22 }