annotate ServerMonitor/Controls/SizeUnitsComboBox.cs @ 3:96f0b028176d

File check
author Brad Greco <brad@bgreco.net>
date Fri, 11 Jan 2019 22:34:18 -0500
parents
children 7127d5b5ac75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
1 using System;
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
2 using System.Collections.Generic;
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
3 using System.Linq;
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
4 using System.Text;
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
5 using System.Windows.Forms;
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
6
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
7 namespace ServerMonitorApp
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
8 {
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
9 class SizeUnitsComboBox : ComboBox
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
10 {
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
11 protected override void OnCreateControl()
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
12 {
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
13 base.OnCreateControl();
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
14 Items.Clear();
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
15 Items.Add("B");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
16 Items.Add("KB");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
17 Items.Add("MB");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
18 Items.Add("GB");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
19 SelectedIndex = 0;
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
20 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
21 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
22
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
23 public enum SizeUnits { B = 0, KB = 1, MB = 2, GB = 3 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
24 }