annotate ServerMonitor/Controls/MatchComboBox.cs @ 16:7626b099aefd

More comments.
author Brad Greco <brad@bgreco.net>
date Tue, 30 Apr 2019 20:40:58 -0400
parents 7127d5b5ac75
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
7127d5b5ac75 Code cleanup and comments
Brad Greco <brad@bgreco.net>
parents: 1
diff changeset
1 using System.Windows.Forms;
0
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
2
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
3 namespace ServerMonitorApp
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
4 {
9
7127d5b5ac75 Code cleanup and comments
Brad Greco <brad@bgreco.net>
parents: 1
diff changeset
5 /// <summary>Combo box containing options for matching text against a response string.</summary>
0
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
6 class MatchComboBox : ComboBox
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
7 {
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
8 protected override void OnCreateControl()
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
9 {
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
10 base.OnCreateControl();
9
7127d5b5ac75 Code cleanup and comments
Brad Greco <brad@bgreco.net>
parents: 1
diff changeset
11 // Clear the items to prevent duplicates added at design time and run time.
0
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
12 Items.Clear();
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
13 Items.Add("equals");
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
14 Items.Add("does not equal");
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
15 Items.Add("contains");
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
16 Items.Add("does not contain");
1
9e92780ebc0f Additional validation for SSH check
Brad Greco <brad@bgreco.net>
parents: 0
diff changeset
17 Items.Add("is greater than");
9e92780ebc0f Additional validation for SSH check
Brad Greco <brad@bgreco.net>
parents: 0
diff changeset
18 Items.Add("is less than");
9e92780ebc0f Additional validation for SSH check
Brad Greco <brad@bgreco.net>
parents: 0
diff changeset
19 SelectedIndex = 0;
0
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
20 }
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
21 }
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
22
9
7127d5b5ac75 Code cleanup and comments
Brad Greco <brad@bgreco.net>
parents: 1
diff changeset
23 /// <summary>Types of matches that can be run against a response string.</summary>
16
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
24 public enum MatchType
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
25 {
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
26 /// <summary>Indicates that the result string must equal the expected pattern.</summary>
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
27 Equals = 0,
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
28 /// <summary>Indicates that the result string must not equal the expected pattern.</summary>
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
29 NotEquals = 1,
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
30 /// <summary>Indicates that the result string must contain expected pattern.</summary>
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
31 Contains = 2,
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
32 /// <summary>Indicates that the result string must not contain expected pattern.</summary>
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
33 NotContains = 3,
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
34 /// <summary>Indicates that the result string must be numeric and greater than the expected numeric pattern.</summary>
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
35 GreaterThan = 4,
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
36 /// <summary>Indicates that the result string must be numeric and less than the expected numeric pattern.</summary>
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
37 LessThan = 5
7626b099aefd More comments.
Brad Greco <brad@bgreco.net>
parents: 9
diff changeset
38 }
0
3e1a2131f897 Initial commit. Ping check, scheduling, UI working. SSH check mostly working.
Brad Greco <brad@bgreco.net>
parents:
diff changeset
39 }