mohawk 0.0.2 → 0.0.3

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 (83) hide show
  1. data/.gitignore +24 -17
  2. data/.travis.yml +2 -0
  3. data/Changelog +36 -20
  4. data/Gemfile +3 -3
  5. data/Guardfile +16 -0
  6. data/LICENSE.txt +21 -21
  7. data/README.md +60 -56
  8. data/Rakefile +18 -18
  9. data/features/control.feature +5 -0
  10. data/features/label.feature +4 -4
  11. data/features/link.feature +9 -0
  12. data/features/mohawk.feature +4 -1
  13. data/features/navigation.feature +9 -0
  14. data/features/step_definitions/control_steps.rb +3 -0
  15. data/features/step_definitions/label_steps.rb +3 -3
  16. data/features/step_definitions/link_steps.rb +3 -0
  17. data/features/step_definitions/mohawk_steps.rb +4 -0
  18. data/features/step_definitions/navigation_steps.rb +15 -0
  19. data/features/step_definitions/table_steps.rb +19 -3
  20. data/features/step_definitions/tree_view_steps.rb +4 -0
  21. data/features/support/WindowsForms.exe +0 -0
  22. data/features/support/app/WindowsForms/WindowsForms/AboutBox.Designer.cs +80 -0
  23. data/features/support/app/WindowsForms/WindowsForms/AboutBox.cs +103 -0
  24. data/features/support/app/WindowsForms/WindowsForms/AboutBox.resx +120 -0
  25. data/features/support/app/WindowsForms/WindowsForms/AutomatableMonthCalendar.cs +59 -0
  26. data/features/support/app/WindowsForms/WindowsForms/AutomationHelpers/AutomationProvider.cs +91 -0
  27. data/features/support/app/WindowsForms/WindowsForms/DataEntryForm.Designer.cs +187 -0
  28. data/features/support/app/WindowsForms/WindowsForms/DataEntryForm.cs +46 -0
  29. data/features/support/app/WindowsForms/WindowsForms/DataEntryForm.resx +120 -0
  30. data/features/support/app/WindowsForms/WindowsForms/MainFormWindow.Designer.cs +526 -0
  31. data/features/support/app/WindowsForms/WindowsForms/MainFormWindow.cs +93 -0
  32. data/features/support/app/WindowsForms/WindowsForms/MainFormWindow.resx +123 -0
  33. data/features/support/app/WindowsForms/WindowsForms/PersonForm.Designer.cs +119 -0
  34. data/features/support/app/WindowsForms/WindowsForms/PersonForm.cs +34 -0
  35. data/features/support/app/WindowsForms/WindowsForms/PersonForm.resx +120 -0
  36. data/features/support/app/WindowsForms/WindowsForms/Program.cs +21 -0
  37. data/features/support/app/WindowsForms/WindowsForms/Properties/AssemblyInfo.cs +36 -0
  38. data/features/support/app/WindowsForms/WindowsForms/Properties/Resources.Designer.cs +71 -0
  39. data/features/support/app/WindowsForms/WindowsForms/Properties/Resources.resx +117 -0
  40. data/features/support/app/WindowsForms/WindowsForms/Properties/Settings.Designer.cs +30 -0
  41. data/features/support/app/WindowsForms/WindowsForms/Properties/Settings.settings +7 -0
  42. data/features/support/app/WindowsForms/WindowsForms/SimpleElementsForm.Designer.cs +93 -0
  43. data/features/support/app/WindowsForms/WindowsForms/SimpleElementsForm.cs +19 -0
  44. data/features/support/app/WindowsForms/WindowsForms/SimpleElementsForm.resx +120 -0
  45. data/features/support/app/WindowsForms/WindowsForms/WindowsForms.csproj +132 -0
  46. data/features/support/app/WindowsForms/WindowsForms.sln +30 -0
  47. data/features/support/env.rb +28 -17
  48. data/features/support/screens/about_screen.rb +7 -0
  49. data/features/support/screens/data_entry_form.rb +5 -0
  50. data/features/support/screens/main_screen.rb +3 -0
  51. data/features/table.feature +14 -0
  52. data/features/tree_view.feature +3 -0
  53. data/lib/mohawk/accessors/button.rb +6 -4
  54. data/lib/mohawk/accessors/checkbox.rb +7 -5
  55. data/lib/mohawk/accessors/combo.rb +7 -5
  56. data/lib/mohawk/accessors/control.rb +23 -0
  57. data/lib/mohawk/accessors/label.rb +15 -13
  58. data/lib/mohawk/accessors/link.rb +9 -0
  59. data/lib/mohawk/accessors/radio.rb +5 -3
  60. data/lib/mohawk/accessors/table.rb +12 -31
  61. data/lib/mohawk/accessors/table_row.rb +43 -0
  62. data/lib/mohawk/accessors/text.rb +7 -5
  63. data/lib/mohawk/accessors/tree_view.rb +9 -7
  64. data/lib/mohawk/accessors.rb +66 -7
  65. data/lib/mohawk/adapters/uia_adapter.rb +8 -0
  66. data/lib/mohawk/core_ext/string.rb +5 -0
  67. data/lib/mohawk/navigation.rb +6 -2
  68. data/lib/mohawk/version.rb +3 -3
  69. data/lib/mohawk.rb +76 -69
  70. data/mohawk.gemspec +32 -26
  71. data/spec/lib/mohawk/accessors/button_spec.rb +4 -0
  72. data/spec/lib/mohawk/accessors/checkbox_spec.rb +4 -1
  73. data/spec/lib/mohawk/accessors/combo_spec.rb +3 -0
  74. data/spec/lib/mohawk/accessors/control_spec.rb +38 -0
  75. data/spec/lib/mohawk/accessors/label_spec.rb +29 -25
  76. data/spec/lib/mohawk/accessors/link_spec.rb +34 -0
  77. data/spec/lib/mohawk/accessors/radio_spec.rb +4 -0
  78. data/spec/lib/mohawk/accessors/table_spec.rb +52 -7
  79. data/spec/lib/mohawk/accessors/text_spec.rb +4 -0
  80. data/spec/lib/mohawk/accessors/tree_view_spec.rb +5 -0
  81. data/spec/lib/mohawk_spec.rb +19 -0
  82. data/spec/lib/navigation_spec.rb +5 -0
  83. metadata +175 -6
@@ -0,0 +1,526 @@
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
+ System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Child 1");
32
+ System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Grandchild 1");
33
+ System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("Child 2", new System.Windows.Forms.TreeNode[] {
34
+ treeNode2});
35
+ System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("Parent One", new System.Windows.Forms.TreeNode[] {
36
+ treeNode1,
37
+ treeNode3});
38
+ System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("Parent Two");
39
+ this.label1 = new System.Windows.Forms.Label();
40
+ this.aboutButton = new System.Windows.Forms.Button();
41
+ this.button1 = new System.Windows.Forms.Button();
42
+ this.textField = new System.Windows.Forms.TextBox();
43
+ this.checkBox = new System.Windows.Forms.CheckBox();
44
+ this.checkBoxLabel = new System.Windows.Forms.Label();
45
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
46
+ this.radioButtonDisabled = new System.Windows.Forms.RadioButton();
47
+ this.radioButtonReset = new System.Windows.Forms.Button();
48
+ this.radioButtonLabel = new System.Windows.Forms.Label();
49
+ this.radioButton2 = new System.Windows.Forms.RadioButton();
50
+ this.radioButton1 = new System.Windows.Forms.RadioButton();
51
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
52
+ this.comboBoxDisabled = new System.Windows.Forms.ComboBox();
53
+ this.fruitsLabel = new System.Windows.Forms.Label();
54
+ this.FruitsComboBox = new System.Windows.Forms.ComboBox();
55
+ this.nextFormButton = new System.Windows.Forms.Button();
56
+ this.label2 = new System.Windows.Forms.Label();
57
+ this.buttonButton = new System.Windows.Forms.Button();
58
+ this.enabledButton = new System.Windows.Forms.Button();
59
+ this.disabledButton = new System.Windows.Forms.Button();
60
+ this.checkBoxDisabled = new System.Windows.Forms.CheckBox();
61
+ this.textBoxDisabled = new System.Windows.Forms.TextBox();
62
+ this.FruitListBox = new System.Windows.Forms.ListBox();
63
+ this.menuStrip1 = new System.Windows.Forms.MenuStrip();
64
+ this.faileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
65
+ this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
66
+ this.roundaboutWayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
67
+ this.toToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
68
+ this.aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
69
+ this.treeView = new System.Windows.Forms.TreeView();
70
+ this.multiLineTextField = new System.Windows.Forms.TextBox();
71
+ this.linkLabel1 = new System.Windows.Forms.LinkLabel();
72
+ this.maskedTextBox = new System.Windows.Forms.MaskedTextBox();
73
+ this.automatableMonthCalendar1 = new WindowsForms.AutomatableMonthCalendar();
74
+ this.groupBox1.SuspendLayout();
75
+ this.groupBox2.SuspendLayout();
76
+ this.menuStrip1.SuspendLayout();
77
+ this.SuspendLayout();
78
+ //
79
+ // label1
80
+ //
81
+ this.label1.AutoSize = true;
82
+ this.label1.Location = new System.Drawing.Point(139, 65);
83
+ this.label1.Name = "label1";
84
+ this.label1.Size = new System.Drawing.Size(102, 13);
85
+ this.label1.TabIndex = 0;
86
+ this.label1.Text = "This is a sample text";
87
+ this.label1.Click += new System.EventHandler(this.label1_Click);
88
+ //
89
+ // aboutButton
90
+ //
91
+ this.aboutButton.Location = new System.Drawing.Point(12, 36);
92
+ this.aboutButton.Name = "aboutButton";
93
+ this.aboutButton.Size = new System.Drawing.Size(95, 23);
94
+ this.aboutButton.TabIndex = 1;
95
+ this.aboutButton.Text = "&About";
96
+ this.aboutButton.UseVisualStyleBackColor = true;
97
+ this.aboutButton.Click += new System.EventHandler(this.aboutButton_Click);
98
+ //
99
+ // button1
100
+ //
101
+ this.button1.Location = new System.Drawing.Point(12, 123);
102
+ this.button1.Name = "button1";
103
+ this.button1.Size = new System.Drawing.Size(95, 23);
104
+ this.button1.TabIndex = 4;
105
+ this.button1.Text = "Close";
106
+ this.button1.UseVisualStyleBackColor = true;
107
+ this.button1.Click += new System.EventHandler(this.button1_Click);
108
+ //
109
+ // textField
110
+ //
111
+ this.textField.Location = new System.Drawing.Point(142, 96);
112
+ this.textField.Name = "textField";
113
+ this.textField.Size = new System.Drawing.Size(184, 20);
114
+ this.textField.TabIndex = 5;
115
+ //
116
+ // checkBox
117
+ //
118
+ this.checkBox.AutoSize = true;
119
+ this.checkBox.FlatStyle = System.Windows.Forms.FlatStyle.System;
120
+ this.checkBox.Location = new System.Drawing.Point(142, 132);
121
+ this.checkBox.Name = "checkBox";
122
+ this.checkBox.Size = new System.Drawing.Size(80, 18);
123
+ this.checkBox.TabIndex = 6;
124
+ this.checkBox.Text = "checkBox";
125
+ this.checkBox.UseVisualStyleBackColor = true;
126
+ this.checkBox.CheckedChanged += new System.EventHandler(this.checkBox_CheckedChanged);
127
+ //
128
+ // checkBoxLabel
129
+ //
130
+ this.checkBoxLabel.AutoSize = true;
131
+ this.checkBoxLabel.Location = new System.Drawing.Point(246, 133);
132
+ this.checkBoxLabel.Name = "checkBoxLabel";
133
+ this.checkBoxLabel.Size = new System.Drawing.Size(80, 13);
134
+ this.checkBoxLabel.TabIndex = 5;
135
+ this.checkBoxLabel.Text = "checkBox is off";
136
+ //
137
+ // groupBox1
138
+ //
139
+ this.groupBox1.Controls.Add(this.radioButtonDisabled);
140
+ this.groupBox1.Controls.Add(this.radioButtonReset);
141
+ this.groupBox1.Controls.Add(this.radioButtonLabel);
142
+ this.groupBox1.Controls.Add(this.radioButton2);
143
+ this.groupBox1.Controls.Add(this.radioButton1);
144
+ this.groupBox1.Location = new System.Drawing.Point(142, 163);
145
+ this.groupBox1.Name = "groupBox1";
146
+ this.groupBox1.Size = new System.Drawing.Size(325, 89);
147
+ this.groupBox1.TabIndex = 6;
148
+ this.groupBox1.TabStop = false;
149
+ this.groupBox1.Text = "Groupd of radio buttons";
150
+ //
151
+ // radioButtonDisabled
152
+ //
153
+ this.radioButtonDisabled.AutoSize = true;
154
+ this.radioButtonDisabled.Enabled = false;
155
+ this.radioButtonDisabled.FlatStyle = System.Windows.Forms.FlatStyle.System;
156
+ this.radioButtonDisabled.Location = new System.Drawing.Point(188, 28);
157
+ this.radioButtonDisabled.Name = "radioButtonDisabled";
158
+ this.radioButtonDisabled.Size = new System.Drawing.Size(106, 18);
159
+ this.radioButtonDisabled.TabIndex = 10;
160
+ this.radioButtonDisabled.TabStop = true;
161
+ this.radioButtonDisabled.Text = "Option Disabled";
162
+ this.radioButtonDisabled.UseVisualStyleBackColor = true;
163
+ //
164
+ // radioButtonReset
165
+ //
166
+ this.radioButtonReset.Location = new System.Drawing.Point(143, 56);
167
+ this.radioButtonReset.Name = "radioButtonReset";
168
+ this.radioButtonReset.Size = new System.Drawing.Size(75, 23);
169
+ this.radioButtonReset.TabIndex = 9;
170
+ this.radioButtonReset.Text = "Reset";
171
+ this.radioButtonReset.UseVisualStyleBackColor = true;
172
+ this.radioButtonReset.Click += new System.EventHandler(this.radioButtonReset_Click);
173
+ //
174
+ // radioButtonLabel
175
+ //
176
+ this.radioButtonLabel.AutoSize = true;
177
+ this.radioButtonLabel.Location = new System.Drawing.Point(6, 61);
178
+ this.radioButtonLabel.Name = "radioButtonLabel";
179
+ this.radioButtonLabel.Size = new System.Drawing.Size(96, 13);
180
+ this.radioButtonLabel.TabIndex = 2;
181
+ this.radioButtonLabel.Text = "No option selected";
182
+ //
183
+ // radioButton2
184
+ //
185
+ this.radioButton2.AutoSize = true;
186
+ this.radioButton2.FlatStyle = System.Windows.Forms.FlatStyle.System;
187
+ this.radioButton2.Location = new System.Drawing.Point(107, 28);
188
+ this.radioButton2.Name = "radioButton2";
189
+ this.radioButton2.Size = new System.Drawing.Size(71, 18);
190
+ this.radioButton2.TabIndex = 8;
191
+ this.radioButton2.TabStop = true;
192
+ this.radioButton2.Text = "Option 2";
193
+ this.radioButton2.UseVisualStyleBackColor = true;
194
+ this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
195
+ //
196
+ // radioButton1
197
+ //
198
+ this.radioButton1.AutoSize = true;
199
+ this.radioButton1.FlatStyle = System.Windows.Forms.FlatStyle.System;
200
+ this.radioButton1.Location = new System.Drawing.Point(9, 28);
201
+ this.radioButton1.Name = "radioButton1";
202
+ this.radioButton1.Size = new System.Drawing.Size(71, 18);
203
+ this.radioButton1.TabIndex = 7;
204
+ this.radioButton1.TabStop = true;
205
+ this.radioButton1.Text = "Option 1";
206
+ this.radioButton1.UseVisualStyleBackColor = true;
207
+ this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
208
+ //
209
+ // groupBox2
210
+ //
211
+ this.groupBox2.Controls.Add(this.comboBoxDisabled);
212
+ this.groupBox2.Controls.Add(this.fruitsLabel);
213
+ this.groupBox2.Controls.Add(this.FruitsComboBox);
214
+ this.groupBox2.Location = new System.Drawing.Point(142, 258);
215
+ this.groupBox2.Name = "groupBox2";
216
+ this.groupBox2.Size = new System.Drawing.Size(325, 63);
217
+ this.groupBox2.TabIndex = 7;
218
+ this.groupBox2.TabStop = false;
219
+ this.groupBox2.Text = "Drop down list";
220
+ //
221
+ // comboBoxDisabled
222
+ //
223
+ this.comboBoxDisabled.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
224
+ this.comboBoxDisabled.Enabled = false;
225
+ this.comboBoxDisabled.FormattingEnabled = true;
226
+ this.comboBoxDisabled.Items.AddRange(new object[] {
227
+ "Apple",
228
+ "Caimito",
229
+ "Coconut",
230
+ "Orange",
231
+ "Passion Fruit"});
232
+ this.comboBoxDisabled.Location = new System.Drawing.Point(235, 27);
233
+ this.comboBoxDisabled.Name = "comboBoxDisabled";
234
+ this.comboBoxDisabled.Size = new System.Drawing.Size(84, 21);
235
+ this.comboBoxDisabled.TabIndex = 11;
236
+ //
237
+ // fruitsLabel
238
+ //
239
+ this.fruitsLabel.AutoSize = true;
240
+ this.fruitsLabel.Location = new System.Drawing.Point(133, 30);
241
+ this.fruitsLabel.Name = "fruitsLabel";
242
+ this.fruitsLabel.Size = new System.Drawing.Size(35, 13);
243
+ this.fruitsLabel.TabIndex = 1;
244
+ this.fruitsLabel.Text = "label2";
245
+ //
246
+ // FruitsComboBox
247
+ //
248
+ this.FruitsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
249
+ this.FruitsComboBox.FormattingEnabled = true;
250
+ this.FruitsComboBox.Items.AddRange(new object[] {
251
+ "Apple",
252
+ "Caimito",
253
+ "Coconut",
254
+ "Orange",
255
+ "Passion Fruit"});
256
+ this.FruitsComboBox.Location = new System.Drawing.Point(6, 27);
257
+ this.FruitsComboBox.Name = "FruitsComboBox";
258
+ this.FruitsComboBox.Size = new System.Drawing.Size(121, 21);
259
+ this.FruitsComboBox.TabIndex = 10;
260
+ this.FruitsComboBox.SelectedIndexChanged += new System.EventHandler(this.FruitsComboBox_SelectedIndexChanged);
261
+ //
262
+ // nextFormButton
263
+ //
264
+ this.nextFormButton.Location = new System.Drawing.Point(12, 65);
265
+ this.nextFormButton.Name = "nextFormButton";
266
+ this.nextFormButton.Size = new System.Drawing.Size(95, 23);
267
+ this.nextFormButton.TabIndex = 2;
268
+ this.nextFormButton.Text = "Data Entry Form";
269
+ this.nextFormButton.UseVisualStyleBackColor = true;
270
+ this.nextFormButton.Click += new System.EventHandler(this.nextFormButton_Click);
271
+ //
272
+ // label2
273
+ //
274
+ this.label2.AutoSize = true;
275
+ this.label2.Location = new System.Drawing.Point(139, 41);
276
+ this.label2.Name = "label2";
277
+ this.label2.Size = new System.Drawing.Size(108, 13);
278
+ this.label2.TabIndex = 9;
279
+ this.label2.Text = "Assorted UI Elements";
280
+ //
281
+ // buttonButton
282
+ //
283
+ this.buttonButton.Location = new System.Drawing.Point(12, 94);
284
+ this.buttonButton.Name = "buttonButton";
285
+ this.buttonButton.Size = new System.Drawing.Size(95, 23);
286
+ this.buttonButton.TabIndex = 3;
287
+ this.buttonButton.Text = "Simple Elements";
288
+ this.buttonButton.UseVisualStyleBackColor = true;
289
+ this.buttonButton.Click += new System.EventHandler(this.buttonButton_Click);
290
+ //
291
+ // enabledButton
292
+ //
293
+ this.enabledButton.Location = new System.Drawing.Point(574, 54);
294
+ this.enabledButton.Name = "enabledButton";
295
+ this.enabledButton.Size = new System.Drawing.Size(75, 23);
296
+ this.enabledButton.TabIndex = 10;
297
+ this.enabledButton.Text = "Enabled";
298
+ this.enabledButton.UseVisualStyleBackColor = true;
299
+ //
300
+ // disabledButton
301
+ //
302
+ this.disabledButton.Enabled = false;
303
+ this.disabledButton.Location = new System.Drawing.Point(574, 96);
304
+ this.disabledButton.Name = "disabledButton";
305
+ this.disabledButton.Size = new System.Drawing.Size(75, 23);
306
+ this.disabledButton.TabIndex = 11;
307
+ this.disabledButton.Text = "Disabled";
308
+ this.disabledButton.UseVisualStyleBackColor = true;
309
+ //
310
+ // checkBoxDisabled
311
+ //
312
+ this.checkBoxDisabled.AutoSize = true;
313
+ this.checkBoxDisabled.Enabled = false;
314
+ this.checkBoxDisabled.FlatStyle = System.Windows.Forms.FlatStyle.System;
315
+ this.checkBoxDisabled.Location = new System.Drawing.Point(353, 129);
316
+ this.checkBoxDisabled.Name = "checkBoxDisabled";
317
+ this.checkBoxDisabled.Size = new System.Drawing.Size(121, 18);
318
+ this.checkBoxDisabled.TabIndex = 12;
319
+ this.checkBoxDisabled.Text = "checkBoxDisabled";
320
+ this.checkBoxDisabled.UseVisualStyleBackColor = true;
321
+ //
322
+ // textBoxDisabled
323
+ //
324
+ this.textBoxDisabled.Enabled = false;
325
+ this.textBoxDisabled.Location = new System.Drawing.Point(332, 96);
326
+ this.textBoxDisabled.Name = "textBoxDisabled";
327
+ this.textBoxDisabled.Size = new System.Drawing.Size(184, 20);
328
+ this.textBoxDisabled.TabIndex = 13;
329
+ //
330
+ // FruitListBox
331
+ //
332
+ this.FruitListBox.FormattingEnabled = true;
333
+ this.FruitListBox.Items.AddRange(new object[] {
334
+ "Apple",
335
+ "Orange",
336
+ "Mango"});
337
+ this.FruitListBox.Location = new System.Drawing.Point(490, 163);
338
+ this.FruitListBox.Name = "FruitListBox";
339
+ this.FruitListBox.Size = new System.Drawing.Size(159, 95);
340
+ this.FruitListBox.TabIndex = 14;
341
+ //
342
+ // menuStrip1
343
+ //
344
+ this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
345
+ this.faileToolStripMenuItem});
346
+ this.menuStrip1.Location = new System.Drawing.Point(0, 0);
347
+ this.menuStrip1.Name = "menuStrip1";
348
+ this.menuStrip1.Size = new System.Drawing.Size(657, 24);
349
+ this.menuStrip1.TabIndex = 15;
350
+ this.menuStrip1.Text = "menuStrip1";
351
+ //
352
+ // faileToolStripMenuItem
353
+ //
354
+ this.faileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
355
+ this.aboutToolStripMenuItem,
356
+ this.roundaboutWayToolStripMenuItem});
357
+ this.faileToolStripMenuItem.Name = "faileToolStripMenuItem";
358
+ this.faileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
359
+ this.faileToolStripMenuItem.Text = "&File";
360
+ //
361
+ // aboutToolStripMenuItem
362
+ //
363
+ this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
364
+ this.aboutToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
365
+ this.aboutToolStripMenuItem.Text = "&About";
366
+ this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutButton_Click);
367
+ //
368
+ // roundaboutWayToolStripMenuItem
369
+ //
370
+ this.roundaboutWayToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
371
+ this.toToolStripMenuItem});
372
+ this.roundaboutWayToolStripMenuItem.Name = "roundaboutWayToolStripMenuItem";
373
+ this.roundaboutWayToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
374
+ this.roundaboutWayToolStripMenuItem.Text = "Roundabout Way";
375
+ //
376
+ // toToolStripMenuItem
377
+ //
378
+ this.toToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
379
+ this.aboutToolStripMenuItem1});
380
+ this.toToolStripMenuItem.Name = "toToolStripMenuItem";
381
+ this.toToolStripMenuItem.Size = new System.Drawing.Size(88, 22);
382
+ this.toToolStripMenuItem.Text = "To";
383
+ //
384
+ // aboutToolStripMenuItem1
385
+ //
386
+ this.aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
387
+ this.aboutToolStripMenuItem1.Size = new System.Drawing.Size(107, 22);
388
+ this.aboutToolStripMenuItem1.Text = "&About";
389
+ this.aboutToolStripMenuItem1.Click += new System.EventHandler(this.aboutButton_Click);
390
+ //
391
+ // treeView
392
+ //
393
+ this.treeView.Location = new System.Drawing.Point(490, 285);
394
+ this.treeView.Name = "treeView";
395
+ treeNode1.Name = "Child 1";
396
+ treeNode1.Text = "Child 1";
397
+ treeNode2.Name = "Grandchild 1";
398
+ treeNode2.Text = "Grandchild 1";
399
+ treeNode3.Name = "Child 2";
400
+ treeNode3.Text = "Child 2";
401
+ treeNode4.Name = "Parent One";
402
+ treeNode4.Text = "Parent One";
403
+ treeNode5.Name = "Parent Two";
404
+ treeNode5.Text = "Parent Two";
405
+ this.treeView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
406
+ treeNode4,
407
+ treeNode5});
408
+ this.treeView.Size = new System.Drawing.Size(159, 177);
409
+ this.treeView.TabIndex = 16;
410
+ //
411
+ // multiLineTextField
412
+ //
413
+ this.multiLineTextField.Location = new System.Drawing.Point(142, 339);
414
+ this.multiLineTextField.Multiline = true;
415
+ this.multiLineTextField.Name = "multiLineTextField";
416
+ this.multiLineTextField.Size = new System.Drawing.Size(325, 90);
417
+ this.multiLineTextField.TabIndex = 5;
418
+ //
419
+ // linkLabel1
420
+ //
421
+ this.linkLabel1.AutoSize = true;
422
+ this.linkLabel1.Location = new System.Drawing.Point(304, 41);
423
+ this.linkLabel1.Name = "linkLabel1";
424
+ this.linkLabel1.Size = new System.Drawing.Size(55, 13);
425
+ this.linkLabel1.TabIndex = 18;
426
+ this.linkLabel1.TabStop = true;
427
+ this.linkLabel1.Text = "linkLabel1";
428
+ this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
429
+ //
430
+ // maskedTextBox
431
+ //
432
+ this.maskedTextBox.Location = new System.Drawing.Point(141, 442);
433
+ this.maskedTextBox.Mask = "000-00-0000";
434
+ this.maskedTextBox.Name = "maskedTextBox";
435
+ this.maskedTextBox.Size = new System.Drawing.Size(81, 20);
436
+ this.maskedTextBox.TabIndex = 19;
437
+ //
438
+ // automatableMonthCalendar1
439
+ //
440
+ this.automatableMonthCalendar1.Location = new System.Drawing.Point(142, 474);
441
+ this.automatableMonthCalendar1.MaxSelectionCount = 1;
442
+ this.automatableMonthCalendar1.Name = "automatableMonthCalendar1";
443
+ this.automatableMonthCalendar1.TabIndex = 17;
444
+ this.automatableMonthCalendar1.DateChanged += new System.Windows.Forms.DateRangeEventHandler(this.automatableMonthCalendar1_DateChanged);
445
+ //
446
+ // MainFormWindow
447
+ //
448
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
449
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
450
+ this.ClientSize = new System.Drawing.Size(657, 657);
451
+ this.Controls.Add(this.maskedTextBox);
452
+ this.Controls.Add(this.linkLabel1);
453
+ this.Controls.Add(this.automatableMonthCalendar1);
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 AutomatableMonthCalendar automatableMonthCalendar1;
522
+ private System.Windows.Forms.LinkLabel linkLabel1;
523
+ private System.Windows.Forms.MaskedTextBox maskedTextBox;
524
+ }
525
+ }
526
+
@@ -0,0 +1,93 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using System.ComponentModel;
4
+ using System.Data;
5
+ using System.Drawing;
6
+ using System.Linq;
7
+ using System.Text;
8
+ using System.Windows.Forms;
9
+
10
+ namespace WindowsForms
11
+ {
12
+ public partial class MainFormWindow : Form
13
+ {
14
+ public MainFormWindow()
15
+ {
16
+ InitializeComponent();
17
+ }
18
+
19
+ private void label1_Click(object sender, EventArgs e)
20
+ {
21
+
22
+ }
23
+
24
+ private void aboutButton_Click(object sender, EventArgs e)
25
+ {
26
+ AboutBox aboutBox = new AboutBox();
27
+ aboutBox.Show();
28
+ }
29
+
30
+ private void button1_Click(object sender, EventArgs e)
31
+ {
32
+ this.Close();
33
+ }
34
+
35
+ private void checkBox_CheckedChanged(object sender, EventArgs e)
36
+ {
37
+ if (checkBox.Checked == true)
38
+ checkBoxLabel.Text = "checkBox is on";
39
+ else
40
+ checkBoxLabel.Text = "checkBox is off";
41
+ }
42
+
43
+ private void radioButton1_CheckedChanged(object sender, EventArgs e)
44
+ {
45
+ radioButtonLabel.Text = "Option 1 selected";
46
+ }
47
+
48
+ private void radioButton2_CheckedChanged(object sender, EventArgs e)
49
+ {
50
+ radioButtonLabel.Text = "Option 2 selected";
51
+ }
52
+
53
+ private void radioButtonReset_Click(object sender, EventArgs e)
54
+ {
55
+ radioButton1.Checked = false;
56
+ radioButton2.Checked = false;
57
+ radioButtonLabel.Text = "No option selected";
58
+ }
59
+
60
+ private void FruitsComboBox_SelectedIndexChanged(object sender, EventArgs e)
61
+ {
62
+ fruitsLabel.Text = FruitsComboBox.Text;
63
+ }
64
+
65
+ private void nextFormButton_Click(object sender, EventArgs e)
66
+ {
67
+ DataEntryForm form = new DataEntryForm();
68
+ form.Show();
69
+ }
70
+
71
+ private void buttonButton_Click(object sender, EventArgs e)
72
+ {
73
+ SimpleElementsForm buttonForm = new SimpleElementsForm();
74
+ buttonForm.Show();
75
+ }
76
+
77
+ private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
78
+ {
79
+
80
+ }
81
+
82
+ private void automatableMonthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
83
+ {
84
+
85
+ }
86
+
87
+ private int LinkClicks { get; set; }
88
+ private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
89
+ {
90
+ linkLabel1.Text = String.Format("{0} (clicked {1} times)", linkLabel1.Name, ++LinkClicks);
91
+ }
92
+ }
93
+ }