Mercurial > servermonitor
view ServerMonitor/Controls/MatchComboBox.cs @ 11:75ca86e0862c
Add setting to hide to notification area.
author | Brad Greco <brad@bgreco.net> |
---|---|
date | Mon, 15 Apr 2019 19:24:25 -0400 |
parents | 7127d5b5ac75 |
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 } }