Mercurial > servermonitor
view ServerMonitor/Controls/TimeUnitsComboBox.cs @ 26:b5502ce8cb1f
Fix servers getting disabled at program launch if no SSH key is set, even if they have no SSH checks.
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Sun, 02 Jun 2019 17:45:37 -0400 |
parents | 7127d5b5ac75 |
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 } }