Mercurial > servermonitor
view ServerMonitor/Controls/SizeUnitsComboBox.cs @ 16:7626b099aefd
More comments.
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Tue, 30 Apr 2019 20:40:58 -0400 |
parents | 7127d5b5ac75 |
children | 68d7834dc28e |
line wrap: on
line source
using System.Windows.Forms; namespace ServerMonitorApp { /// <summary>Combo box containing options for size units.</summary> class SizeUnitsComboBox : ComboBox { protected override void OnCreateControl() { base.OnCreateControl(); // Clear the items to prevent duplicates added at design time and run time. Items.Clear(); Items.Add("B"); Items.Add("KB"); Items.Add("MB"); Items.Add("GB"); SelectedIndex = 0; } } /// <summary>Size units.</summary> public enum SizeUnits { B = 0, KB = 1, MB = 2, GB = 3 } }