rautomation 2.0.1-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. checksums.yaml +7 -0
  2. data/.document +5 -0
  3. data/.gitignore +41 -0
  4. data/.rspec +2 -0
  5. data/.yardopts +8 -0
  6. data/CHANGES.md +276 -0
  7. data/Gemfile +3 -0
  8. data/LICENSE +20 -0
  9. data/README.md +142 -0
  10. data/Rakefile +73 -0
  11. data/ext/AutoItX/AutoItX.chm +0 -0
  12. data/ext/AutoItX/AutoItX3.dll +0 -0
  13. data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.cpp +30 -0
  14. data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj +179 -0
  15. data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.filters +42 -0
  16. data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.user +3 -0
  17. data/ext/IAccessibleDLL/IAccessibleDLL/ReadMe.txt +48 -0
  18. data/ext/IAccessibleDLL/IAccessibleDLL/dllmain.cpp +19 -0
  19. data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.cpp +8 -0
  20. data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.h +22 -0
  21. data/ext/IAccessibleDLL/IAccessibleDLL/table_support.cpp +282 -0
  22. data/ext/IAccessibleDLL/IAccessibleDLL/targetver.h +8 -0
  23. data/ext/IAccessibleDLL/IAccessibleDLL.sln +31 -0
  24. data/ext/IAccessibleDLL/IAccessibleDLL.suo +0 -0
  25. data/ext/IAccessibleDLL/Release/IAccessibleDLL.dll +0 -0
  26. data/ext/UiaDll/RAutomation.UIA/Controls/Clicker.cs +63 -0
  27. data/ext/UiaDll/RAutomation.UIA/Controls/SelectList.cs +116 -0
  28. data/ext/UiaDll/RAutomation.UIA/Controls/Spinner.cs +46 -0
  29. data/ext/UiaDll/RAutomation.UIA/Controls/TabControl.cs +54 -0
  30. data/ext/UiaDll/RAutomation.UIA/Controls/TableControl.cs +132 -0
  31. data/ext/UiaDll/RAutomation.UIA/Controls/TextControl.cs +50 -0
  32. data/ext/UiaDll/RAutomation.UIA/Expander.cs +59 -0
  33. data/ext/UiaDll/RAutomation.UIA/Extensions/Element.cs +166 -0
  34. data/ext/UiaDll/RAutomation.UIA/Extensions/Enumerable.cs +76 -0
  35. data/ext/UiaDll/RAutomation.UIA/Extensions/Property.cs +27 -0
  36. data/ext/UiaDll/RAutomation.UIA/Properties/AssemblyInfo.cs +36 -0
  37. data/ext/UiaDll/RAutomation.UIA/Properties/AutomationProperties.cs +18 -0
  38. data/ext/UiaDll/RAutomation.UIA/RAutomation.UIA.csproj +77 -0
  39. data/ext/UiaDll/Release/RAutomation.UIA.dll +0 -0
  40. data/ext/UiaDll/Release/UiaDll.dll +0 -0
  41. data/ext/UiaDll/UiaDll/ArrayHelper.cpp +14 -0
  42. data/ext/UiaDll/UiaDll/ArrayHelper.h +7 -0
  43. data/ext/UiaDll/UiaDll/AssemblyInfo.cpp +40 -0
  44. data/ext/UiaDll/UiaDll/ControlMethods.cpp +16 -0
  45. data/ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp +24 -0
  46. data/ext/UiaDll/UiaDll/DynamicAssemblyResolver.h +16 -0
  47. data/ext/UiaDll/UiaDll/Locator.cpp +93 -0
  48. data/ext/UiaDll/UiaDll/Locator.h +55 -0
  49. data/ext/UiaDll/UiaDll/MenuItemSelector.cpp +75 -0
  50. data/ext/UiaDll/UiaDll/MenuItemSelector.h +24 -0
  51. data/ext/UiaDll/UiaDll/MenuMethods.cpp +62 -0
  52. data/ext/UiaDll/UiaDll/ReadMe.txt +38 -0
  53. data/ext/UiaDll/UiaDll/SelectListMethods.cpp +84 -0
  54. data/ext/UiaDll/UiaDll/SpinnerMethods.cpp +61 -0
  55. data/ext/UiaDll/UiaDll/StringHelper.cpp +57 -0
  56. data/ext/UiaDll/UiaDll/StringHelper.h +15 -0
  57. data/ext/UiaDll/UiaDll/StringMethods.cpp +8 -0
  58. data/ext/UiaDll/UiaDll/TabControlMethods.cpp +40 -0
  59. data/ext/UiaDll/UiaDll/TableMethods.cpp +108 -0
  60. data/ext/UiaDll/UiaDll/TextMethods.cpp +25 -0
  61. data/ext/UiaDll/UiaDll/ToggleStateHelper.h +10 -0
  62. data/ext/UiaDll/UiaDll/UiaDll.cpp +216 -0
  63. data/ext/UiaDll/UiaDll/UiaDll.h +13 -0
  64. data/ext/UiaDll/UiaDll/UiaDll.vcxproj +167 -0
  65. data/ext/UiaDll/UiaDll/UiaDll.vcxproj.filters +110 -0
  66. data/ext/UiaDll/UiaDll/app.ico +0 -0
  67. data/ext/UiaDll/UiaDll/app.rc +0 -0
  68. data/ext/UiaDll/UiaDll/dllmain.cpp +1 -0
  69. data/ext/UiaDll/UiaDll/resource.h +3 -0
  70. data/ext/UiaDll/UiaDll/stdafx.cpp +5 -0
  71. data/ext/UiaDll/UiaDll/stdafx.h +41 -0
  72. data/ext/UiaDll/UiaDll/targetver.h +8 -0
  73. data/ext/UiaDll/UiaDll.sln +57 -0
  74. data/ext/WindowsForms/.nuget/NuGet.Config +6 -0
  75. data/ext/WindowsForms/.nuget/NuGet.exe +0 -0
  76. data/ext/WindowsForms/.nuget/NuGet.targets +136 -0
  77. data/ext/WindowsForms/Release/FizzWare.NBuilder.dll +0 -0
  78. data/ext/WindowsForms/Release/UIA.Extensions.dll +0 -0
  79. data/ext/WindowsForms/Release/WindowsForms.exe +0 -0
  80. data/ext/WindowsForms/WindowsForms/AboutBox.Designer.cs +168 -0
  81. data/ext/WindowsForms/WindowsForms/AboutBox.cs +103 -0
  82. data/ext/WindowsForms/WindowsForms/AboutBox.resx +123 -0
  83. data/ext/WindowsForms/WindowsForms/DataEntryForm.Designer.cs +218 -0
  84. data/ext/WindowsForms/WindowsForms/DataEntryForm.cs +52 -0
  85. data/ext/WindowsForms/WindowsForms/DataEntryForm.resx +120 -0
  86. data/ext/WindowsForms/WindowsForms/DataGridView.Designer.cs +77 -0
  87. data/ext/WindowsForms/WindowsForms/DataGridView.cs +43 -0
  88. data/ext/WindowsForms/WindowsForms/DataGridView.resx +120 -0
  89. data/ext/WindowsForms/WindowsForms/FizzWare.NBuilder.dll +0 -0
  90. data/ext/WindowsForms/WindowsForms/MainFormWindow.Designer.cs +527 -0
  91. data/ext/WindowsForms/WindowsForms/MainFormWindow.cs +109 -0
  92. data/ext/WindowsForms/WindowsForms/MainFormWindow.resx +126 -0
  93. data/ext/WindowsForms/WindowsForms/PersonForm.Designer.cs +119 -0
  94. data/ext/WindowsForms/WindowsForms/PersonForm.cs +34 -0
  95. data/ext/WindowsForms/WindowsForms/PersonForm.resx +120 -0
  96. data/ext/WindowsForms/WindowsForms/Program.cs +21 -0
  97. data/ext/WindowsForms/WindowsForms/Properties/AssemblyInfo.cs +36 -0
  98. data/ext/WindowsForms/WindowsForms/Properties/Resources.Designer.cs +71 -0
  99. data/ext/WindowsForms/WindowsForms/Properties/Resources.resx +117 -0
  100. data/ext/WindowsForms/WindowsForms/Properties/Settings.Designer.cs +30 -0
  101. data/ext/WindowsForms/WindowsForms/Properties/Settings.settings +7 -0
  102. data/ext/WindowsForms/WindowsForms/SimpleElementsForm.Designer.cs +93 -0
  103. data/ext/WindowsForms/WindowsForms/SimpleElementsForm.cs +19 -0
  104. data/ext/WindowsForms/WindowsForms/SimpleElementsForm.resx +120 -0
  105. data/ext/WindowsForms/WindowsForms/UIA.Extensions.dll +0 -0
  106. data/ext/WindowsForms/WindowsForms/ValueMonthCalendar.cs +28 -0
  107. data/ext/WindowsForms/WindowsForms/WindowsForms.csproj +166 -0
  108. data/ext/WindowsForms/WindowsForms/packages.config +4 -0
  109. data/ext/WindowsForms/WindowsForms.sln +46 -0
  110. data/lib/rautomation/adapter/autoit/button.rb +59 -0
  111. data/lib/rautomation/adapter/autoit/locators.rb +22 -0
  112. data/lib/rautomation/adapter/autoit/mouse.rb +38 -0
  113. data/lib/rautomation/adapter/autoit/text_field.rb +70 -0
  114. data/lib/rautomation/adapter/autoit/window.rb +197 -0
  115. data/lib/rautomation/adapter/autoit.rb +8 -0
  116. data/lib/rautomation/adapter/helper.rb +64 -0
  117. data/lib/rautomation/adapter/ms_uia/button.rb +21 -0
  118. data/lib/rautomation/adapter/ms_uia/button_helper.rb +19 -0
  119. data/lib/rautomation/adapter/ms_uia/checkbox.rb +23 -0
  120. data/lib/rautomation/adapter/ms_uia/constants.rb +111 -0
  121. data/lib/rautomation/adapter/ms_uia/control.rb +134 -0
  122. data/lib/rautomation/adapter/ms_uia/functions.rb +279 -0
  123. data/lib/rautomation/adapter/ms_uia/keys.rb +121 -0
  124. data/lib/rautomation/adapter/ms_uia/keystroke_converter.rb +122 -0
  125. data/lib/rautomation/adapter/ms_uia/label.rb +18 -0
  126. data/lib/rautomation/adapter/ms_uia/list_box.rb +46 -0
  127. data/lib/rautomation/adapter/ms_uia/list_item.rb +22 -0
  128. data/lib/rautomation/adapter/ms_uia/locators.rb +23 -0
  129. data/lib/rautomation/adapter/ms_uia/menu.rb +36 -0
  130. data/lib/rautomation/adapter/ms_uia/radio.rb +23 -0
  131. data/lib/rautomation/adapter/ms_uia/select_list.rb +85 -0
  132. data/lib/rautomation/adapter/ms_uia/spinner.rb +31 -0
  133. data/lib/rautomation/adapter/ms_uia/tab_control.rb +46 -0
  134. data/lib/rautomation/adapter/ms_uia/table.rb +140 -0
  135. data/lib/rautomation/adapter/ms_uia/text_field.rb +39 -0
  136. data/lib/rautomation/adapter/ms_uia/uia_dll.rb +428 -0
  137. data/lib/rautomation/adapter/ms_uia/value_control.rb +21 -0
  138. data/lib/rautomation/adapter/ms_uia/window.rb +289 -0
  139. data/lib/rautomation/adapter/ms_uia.rb +27 -0
  140. data/lib/rautomation/adapter/win_32/button.rb +14 -0
  141. data/lib/rautomation/adapter/win_32/button_helper.rb +24 -0
  142. data/lib/rautomation/adapter/win_32/checkbox.rb +14 -0
  143. data/lib/rautomation/adapter/win_32/constants.rb +73 -0
  144. data/lib/rautomation/adapter/win_32/control.rb +86 -0
  145. data/lib/rautomation/adapter/win_32/functions.rb +336 -0
  146. data/lib/rautomation/adapter/win_32/keys.rb +146 -0
  147. data/lib/rautomation/adapter/win_32/label.rb +10 -0
  148. data/lib/rautomation/adapter/win_32/list_box.rb +40 -0
  149. data/lib/rautomation/adapter/win_32/locators.rb +22 -0
  150. data/lib/rautomation/adapter/win_32/mouse.rb +59 -0
  151. data/lib/rautomation/adapter/win_32/password_field.rb +15 -0
  152. data/lib/rautomation/adapter/win_32/radio.rb +11 -0
  153. data/lib/rautomation/adapter/win_32/select_list.rb +97 -0
  154. data/lib/rautomation/adapter/win_32/table.rb +25 -0
  155. data/lib/rautomation/adapter/win_32/text_field.rb +52 -0
  156. data/lib/rautomation/adapter/win_32/window.rb +277 -0
  157. data/lib/rautomation/adapter/win_32.rb +23 -0
  158. data/lib/rautomation/button.rb +55 -0
  159. data/lib/rautomation/element_collections.rb +55 -0
  160. data/lib/rautomation/platform.rb +15 -0
  161. data/lib/rautomation/text_field.rb +60 -0
  162. data/lib/rautomation/version.rb +3 -0
  163. data/lib/rautomation/wait_helper.rb +23 -0
  164. data/lib/rautomation/window.rb +248 -0
  165. data/lib/rautomation.rb +8 -0
  166. data/rautomation.gemspec +52 -0
  167. data/spec/adapter/autoit/mouse_spec.rb +53 -0
  168. data/spec/adapter/autoit/window_spec.rb +17 -0
  169. data/spec/adapter/ms_uia/button_spec.rb +39 -0
  170. data/spec/adapter/ms_uia/checkbox_spec.rb +55 -0
  171. data/spec/adapter/ms_uia/control_spec.rb +88 -0
  172. data/spec/adapter/ms_uia/functions_spec.rb +39 -0
  173. data/spec/adapter/ms_uia/keystroke_converter_spec.rb +48 -0
  174. data/spec/adapter/ms_uia/label_spec.rb +18 -0
  175. data/spec/adapter/ms_uia/list_item_spec.rb +14 -0
  176. data/spec/adapter/ms_uia/listbox_spec.rb +73 -0
  177. data/spec/adapter/ms_uia/radio_spec.rb +39 -0
  178. data/spec/adapter/ms_uia/select_list_spec.rb +118 -0
  179. data/spec/adapter/ms_uia/spinner_spec.rb +44 -0
  180. data/spec/adapter/ms_uia/tab_control_spec.rb +53 -0
  181. data/spec/adapter/ms_uia/table_spec.rb +197 -0
  182. data/spec/adapter/ms_uia/text_field_spec.rb +43 -0
  183. data/spec/adapter/ms_uia/value_control_spec.rb +11 -0
  184. data/spec/adapter/ms_uia/window_spec.rb +81 -0
  185. data/spec/adapter/win_32/button_spec.rb +31 -0
  186. data/spec/adapter/win_32/checkbox_spec.rb +46 -0
  187. data/spec/adapter/win_32/label_spec.rb +13 -0
  188. data/spec/adapter/win_32/listbox_spec.rb +41 -0
  189. data/spec/adapter/win_32/mouse_spec.rb +49 -0
  190. data/spec/adapter/win_32/radio_spec.rb +33 -0
  191. data/spec/adapter/win_32/select_list_spec.rb +65 -0
  192. data/spec/adapter/win_32/table_spec.rb +27 -0
  193. data/spec/adapter/win_32/text_field_spec.rb +24 -0
  194. data/spec/adapter/win_32/window_spec.rb +61 -0
  195. data/spec/button_spec.rb +67 -0
  196. data/spec/buttons_spec.rb +21 -0
  197. data/spec/spec_helper.rb +128 -0
  198. data/spec/text_field_spec.rb +64 -0
  199. data/spec/text_fields_spec.rb +22 -0
  200. data/spec/window_spec.rb +150 -0
  201. data/spec/windows_spec.rb +76 -0
  202. metadata +369 -0
@@ -0,0 +1,527 @@
1
+ namespace WindowsForms
2
+ {
3
+ partial class MainFormWindow
4
+ {
5
+ /// <summary>
6
+ /// Required designer variable.
7
+ /// </summary>
8
+ private System.ComponentModel.IContainer components = null;
9
+
10
+ /// <summary>
11
+ /// Clean up any resources being used.
12
+ /// </summary>
13
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
14
+ protected override void Dispose(bool disposing)
15
+ {
16
+ if (disposing && (components != null))
17
+ {
18
+ components.Dispose();
19
+ }
20
+ base.Dispose(disposing);
21
+ }
22
+
23
+ #region Windows Form Designer generated code
24
+
25
+ /// <summary>
26
+ /// Required method for Designer support - do not modify
27
+ /// the contents of this method with the code editor.
28
+ /// </summary>
29
+ private void InitializeComponent()
30
+ {
31
+ this.components = new System.ComponentModel.Container();
32
+ System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Child 1");
33
+ System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Grandchild 1");
34
+ System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Child 2", new System.Windows.Forms.TreeNode[] {
35
+ treeNode2});
36
+ System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("Parent One", new System.Windows.Forms.TreeNode[] {
37
+ treeNode1,
38
+ treeNode3});
39
+ System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("Parent Two");
40
+ this.label1 = new System.Windows.Forms.Label();
41
+ this.aboutButton = new System.Windows.Forms.Button();
42
+ this.button1 = new System.Windows.Forms.Button();
43
+ this.textField = new System.Windows.Forms.TextBox();
44
+ this.checkBox = new System.Windows.Forms.CheckBox();
45
+ this.checkBoxLabel = new System.Windows.Forms.Label();
46
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
47
+ this.radioButtonDisabled = new System.Windows.Forms.RadioButton();
48
+ this.radioButtonReset = new System.Windows.Forms.Button();
49
+ this.radioButtonLabel = new System.Windows.Forms.Label();
50
+ this.radioButton2 = new System.Windows.Forms.RadioButton();
51
+ this.radioButton1 = new System.Windows.Forms.RadioButton();
52
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
53
+ this.comboBoxDisabled = new System.Windows.Forms.ComboBox();
54
+ this.fruitsLabel = new System.Windows.Forms.Label();
55
+ this.FruitsComboBox = new System.Windows.Forms.ComboBox();
56
+ this.nextFormButton = new System.Windows.Forms.Button();
57
+ this.label2 = new System.Windows.Forms.Label();
58
+ this.buttonButton = new System.Windows.Forms.Button();
59
+ this.enabledButton = new System.Windows.Forms.Button();
60
+ this.disabledButton = new System.Windows.Forms.Button();
61
+ this.checkBoxDisabled = new System.Windows.Forms.CheckBox();
62
+ this.textBoxDisabled = new System.Windows.Forms.TextBox();
63
+ this.FruitListBox = new System.Windows.Forms.ListBox();
64
+ this.menuStrip1 = new System.Windows.Forms.MenuStrip();
65
+ this.faileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
66
+ this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
67
+ this.roundaboutWayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
68
+ this.toToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
69
+ this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
70
+ this.treeView = new System.Windows.Forms.TreeView();
71
+ this.multiLineTextField = new System.Windows.Forms.TextBox();
72
+ this.buttonDataGridView = new System.Windows.Forms.Button();
73
+ this.automatableMonthCalendar1 = new System.Windows.Forms.MonthCalendar();
74
+ this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
75
+ this.addSomeFruitsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
76
+ this.groupBox1.SuspendLayout();
77
+ this.groupBox2.SuspendLayout();
78
+ this.menuStrip1.SuspendLayout();
79
+ this.SuspendLayout();
80
+ //
81
+ // label1
82
+ //
83
+ this.label1.AutoSize = true;
84
+ this.label1.Location = new System.Drawing.Point(139, 65);
85
+ this.label1.Name = "label1";
86
+ this.label1.Size = new System.Drawing.Size(102, 13);
87
+ this.label1.TabIndex = 0;
88
+ this.label1.Text = "This is a sample text";
89
+ this.label1.Click += new System.EventHandler(this.label1_Click);
90
+ //
91
+ // aboutButton
92
+ //
93
+ this.aboutButton.Location = new System.Drawing.Point(12, 36);
94
+ this.aboutButton.Name = "aboutButton";
95
+ this.aboutButton.Size = new System.Drawing.Size(95, 23);
96
+ this.aboutButton.TabIndex = 1;
97
+ this.aboutButton.Text = "&About";
98
+ this.aboutButton.UseVisualStyleBackColor = true;
99
+ this.aboutButton.Click += new System.EventHandler(this.aboutButton_Click);
100
+ //
101
+ // button1
102
+ //
103
+ this.button1.Location = new System.Drawing.Point(12, 123);
104
+ this.button1.Name = "button1";
105
+ this.button1.Size = new System.Drawing.Size(95, 23);
106
+ this.button1.TabIndex = 4;
107
+ this.button1.Text = "Close";
108
+ this.button1.UseVisualStyleBackColor = true;
109
+ this.button1.Click += new System.EventHandler(this.button1_Click);
110
+ //
111
+ // textField
112
+ //
113
+ this.textField.Location = new System.Drawing.Point(142, 96);
114
+ this.textField.Name = "textField";
115
+ this.textField.Size = new System.Drawing.Size(184, 20);
116
+ this.textField.TabIndex = 5;
117
+ //
118
+ // checkBox
119
+ //
120
+ this.checkBox.AutoSize = true;
121
+ this.checkBox.FlatStyle = System.Windows.Forms.FlatStyle.System;
122
+ this.checkBox.Location = new System.Drawing.Point(142, 132);
123
+ this.checkBox.Name = "checkBox";
124
+ this.checkBox.Size = new System.Drawing.Size(80, 18);
125
+ this.checkBox.TabIndex = 6;
126
+ this.checkBox.Text = "checkBox";
127
+ this.checkBox.UseVisualStyleBackColor = true;
128
+ this.checkBox.CheckedChanged += new System.EventHandler(this.checkBox_CheckedChanged);
129
+ //
130
+ // checkBoxLabel
131
+ //
132
+ this.checkBoxLabel.AutoSize = true;
133
+ this.checkBoxLabel.Location = new System.Drawing.Point(246, 133);
134
+ this.checkBoxLabel.Name = "checkBoxLabel";
135
+ this.checkBoxLabel.Size = new System.Drawing.Size(80, 13);
136
+ this.checkBoxLabel.TabIndex = 5;
137
+ this.checkBoxLabel.Text = "checkBox is off";
138
+ //
139
+ // groupBox1
140
+ //
141
+ this.groupBox1.Controls.Add(this.radioButtonDisabled);
142
+ this.groupBox1.Controls.Add(this.radioButtonReset);
143
+ this.groupBox1.Controls.Add(this.radioButtonLabel);
144
+ this.groupBox1.Controls.Add(this.radioButton2);
145
+ this.groupBox1.Controls.Add(this.radioButton1);
146
+ this.groupBox1.Location = new System.Drawing.Point(142, 163);
147
+ this.groupBox1.Name = "groupBox1";
148
+ this.groupBox1.Size = new System.Drawing.Size(325, 89);
149
+ this.groupBox1.TabIndex = 6;
150
+ this.groupBox1.TabStop = false;
151
+ this.groupBox1.Text = "Groupd of radio buttons";
152
+ //
153
+ // radioButtonDisabled
154
+ //
155
+ this.radioButtonDisabled.AutoSize = true;
156
+ this.radioButtonDisabled.Enabled = false;
157
+ this.radioButtonDisabled.FlatStyle = System.Windows.Forms.FlatStyle.System;
158
+ this.radioButtonDisabled.Location = new System.Drawing.Point(188, 28);
159
+ this.radioButtonDisabled.Name = "radioButtonDisabled";
160
+ this.radioButtonDisabled.Size = new System.Drawing.Size(106, 18);
161
+ this.radioButtonDisabled.TabIndex = 10;
162
+ this.radioButtonDisabled.TabStop = true;
163
+ this.radioButtonDisabled.Text = "Option Disabled";
164
+ this.radioButtonDisabled.UseVisualStyleBackColor = true;
165
+ //
166
+ // radioButtonReset
167
+ //
168
+ this.radioButtonReset.Location = new System.Drawing.Point(143, 56);
169
+ this.radioButtonReset.Name = "radioButtonReset";
170
+ this.radioButtonReset.Size = new System.Drawing.Size(75, 23);
171
+ this.radioButtonReset.TabIndex = 9;
172
+ this.radioButtonReset.Text = "Reset";
173
+ this.toolTip1.SetToolTip(this.radioButtonReset, "Some help text");
174
+ this.radioButtonReset.UseVisualStyleBackColor = true;
175
+ this.radioButtonReset.Click += new System.EventHandler(this.radioButtonReset_Click);
176
+ //
177
+ // radioButtonLabel
178
+ //
179
+ this.radioButtonLabel.AutoSize = true;
180
+ this.radioButtonLabel.Location = new System.Drawing.Point(6, 61);
181
+ this.radioButtonLabel.Name = "radioButtonLabel";
182
+ this.radioButtonLabel.Size = new System.Drawing.Size(96, 13);
183
+ this.radioButtonLabel.TabIndex = 2;
184
+ this.radioButtonLabel.Text = "No option selected";
185
+ //
186
+ // radioButton2
187
+ //
188
+ this.radioButton2.AutoSize = true;
189
+ this.radioButton2.FlatStyle = System.Windows.Forms.FlatStyle.System;
190
+ this.radioButton2.Location = new System.Drawing.Point(107, 28);
191
+ this.radioButton2.Name = "radioButton2";
192
+ this.radioButton2.Size = new System.Drawing.Size(71, 18);
193
+ this.radioButton2.TabIndex = 8;
194
+ this.radioButton2.TabStop = true;
195
+ this.radioButton2.Text = "Option 2";
196
+ this.radioButton2.UseVisualStyleBackColor = true;
197
+ this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
198
+ //
199
+ // radioButton1
200
+ //
201
+ this.radioButton1.AutoSize = true;
202
+ this.radioButton1.FlatStyle = System.Windows.Forms.FlatStyle.System;
203
+ this.radioButton1.Location = new System.Drawing.Point(9, 28);
204
+ this.radioButton1.Name = "radioButton1";
205
+ this.radioButton1.Size = new System.Drawing.Size(71, 18);
206
+ this.radioButton1.TabIndex = 7;
207
+ this.radioButton1.TabStop = true;
208
+ this.radioButton1.Text = "Option 1";
209
+ this.radioButton1.UseVisualStyleBackColor = true;
210
+ this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
211
+ //
212
+ // groupBox2
213
+ //
214
+ this.groupBox2.Controls.Add(this.comboBoxDisabled);
215
+ this.groupBox2.Controls.Add(this.fruitsLabel);
216
+ this.groupBox2.Controls.Add(this.FruitsComboBox);
217
+ this.groupBox2.Location = new System.Drawing.Point(142, 258);
218
+ this.groupBox2.Name = "groupBox2";
219
+ this.groupBox2.Size = new System.Drawing.Size(325, 63);
220
+ this.groupBox2.TabIndex = 7;
221
+ this.groupBox2.TabStop = false;
222
+ this.groupBox2.Text = "Drop down list";
223
+ //
224
+ // comboBoxDisabled
225
+ //
226
+ this.comboBoxDisabled.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
227
+ this.comboBoxDisabled.Enabled = false;
228
+ this.comboBoxDisabled.FormattingEnabled = true;
229
+ this.comboBoxDisabled.Items.AddRange(new object[] {
230
+ "Apple",
231
+ "Caimito",
232
+ "Coconut",
233
+ "Orange",
234
+ "Passion Fruit"});
235
+ this.comboBoxDisabled.Location = new System.Drawing.Point(235, 27);
236
+ this.comboBoxDisabled.Name = "comboBoxDisabled";
237
+ this.comboBoxDisabled.Size = new System.Drawing.Size(84, 21);
238
+ this.comboBoxDisabled.TabIndex = 11;
239
+ //
240
+ // fruitsLabel
241
+ //
242
+ this.fruitsLabel.AutoSize = true;
243
+ this.fruitsLabel.Location = new System.Drawing.Point(133, 30);
244
+ this.fruitsLabel.Name = "fruitsLabel";
245
+ this.fruitsLabel.Size = new System.Drawing.Size(35, 13);
246
+ this.fruitsLabel.TabIndex = 1;
247
+ this.fruitsLabel.Text = "label2";
248
+ //
249
+ // FruitsComboBox
250
+ //
251
+ this.FruitsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
252
+ this.FruitsComboBox.FormattingEnabled = true;
253
+ this.FruitsComboBox.Items.AddRange(new object[] {
254
+ "Apple",
255
+ "Caimito",
256
+ "Coconut",
257
+ "Orange",
258
+ "Passion Fruit"});
259
+ this.FruitsComboBox.Location = new System.Drawing.Point(6, 27);
260
+ this.FruitsComboBox.Name = "FruitsComboBox";
261
+ this.FruitsComboBox.Size = new System.Drawing.Size(121, 21);
262
+ this.FruitsComboBox.TabIndex = 10;
263
+ this.FruitsComboBox.SelectedIndexChanged += new System.EventHandler(this.FruitsComboBox_SelectedIndexChanged);
264
+ //
265
+ // nextFormButton
266
+ //
267
+ this.nextFormButton.Location = new System.Drawing.Point(12, 65);
268
+ this.nextFormButton.Name = "nextFormButton";
269
+ this.nextFormButton.Size = new System.Drawing.Size(95, 23);
270
+ this.nextFormButton.TabIndex = 2;
271
+ this.nextFormButton.Text = "Data Entry Form";
272
+ this.nextFormButton.UseVisualStyleBackColor = true;
273
+ this.nextFormButton.Click += new System.EventHandler(this.nextFormButton_Click);
274
+ //
275
+ // label2
276
+ //
277
+ this.label2.AutoSize = true;
278
+ this.label2.Location = new System.Drawing.Point(139, 41);
279
+ this.label2.Name = "label2";
280
+ this.label2.Size = new System.Drawing.Size(108, 13);
281
+ this.label2.TabIndex = 9;
282
+ this.label2.Text = "Assorted UI Elements";
283
+ //
284
+ // buttonButton
285
+ //
286
+ this.buttonButton.Location = new System.Drawing.Point(12, 94);
287
+ this.buttonButton.Name = "buttonButton";
288
+ this.buttonButton.Size = new System.Drawing.Size(95, 23);
289
+ this.buttonButton.TabIndex = 3;
290
+ this.buttonButton.Text = "Simple Elements";
291
+ this.buttonButton.UseVisualStyleBackColor = true;
292
+ this.buttonButton.Click += new System.EventHandler(this.buttonButton_Click);
293
+ //
294
+ // enabledButton
295
+ //
296
+ this.enabledButton.Location = new System.Drawing.Point(574, 54);
297
+ this.enabledButton.Name = "enabledButton";
298
+ this.enabledButton.Size = new System.Drawing.Size(75, 23);
299
+ this.enabledButton.TabIndex = 10;
300
+ this.enabledButton.Text = "Enabled";
301
+ this.enabledButton.UseVisualStyleBackColor = true;
302
+ //
303
+ // disabledButton
304
+ //
305
+ this.disabledButton.Enabled = false;
306
+ this.disabledButton.Location = new System.Drawing.Point(574, 96);
307
+ this.disabledButton.Name = "disabledButton";
308
+ this.disabledButton.Size = new System.Drawing.Size(75, 23);
309
+ this.disabledButton.TabIndex = 11;
310
+ this.disabledButton.Text = "Disabled";
311
+ this.disabledButton.UseVisualStyleBackColor = true;
312
+ //
313
+ // checkBoxDisabled
314
+ //
315
+ this.checkBoxDisabled.AutoSize = true;
316
+ this.checkBoxDisabled.Enabled = false;
317
+ this.checkBoxDisabled.FlatStyle = System.Windows.Forms.FlatStyle.System;
318
+ this.checkBoxDisabled.Location = new System.Drawing.Point(353, 129);
319
+ this.checkBoxDisabled.Name = "checkBoxDisabled";
320
+ this.checkBoxDisabled.Size = new System.Drawing.Size(121, 18);
321
+ this.checkBoxDisabled.TabIndex = 12;
322
+ this.checkBoxDisabled.Text = "checkBoxDisabled";
323
+ this.checkBoxDisabled.UseVisualStyleBackColor = true;
324
+ //
325
+ // textBoxDisabled
326
+ //
327
+ this.textBoxDisabled.Enabled = false;
328
+ this.textBoxDisabled.Location = new System.Drawing.Point(332, 96);
329
+ this.textBoxDisabled.Name = "textBoxDisabled";
330
+ this.textBoxDisabled.Size = new System.Drawing.Size(184, 20);
331
+ this.textBoxDisabled.TabIndex = 13;
332
+ //
333
+ // FruitListBox
334
+ //
335
+ this.FruitListBox.FormattingEnabled = true;
336
+ this.FruitListBox.Items.AddRange(new object[] {
337
+ "Apple",
338
+ "Orange",
339
+ "Mango"});
340
+ this.FruitListBox.Location = new System.Drawing.Point(490, 163);
341
+ this.FruitListBox.Name = "FruitListBox";
342
+ this.FruitListBox.Size = new System.Drawing.Size(159, 95);
343
+ this.FruitListBox.TabIndex = 14;
344
+ this.FruitListBox.SelectedIndexChanged += new System.EventHandler(this.FruitListBox_SelectedIndexChanged);
345
+ //
346
+ // menuStrip1
347
+ //
348
+ this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
349
+ this.faileToolStripMenuItem});
350
+ this.menuStrip1.Location = new System.Drawing.Point(0, 0);
351
+ this.menuStrip1.Name = "menuStrip1";
352
+ this.menuStrip1.Size = new System.Drawing.Size(657, 24);
353
+ this.menuStrip1.TabIndex = 15;
354
+ this.menuStrip1.Text = "menuStrip1";
355
+ //
356
+ // faileToolStripMenuItem
357
+ //
358
+ this.faileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
359
+ this.aboutToolStripMenuItem,
360
+ this.roundaboutWayToolStripMenuItem,
361
+ this.addSomeFruitsToolStripMenuItem});
362
+ this.faileToolStripMenuItem.Name = "faileToolStripMenuItem";
363
+ this.faileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
364
+ this.faileToolStripMenuItem.Text = "&File";
365
+ //
366
+ // aboutToolStripMenuItem
367
+ //
368
+ this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
369
+ this.aboutToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
370
+ this.aboutToolStripMenuItem.Text = "&About";
371
+ this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutButton_Click);
372
+ //
373
+ // roundaboutWayToolStripMenuItem
374
+ //
375
+ this.roundaboutWayToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
376
+ this.toToolStripMenuItem});
377
+ this.roundaboutWayToolStripMenuItem.Name = "roundaboutWayToolStripMenuItem";
378
+ this.roundaboutWayToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
379
+ this.roundaboutWayToolStripMenuItem.Text = "Roundabout Way";
380
+ //
381
+ // toToolStripMenuItem
382
+ //
383
+ this.toToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
384
+ this.aboutToolStripMenuItem1});
385
+ this.toToolStripMenuItem.Name = "toToolStripMenuItem";
386
+ this.toToolStripMenuItem.Size = new System.Drawing.Size(88, 22);
387
+ this.toToolStripMenuItem.Text = "To";
388
+ //
389
+ // aboutToolStripMenuItem1
390
+ //
391
+ this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
392
+ this.aboutToolStripMenuItem1.Size = new System.Drawing.Size(107, 22);
393
+ this.aboutToolStripMenuItem1.Text = "&About";
394
+ this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutButton_Click);
395
+ //
396
+ // treeView
397
+ //
398
+ this.treeView.Location = new System.Drawing.Point(490, 285);
399
+ this.treeView.Name = "treeView";
400
+ treeNode1.Name = "Child 1";
401
+ treeNode1.Text = "Child 1";
402
+ treeNode2.Name = "Grandchild 1";
403
+ treeNode2.Text = "Grandchild 1";
404
+ treeNode3.Name = "Child 2";
405
+ treeNode3.Text = "Child 2";
406
+ treeNode4.Name = "Parent One";
407
+ treeNode4.Text = "Parent One";
408
+ treeNode5.Name = "Parent Two";
409
+ treeNode5.Text = "Parent Two";
410
+ this.treeView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
411
+ treeNode4,
412
+ treeNode5});
413
+ this.treeView.Size = new System.Drawing.Size(159, 177);
414
+ this.treeView.TabIndex = 16;
415
+ //
416
+ // multiLineTextField
417
+ //
418
+ this.multiLineTextField.Location = new System.Drawing.Point(142, 339);
419
+ this.multiLineTextField.Multiline = true;
420
+ this.multiLineTextField.Name = "multiLineTextField";
421
+ this.multiLineTextField.Size = new System.Drawing.Size(325, 123);
422
+ this.multiLineTextField.TabIndex = 5;
423
+ //
424
+ // buttonDataGridView
425
+ //
426
+ this.buttonDataGridView.Location = new System.Drawing.Point(12, 152);
427
+ this.buttonDataGridView.Name = "buttonDataGridView";
428
+ this.buttonDataGridView.Size = new System.Drawing.Size(95, 23);
429
+ this.buttonDataGridView.TabIndex = 18;
430
+ this.buttonDataGridView.Text = "Data Grid View";
431
+ this.buttonDataGridView.UseVisualStyleBackColor = true;
432
+ this.buttonDataGridView.Click += new System.EventHandler(this.buttonDataGridView_Click);
433
+ //
434
+ // automatableMonthCalendar1
435
+ //
436
+ this.automatableMonthCalendar1.Location = new System.Drawing.Point(142, 477);
437
+ this.automatableMonthCalendar1.Name = "automatableMonthCalendar1";
438
+ this.automatableMonthCalendar1.TabIndex = 19;
439
+ //
440
+ // addSomeFruitsToolStripMenuItem
441
+ //
442
+ this.addSomeFruitsToolStripMenuItem.Name = "addSomeFruitsToolStripMenuItem";
443
+ this.addSomeFruitsToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
444
+ this.addSomeFruitsToolStripMenuItem.Text = "Add Some Fruits";
445
+ this.addSomeFruitsToolStripMenuItem.Click += new System.EventHandler(this.addSomeFruitsToolStripMenuItem_Click);
446
+ //
447
+ // MainFormWindow
448
+ //
449
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
450
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
451
+ this.ClientSize = new System.Drawing.Size(657, 657);
452
+ this.Controls.Add(this.automatableMonthCalendar1);
453
+ this.Controls.Add(this.buttonDataGridView);
454
+ this.Controls.Add(this.multiLineTextField);
455
+ this.Controls.Add(this.treeView);
456
+ this.Controls.Add(this.FruitListBox);
457
+ this.Controls.Add(this.textBoxDisabled);
458
+ this.Controls.Add(this.checkBoxDisabled);
459
+ this.Controls.Add(this.disabledButton);
460
+ this.Controls.Add(this.enabledButton);
461
+ this.Controls.Add(this.buttonButton);
462
+ this.Controls.Add(this.label2);
463
+ this.Controls.Add(this.nextFormButton);
464
+ this.Controls.Add(this.groupBox2);
465
+ this.Controls.Add(this.groupBox1);
466
+ this.Controls.Add(this.checkBoxLabel);
467
+ this.Controls.Add(this.checkBox);
468
+ this.Controls.Add(this.textField);
469
+ this.Controls.Add(this.button1);
470
+ this.Controls.Add(this.aboutButton);
471
+ this.Controls.Add(this.label1);
472
+ this.Controls.Add(this.menuStrip1);
473
+ this.MainMenuStrip = this.menuStrip1;
474
+ this.Name = "MainFormWindow";
475
+ this.Text = "MainFormWindow";
476
+ this.groupBox1.ResumeLayout(false);
477
+ this.groupBox1.PerformLayout();
478
+ this.groupBox2.ResumeLayout(false);
479
+ this.groupBox2.PerformLayout();
480
+ this.menuStrip1.ResumeLayout(false);
481
+ this.menuStrip1.PerformLayout();
482
+ this.ResumeLayout(false);
483
+ this.PerformLayout();
484
+
485
+ }
486
+
487
+ #endregion
488
+
489
+ private System.Windows.Forms.Label label1;
490
+ private System.Windows.Forms.Button aboutButton;
491
+ private System.Windows.Forms.Button button1;
492
+ private System.Windows.Forms.TextBox textField;
493
+ private System.Windows.Forms.CheckBox checkBox;
494
+ private System.Windows.Forms.Label checkBoxLabel;
495
+ private System.Windows.Forms.GroupBox groupBox1;
496
+ private System.Windows.Forms.Label radioButtonLabel;
497
+ private System.Windows.Forms.RadioButton radioButton2;
498
+ private System.Windows.Forms.RadioButton radioButton1;
499
+ private System.Windows.Forms.Button radioButtonReset;
500
+ private System.Windows.Forms.GroupBox groupBox2;
501
+ private System.Windows.Forms.ComboBox FruitsComboBox;
502
+ private System.Windows.Forms.Label fruitsLabel;
503
+ private System.Windows.Forms.Button nextFormButton;
504
+ private System.Windows.Forms.Label label2;
505
+ private System.Windows.Forms.Button buttonButton;
506
+ private System.Windows.Forms.Button enabledButton;
507
+ private System.Windows.Forms.Button disabledButton;
508
+ private System.Windows.Forms.CheckBox checkBoxDisabled;
509
+ private System.Windows.Forms.RadioButton radioButtonDisabled;
510
+ private System.Windows.Forms.TextBox textBoxDisabled;
511
+ private System.Windows.Forms.ComboBox comboBoxDisabled;
512
+ private System.Windows.Forms.ListBox FruitListBox;
513
+ private System.Windows.Forms.MenuStrip menuStrip1;
514
+ private System.Windows.Forms.ToolStripMenuItem faileToolStripMenuItem;
515
+ private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
516
+ private System.Windows.Forms.ToolStripMenuItem roundaboutWayToolStripMenuItem;
517
+ private System.Windows.Forms.ToolStripMenuItem toToolStripMenuItem;
518
+ private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem1;
519
+ private System.Windows.Forms.TreeView treeView;
520
+ private System.Windows.Forms.TextBox multiLineTextField;
521
+ private System.Windows.Forms.Button buttonDataGridView;
522
+ private System.Windows.Forms.MonthCalendar automatableMonthCalendar1;
523
+ private System.Windows.Forms.ToolTip toolTip1;
524
+ private System.Windows.Forms.ToolStripMenuItem addSomeFruitsToolStripMenuItem;
525
+ }
526
+ }
527
+
@@ -0,0 +1,109 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using System.Linq;
4
+ using System.Windows.Forms;
5
+ using UIA.Extensions;
6
+
7
+ namespace WindowsForms
8
+ {
9
+ public partial class MainFormWindow : Form
10
+ {
11
+ public MainFormWindow()
12
+ {
13
+ InitializeComponent();
14
+ automatableMonthCalendar1.AsValueControl<ValueMonthCalendar>();
15
+ }
16
+
17
+ private void label1_Click(object sender, EventArgs e)
18
+ {
19
+
20
+ }
21
+
22
+ private void aboutButton_Click(object sender, EventArgs e)
23
+ {
24
+ var aboutBox = new AboutBox();
25
+ aboutBox.Show();
26
+ }
27
+
28
+ private void button1_Click(object sender, EventArgs e)
29
+ {
30
+ Close();
31
+ }
32
+
33
+ private void checkBox_CheckedChanged(object sender, EventArgs e)
34
+ {
35
+ checkBoxLabel.Text = checkBox.Checked ? "checkBox is on" : "checkBox is off";
36
+ }
37
+
38
+ private void radioButton1_CheckedChanged(object sender, EventArgs e)
39
+ {
40
+ radioButtonLabel.Text = "Option 1 selected";
41
+ }
42
+
43
+ private void radioButton2_CheckedChanged(object sender, EventArgs e)
44
+ {
45
+ radioButtonLabel.Text = "Option 2 selected";
46
+ }
47
+
48
+ private void radioButtonReset_Click(object sender, EventArgs e)
49
+ {
50
+ radioButton1.Checked = false;
51
+ radioButton2.Checked = false;
52
+ radioButtonLabel.Text = "No option selected";
53
+ }
54
+
55
+ private void FruitsComboBox_SelectedIndexChanged(object sender, EventArgs e)
56
+ {
57
+ fruitsLabel.Text = FruitsComboBox.Text;
58
+ }
59
+
60
+ private void nextFormButton_Click(object sender, EventArgs e)
61
+ {
62
+ var form = new DataEntryForm();
63
+ form.Show();
64
+ }
65
+
66
+ private void buttonButton_Click(object sender, EventArgs e)
67
+ {
68
+ var buttonForm = new SimpleElementsForm();
69
+ buttonForm.Show();
70
+ }
71
+
72
+ private void buttonDataGridView_Click(object sender, EventArgs e)
73
+ {
74
+ new DataGridView().Show();
75
+ }
76
+
77
+ private void FruitListBox_SelectedIndexChanged(object sender, EventArgs e)
78
+ {
79
+ var selectedFruits = (FruitListBox.SelectedItems.Cast<object>().Select(item => item.ToString()));
80
+ fruitsLabel.Text = String.Join(",", selectedFruits);
81
+ }
82
+
83
+ private void addSomeFruitsToolStripMenuItem_Click(object sender, EventArgs e)
84
+ {
85
+ 10.Times(AddAnotherFruit);
86
+ }
87
+
88
+ private void AddAnotherFruit(int fruitNumber)
89
+ {
90
+ FruitListBox.Items.Add("Fruit " + fruitNumber);
91
+ }
92
+ }
93
+
94
+ static class EnumerableExtensions
95
+ {
96
+ public static void ForEach<T>(this IEnumerable<T> items, Action<T> doIt)
97
+ {
98
+ foreach (var item in items)
99
+ {
100
+ doIt(item);
101
+ }
102
+ }
103
+
104
+ public static void Times(this int howMany, Action<int> doIt)
105
+ {
106
+ Enumerable.Range(0, howMany).ForEach(doIt);
107
+ }
108
+ }
109
+ }