annotate ServerMonitor/Controls/SizeUnitsComboBox.cs @ 14:2db36ab759de

Add comments.
author Brad Greco <brad@bgreco.net>
date Mon, 22 Apr 2019 21:10:42 -0400
parents 7127d5b5ac75
children 68d7834dc28e
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 size units.</summary>
3
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
6 class SizeUnitsComboBox : 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("B");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
14 Items.Add("KB");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
15 Items.Add("MB");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
16 Items.Add("GB");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
17 SelectedIndex = 0;
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
18 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
19 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
20
9
7127d5b5ac75 Code cleanup and comments
Brad Greco <brad@bgreco.net>
parents: 3
diff changeset
21 /// <summary>Size units.</summary>
3
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
22 public enum SizeUnits { B = 0, KB = 1, MB = 2, GB = 3 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
23 }