annotate ServerMonitor/Controls/TimeUnitsComboBox.cs @ 7:8486ab7d2357

Add/remove files
author Brad Greco <brad@bgreco.net>
date Fri, 01 Mar 2019 21:39:22 -0500
parents 96f0b028176d
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 TimeUnitsComboBox : 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("minutes");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
16 Items.Add("hours");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
17 Items.Add("days");
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
18 SelectedIndex = 2;
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
19 }
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 public enum TimeUnits { Minute = 0, Hour = 1, Day = 2 }
96f0b028176d File check
Brad Greco <brad@bgreco.net>
parents:
diff changeset
23 }