Mercurial > servermonitor
view ServerMonitor/Controls/TimeUnitsComboBox.cs @ 9:7127d5b5ac75
Code cleanup and comments
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Mon, 08 Apr 2019 21:29:54 -0400 |
parents | 96f0b028176d |
children |
line wrap: on
line source
using System.Windows.Forms; namespace ServerMonitorApp { /// <summary>Combo box containing options for time units.</summary> class TimeUnitsComboBox : ComboBox { protected override void OnCreateControl() { base.OnCreateControl(); // Clear the items to prevent duplicates added at design time and run time. Items.Clear(); Items.Add("minutes"); Items.Add("hours"); Items.Add("days"); SelectedIndex = 2; } } /// <summary>Time units.</summary> public enum TimeUnits { Minute = 0, Hour = 1, Day = 2 } }