Mercurial > servermonitor
view ServerMonitor/Controls/MatchComboBox.cs @ 9:7127d5b5ac75
Code cleanup and comments
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Mon, 08 Apr 2019 21:29:54 -0400 |
parents | 9e92780ebc0f |
children | 7626b099aefd |
line wrap: on
line source
using System.Windows.Forms; namespace ServerMonitorApp { /// <summary>Combo box containing options for matching text against a response string.</summary> class MatchComboBox : ComboBox { protected override void OnCreateControl() { base.OnCreateControl(); // Clear the items to prevent duplicates added at design time and run time. Items.Clear(); Items.Add("equals"); Items.Add("does not equal"); Items.Add("contains"); Items.Add("does not contain"); Items.Add("is greater than"); Items.Add("is less than"); SelectedIndex = 0; } } /// <summary>Types of matches that can be run against a response string.</summary> public enum MatchType { Equals = 0, NotEquals = 1, Contains = 2, NotContains = 3, GreaterThan = 4, LessThan = 5 } }