annotate ServerMonitor/Controls/TimeUnitsComboBox.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 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 }