rautomation 2.0.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/.gitignore +41 -0
- data/.rspec +2 -0
- data/.yardopts +8 -0
- data/CHANGES.md +276 -0
- data/Gemfile +3 -0
- data/LICENSE +20 -0
- data/README.md +142 -0
- data/Rakefile +73 -0
- data/ext/AutoItX/AutoItX.chm +0 -0
- data/ext/AutoItX/AutoItX3.dll +0 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.cpp +30 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj +179 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.filters +42 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/IAccessibleDLL.vcxproj.user +3 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/ReadMe.txt +48 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/dllmain.cpp +19 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.cpp +8 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/stdafx.h +22 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/table_support.cpp +282 -0
- data/ext/IAccessibleDLL/IAccessibleDLL/targetver.h +8 -0
- data/ext/IAccessibleDLL/IAccessibleDLL.sln +31 -0
- data/ext/IAccessibleDLL/IAccessibleDLL.suo +0 -0
- data/ext/IAccessibleDLL/Release/IAccessibleDLL.dll +0 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/Clicker.cs +63 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/SelectList.cs +116 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/Spinner.cs +46 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/TabControl.cs +54 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/TableControl.cs +132 -0
- data/ext/UiaDll/RAutomation.UIA/Controls/TextControl.cs +50 -0
- data/ext/UiaDll/RAutomation.UIA/Expander.cs +59 -0
- data/ext/UiaDll/RAutomation.UIA/Extensions/Element.cs +166 -0
- data/ext/UiaDll/RAutomation.UIA/Extensions/Enumerable.cs +76 -0
- data/ext/UiaDll/RAutomation.UIA/Extensions/Property.cs +27 -0
- data/ext/UiaDll/RAutomation.UIA/Properties/AssemblyInfo.cs +36 -0
- data/ext/UiaDll/RAutomation.UIA/Properties/AutomationProperties.cs +18 -0
- data/ext/UiaDll/RAutomation.UIA/RAutomation.UIA.csproj +77 -0
- data/ext/UiaDll/Release/RAutomation.UIA.dll +0 -0
- data/ext/UiaDll/Release/UiaDll.dll +0 -0
- data/ext/UiaDll/UiaDll/ArrayHelper.cpp +14 -0
- data/ext/UiaDll/UiaDll/ArrayHelper.h +7 -0
- data/ext/UiaDll/UiaDll/AssemblyInfo.cpp +40 -0
- data/ext/UiaDll/UiaDll/ControlMethods.cpp +16 -0
- data/ext/UiaDll/UiaDll/DynamicAssemblyResolver.cpp +24 -0
- data/ext/UiaDll/UiaDll/DynamicAssemblyResolver.h +16 -0
- data/ext/UiaDll/UiaDll/Locator.cpp +93 -0
- data/ext/UiaDll/UiaDll/Locator.h +55 -0
- data/ext/UiaDll/UiaDll/MenuItemSelector.cpp +75 -0
- data/ext/UiaDll/UiaDll/MenuItemSelector.h +24 -0
- data/ext/UiaDll/UiaDll/MenuMethods.cpp +62 -0
- data/ext/UiaDll/UiaDll/ReadMe.txt +38 -0
- data/ext/UiaDll/UiaDll/SelectListMethods.cpp +84 -0
- data/ext/UiaDll/UiaDll/SpinnerMethods.cpp +61 -0
- data/ext/UiaDll/UiaDll/StringHelper.cpp +57 -0
- data/ext/UiaDll/UiaDll/StringHelper.h +15 -0
- data/ext/UiaDll/UiaDll/StringMethods.cpp +8 -0
- data/ext/UiaDll/UiaDll/TabControlMethods.cpp +40 -0
- data/ext/UiaDll/UiaDll/TableMethods.cpp +108 -0
- data/ext/UiaDll/UiaDll/TextMethods.cpp +25 -0
- data/ext/UiaDll/UiaDll/ToggleStateHelper.h +10 -0
- data/ext/UiaDll/UiaDll/UiaDll.cpp +216 -0
- data/ext/UiaDll/UiaDll/UiaDll.h +13 -0
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj +167 -0
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj.filters +110 -0
- data/ext/UiaDll/UiaDll/app.ico +0 -0
- data/ext/UiaDll/UiaDll/app.rc +0 -0
- data/ext/UiaDll/UiaDll/dllmain.cpp +1 -0
- data/ext/UiaDll/UiaDll/resource.h +3 -0
- data/ext/UiaDll/UiaDll/stdafx.cpp +5 -0
- data/ext/UiaDll/UiaDll/stdafx.h +41 -0
- data/ext/UiaDll/UiaDll/targetver.h +8 -0
- data/ext/UiaDll/UiaDll.sln +57 -0
- data/ext/WindowsForms/.nuget/NuGet.Config +6 -0
- data/ext/WindowsForms/.nuget/NuGet.exe +0 -0
- data/ext/WindowsForms/.nuget/NuGet.targets +136 -0
- data/ext/WindowsForms/Release/FizzWare.NBuilder.dll +0 -0
- data/ext/WindowsForms/Release/UIA.Extensions.dll +0 -0
- data/ext/WindowsForms/Release/WindowsForms.exe +0 -0
- data/ext/WindowsForms/WindowsForms/AboutBox.Designer.cs +168 -0
- data/ext/WindowsForms/WindowsForms/AboutBox.cs +103 -0
- data/ext/WindowsForms/WindowsForms/AboutBox.resx +123 -0
- data/ext/WindowsForms/WindowsForms/DataEntryForm.Designer.cs +218 -0
- data/ext/WindowsForms/WindowsForms/DataEntryForm.cs +52 -0
- data/ext/WindowsForms/WindowsForms/DataEntryForm.resx +120 -0
- data/ext/WindowsForms/WindowsForms/DataGridView.Designer.cs +77 -0
- data/ext/WindowsForms/WindowsForms/DataGridView.cs +43 -0
- data/ext/WindowsForms/WindowsForms/DataGridView.resx +120 -0
- data/ext/WindowsForms/WindowsForms/FizzWare.NBuilder.dll +0 -0
- data/ext/WindowsForms/WindowsForms/MainFormWindow.Designer.cs +527 -0
- data/ext/WindowsForms/WindowsForms/MainFormWindow.cs +109 -0
- data/ext/WindowsForms/WindowsForms/MainFormWindow.resx +126 -0
- data/ext/WindowsForms/WindowsForms/PersonForm.Designer.cs +119 -0
- data/ext/WindowsForms/WindowsForms/PersonForm.cs +34 -0
- data/ext/WindowsForms/WindowsForms/PersonForm.resx +120 -0
- data/ext/WindowsForms/WindowsForms/Program.cs +21 -0
- data/ext/WindowsForms/WindowsForms/Properties/AssemblyInfo.cs +36 -0
- data/ext/WindowsForms/WindowsForms/Properties/Resources.Designer.cs +71 -0
- data/ext/WindowsForms/WindowsForms/Properties/Resources.resx +117 -0
- data/ext/WindowsForms/WindowsForms/Properties/Settings.Designer.cs +30 -0
- data/ext/WindowsForms/WindowsForms/Properties/Settings.settings +7 -0
- data/ext/WindowsForms/WindowsForms/SimpleElementsForm.Designer.cs +93 -0
- data/ext/WindowsForms/WindowsForms/SimpleElementsForm.cs +19 -0
- data/ext/WindowsForms/WindowsForms/SimpleElementsForm.resx +120 -0
- data/ext/WindowsForms/WindowsForms/UIA.Extensions.dll +0 -0
- data/ext/WindowsForms/WindowsForms/ValueMonthCalendar.cs +28 -0
- data/ext/WindowsForms/WindowsForms/WindowsForms.csproj +166 -0
- data/ext/WindowsForms/WindowsForms/packages.config +4 -0
- data/ext/WindowsForms/WindowsForms.sln +46 -0
- data/lib/rautomation/adapter/autoit/button.rb +59 -0
- data/lib/rautomation/adapter/autoit/locators.rb +22 -0
- data/lib/rautomation/adapter/autoit/mouse.rb +38 -0
- data/lib/rautomation/adapter/autoit/text_field.rb +70 -0
- data/lib/rautomation/adapter/autoit/window.rb +197 -0
- data/lib/rautomation/adapter/autoit.rb +8 -0
- data/lib/rautomation/adapter/helper.rb +64 -0
- data/lib/rautomation/adapter/ms_uia/button.rb +21 -0
- data/lib/rautomation/adapter/ms_uia/button_helper.rb +19 -0
- data/lib/rautomation/adapter/ms_uia/checkbox.rb +23 -0
- data/lib/rautomation/adapter/ms_uia/constants.rb +111 -0
- data/lib/rautomation/adapter/ms_uia/control.rb +134 -0
- data/lib/rautomation/adapter/ms_uia/functions.rb +279 -0
- data/lib/rautomation/adapter/ms_uia/keys.rb +121 -0
- data/lib/rautomation/adapter/ms_uia/keystroke_converter.rb +122 -0
- data/lib/rautomation/adapter/ms_uia/label.rb +18 -0
- data/lib/rautomation/adapter/ms_uia/list_box.rb +46 -0
- data/lib/rautomation/adapter/ms_uia/list_item.rb +22 -0
- data/lib/rautomation/adapter/ms_uia/locators.rb +23 -0
- data/lib/rautomation/adapter/ms_uia/menu.rb +36 -0
- data/lib/rautomation/adapter/ms_uia/radio.rb +23 -0
- data/lib/rautomation/adapter/ms_uia/select_list.rb +85 -0
- data/lib/rautomation/adapter/ms_uia/spinner.rb +31 -0
- data/lib/rautomation/adapter/ms_uia/tab_control.rb +46 -0
- data/lib/rautomation/adapter/ms_uia/table.rb +140 -0
- data/lib/rautomation/adapter/ms_uia/text_field.rb +39 -0
- data/lib/rautomation/adapter/ms_uia/uia_dll.rb +428 -0
- data/lib/rautomation/adapter/ms_uia/value_control.rb +21 -0
- data/lib/rautomation/adapter/ms_uia/window.rb +289 -0
- data/lib/rautomation/adapter/ms_uia.rb +27 -0
- data/lib/rautomation/adapter/win_32/button.rb +14 -0
- data/lib/rautomation/adapter/win_32/button_helper.rb +24 -0
- data/lib/rautomation/adapter/win_32/checkbox.rb +14 -0
- data/lib/rautomation/adapter/win_32/constants.rb +73 -0
- data/lib/rautomation/adapter/win_32/control.rb +86 -0
- data/lib/rautomation/adapter/win_32/functions.rb +336 -0
- data/lib/rautomation/adapter/win_32/keys.rb +146 -0
- data/lib/rautomation/adapter/win_32/label.rb +10 -0
- data/lib/rautomation/adapter/win_32/list_box.rb +40 -0
- data/lib/rautomation/adapter/win_32/locators.rb +22 -0
- data/lib/rautomation/adapter/win_32/mouse.rb +59 -0
- data/lib/rautomation/adapter/win_32/password_field.rb +15 -0
- data/lib/rautomation/adapter/win_32/radio.rb +11 -0
- data/lib/rautomation/adapter/win_32/select_list.rb +97 -0
- data/lib/rautomation/adapter/win_32/table.rb +25 -0
- data/lib/rautomation/adapter/win_32/text_field.rb +52 -0
- data/lib/rautomation/adapter/win_32/window.rb +277 -0
- data/lib/rautomation/adapter/win_32.rb +23 -0
- data/lib/rautomation/button.rb +55 -0
- data/lib/rautomation/element_collections.rb +55 -0
- data/lib/rautomation/platform.rb +15 -0
- data/lib/rautomation/text_field.rb +60 -0
- data/lib/rautomation/version.rb +3 -0
- data/lib/rautomation/wait_helper.rb +23 -0
- data/lib/rautomation/window.rb +248 -0
- data/lib/rautomation.rb +8 -0
- data/rautomation.gemspec +52 -0
- data/spec/adapter/autoit/mouse_spec.rb +53 -0
- data/spec/adapter/autoit/window_spec.rb +17 -0
- data/spec/adapter/ms_uia/button_spec.rb +39 -0
- data/spec/adapter/ms_uia/checkbox_spec.rb +55 -0
- data/spec/adapter/ms_uia/control_spec.rb +88 -0
- data/spec/adapter/ms_uia/functions_spec.rb +39 -0
- data/spec/adapter/ms_uia/keystroke_converter_spec.rb +48 -0
- data/spec/adapter/ms_uia/label_spec.rb +18 -0
- data/spec/adapter/ms_uia/list_item_spec.rb +14 -0
- data/spec/adapter/ms_uia/listbox_spec.rb +73 -0
- data/spec/adapter/ms_uia/radio_spec.rb +39 -0
- data/spec/adapter/ms_uia/select_list_spec.rb +118 -0
- data/spec/adapter/ms_uia/spinner_spec.rb +44 -0
- data/spec/adapter/ms_uia/tab_control_spec.rb +53 -0
- data/spec/adapter/ms_uia/table_spec.rb +197 -0
- data/spec/adapter/ms_uia/text_field_spec.rb +43 -0
- data/spec/adapter/ms_uia/value_control_spec.rb +11 -0
- data/spec/adapter/ms_uia/window_spec.rb +81 -0
- data/spec/adapter/win_32/button_spec.rb +31 -0
- data/spec/adapter/win_32/checkbox_spec.rb +46 -0
- data/spec/adapter/win_32/label_spec.rb +13 -0
- data/spec/adapter/win_32/listbox_spec.rb +41 -0
- data/spec/adapter/win_32/mouse_spec.rb +49 -0
- data/spec/adapter/win_32/radio_spec.rb +33 -0
- data/spec/adapter/win_32/select_list_spec.rb +65 -0
- data/spec/adapter/win_32/table_spec.rb +27 -0
- data/spec/adapter/win_32/text_field_spec.rb +24 -0
- data/spec/adapter/win_32/window_spec.rb +61 -0
- data/spec/button_spec.rb +67 -0
- data/spec/buttons_spec.rb +21 -0
- data/spec/spec_helper.rb +128 -0
- data/spec/text_field_spec.rb +64 -0
- data/spec/text_fields_spec.rb +22 -0
- data/spec/window_spec.rb +150 -0
- data/spec/windows_spec.rb +76 -0
- metadata +369 -0
@@ -0,0 +1,168 @@
|
|
1
|
+
namespace WindowsForms
|
2
|
+
{
|
3
|
+
partial class AboutBox
|
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
|
+
protected override void Dispose(bool disposing)
|
14
|
+
{
|
15
|
+
if (disposing && (components != null))
|
16
|
+
{
|
17
|
+
components.Dispose();
|
18
|
+
}
|
19
|
+
base.Dispose(disposing);
|
20
|
+
}
|
21
|
+
|
22
|
+
#region Windows Form Designer generated code
|
23
|
+
|
24
|
+
/// <summary>
|
25
|
+
/// Required method for Designer support - do not modify
|
26
|
+
/// the contents of this method with the code editor.
|
27
|
+
/// </summary>
|
28
|
+
private void InitializeComponent()
|
29
|
+
{
|
30
|
+
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox));
|
31
|
+
this.label1 = new System.Windows.Forms.Label();
|
32
|
+
this.button1 = new System.Windows.Forms.Button();
|
33
|
+
this.tabControl = new System.Windows.Forms.TabControl();
|
34
|
+
this.infoTab = new System.Windows.Forms.TabPage();
|
35
|
+
this.moreInfo = new System.Windows.Forms.TabPage();
|
36
|
+
this.textBox1 = new System.Windows.Forms.TextBox();
|
37
|
+
this.tabPage1 = new System.Windows.Forms.TabPage();
|
38
|
+
this.multiFruitListBox = new System.Windows.Forms.ListBox();
|
39
|
+
this.tabControl.SuspendLayout();
|
40
|
+
this.infoTab.SuspendLayout();
|
41
|
+
this.moreInfo.SuspendLayout();
|
42
|
+
this.tabPage1.SuspendLayout();
|
43
|
+
this.SuspendLayout();
|
44
|
+
//
|
45
|
+
// label1
|
46
|
+
//
|
47
|
+
this.label1.AutoSize = true;
|
48
|
+
this.label1.Location = new System.Drawing.Point(6, 13);
|
49
|
+
this.label1.Name = "label1";
|
50
|
+
this.label1.Size = new System.Drawing.Size(303, 13);
|
51
|
+
this.label1.TabIndex = 0;
|
52
|
+
this.label1.Text = "This is the about dialog for the RAutomation sample application";
|
53
|
+
//
|
54
|
+
// button1
|
55
|
+
//
|
56
|
+
this.button1.Location = new System.Drawing.Point(12, 277);
|
57
|
+
this.button1.Name = "button1";
|
58
|
+
this.button1.Size = new System.Drawing.Size(75, 23);
|
59
|
+
this.button1.TabIndex = 1;
|
60
|
+
this.button1.Text = "OK";
|
61
|
+
this.button1.UseVisualStyleBackColor = true;
|
62
|
+
this.button1.Click += new System.EventHandler(this.button1_Click);
|
63
|
+
//
|
64
|
+
// tabControl
|
65
|
+
//
|
66
|
+
this.tabControl.Controls.Add(this.infoTab);
|
67
|
+
this.tabControl.Controls.Add(this.moreInfo);
|
68
|
+
this.tabControl.Controls.Add(this.tabPage1);
|
69
|
+
this.tabControl.Location = new System.Drawing.Point(12, 12);
|
70
|
+
this.tabControl.Name = "tabControl";
|
71
|
+
this.tabControl.SelectedIndex = 0;
|
72
|
+
this.tabControl.Size = new System.Drawing.Size(551, 253);
|
73
|
+
this.tabControl.TabIndex = 2;
|
74
|
+
//
|
75
|
+
// infoTab
|
76
|
+
//
|
77
|
+
this.infoTab.Controls.Add(this.label1);
|
78
|
+
this.infoTab.Location = new System.Drawing.Point(4, 22);
|
79
|
+
this.infoTab.Name = "infoTab";
|
80
|
+
this.infoTab.Padding = new System.Windows.Forms.Padding(3);
|
81
|
+
this.infoTab.Size = new System.Drawing.Size(543, 227);
|
82
|
+
this.infoTab.TabIndex = 0;
|
83
|
+
this.infoTab.Text = "Info";
|
84
|
+
this.infoTab.UseVisualStyleBackColor = true;
|
85
|
+
//
|
86
|
+
// moreInfo
|
87
|
+
//
|
88
|
+
this.moreInfo.Controls.Add(this.textBox1);
|
89
|
+
this.moreInfo.Location = new System.Drawing.Point(4, 22);
|
90
|
+
this.moreInfo.Name = "moreInfo";
|
91
|
+
this.moreInfo.Padding = new System.Windows.Forms.Padding(3);
|
92
|
+
this.moreInfo.Size = new System.Drawing.Size(543, 227);
|
93
|
+
this.moreInfo.TabIndex = 1;
|
94
|
+
this.moreInfo.Text = "More Info";
|
95
|
+
this.moreInfo.UseVisualStyleBackColor = true;
|
96
|
+
//
|
97
|
+
// textBox1
|
98
|
+
//
|
99
|
+
this.textBox1.Location = new System.Drawing.Point(6, 3);
|
100
|
+
this.textBox1.Multiline = true;
|
101
|
+
this.textBox1.Name = "textBox1";
|
102
|
+
this.textBox1.Size = new System.Drawing.Size(531, 218);
|
103
|
+
this.textBox1.TabIndex = 0;
|
104
|
+
this.textBox1.Text = resources.GetString("textBox1.Text");
|
105
|
+
//
|
106
|
+
// tabPage1
|
107
|
+
//
|
108
|
+
this.tabPage1.Controls.Add(this.multiFruitListBox);
|
109
|
+
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
110
|
+
this.tabPage1.Name = "tabPage1";
|
111
|
+
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
112
|
+
this.tabPage1.Size = new System.Drawing.Size(543, 227);
|
113
|
+
this.tabPage1.TabIndex = 2;
|
114
|
+
this.tabPage1.Text = "Multi-Select ListBox";
|
115
|
+
this.tabPage1.UseVisualStyleBackColor = true;
|
116
|
+
//
|
117
|
+
// multiFruitListBox
|
118
|
+
//
|
119
|
+
this.multiFruitListBox.FormattingEnabled = true;
|
120
|
+
this.multiFruitListBox.Items.AddRange(new object[] {
|
121
|
+
"Apple",
|
122
|
+
"Orange",
|
123
|
+
"Mango"});
|
124
|
+
this.multiFruitListBox.Location = new System.Drawing.Point(6, 6);
|
125
|
+
this.multiFruitListBox.Name = "multiFruitListBox";
|
126
|
+
this.multiFruitListBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
|
127
|
+
this.multiFruitListBox.Size = new System.Drawing.Size(159, 95);
|
128
|
+
this.multiFruitListBox.TabIndex = 15;
|
129
|
+
//
|
130
|
+
// AboutBox
|
131
|
+
//
|
132
|
+
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
133
|
+
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
134
|
+
this.ClientSize = new System.Drawing.Size(575, 312);
|
135
|
+
this.Controls.Add(this.button1);
|
136
|
+
this.Controls.Add(this.tabControl);
|
137
|
+
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
138
|
+
this.MaximizeBox = false;
|
139
|
+
this.MinimizeBox = false;
|
140
|
+
this.Name = "AboutBox";
|
141
|
+
this.Padding = new System.Windows.Forms.Padding(9);
|
142
|
+
this.ShowIcon = false;
|
143
|
+
this.ShowInTaskbar = false;
|
144
|
+
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
145
|
+
this.Text = "About";
|
146
|
+
this.tabControl.ResumeLayout(false);
|
147
|
+
this.infoTab.ResumeLayout(false);
|
148
|
+
this.infoTab.PerformLayout();
|
149
|
+
this.moreInfo.ResumeLayout(false);
|
150
|
+
this.moreInfo.PerformLayout();
|
151
|
+
this.tabPage1.ResumeLayout(false);
|
152
|
+
this.ResumeLayout(false);
|
153
|
+
|
154
|
+
}
|
155
|
+
|
156
|
+
#endregion
|
157
|
+
|
158
|
+
private System.Windows.Forms.Label label1;
|
159
|
+
private System.Windows.Forms.Button button1;
|
160
|
+
private System.Windows.Forms.TabControl tabControl;
|
161
|
+
private System.Windows.Forms.TabPage infoTab;
|
162
|
+
private System.Windows.Forms.TabPage moreInfo;
|
163
|
+
private System.Windows.Forms.TextBox textBox1;
|
164
|
+
private System.Windows.Forms.TabPage tabPage1;
|
165
|
+
private System.Windows.Forms.ListBox multiFruitListBox;
|
166
|
+
|
167
|
+
}
|
168
|
+
}
|
@@ -0,0 +1,103 @@
|
|
1
|
+
using System;
|
2
|
+
using System.Collections.Generic;
|
3
|
+
using System.ComponentModel;
|
4
|
+
using System.Drawing;
|
5
|
+
using System.Linq;
|
6
|
+
using System.Reflection;
|
7
|
+
using System.Windows.Forms;
|
8
|
+
|
9
|
+
namespace WindowsForms
|
10
|
+
{
|
11
|
+
partial class AboutBox : Form
|
12
|
+
{
|
13
|
+
public AboutBox()
|
14
|
+
{
|
15
|
+
InitializeComponent();
|
16
|
+
}
|
17
|
+
|
18
|
+
#region Assembly Attribute Accessors
|
19
|
+
|
20
|
+
public string AssemblyTitle
|
21
|
+
{
|
22
|
+
get
|
23
|
+
{
|
24
|
+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
|
25
|
+
if (attributes.Length > 0)
|
26
|
+
{
|
27
|
+
AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0];
|
28
|
+
if (titleAttribute.Title != "")
|
29
|
+
{
|
30
|
+
return titleAttribute.Title;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
public string AssemblyVersion
|
38
|
+
{
|
39
|
+
get
|
40
|
+
{
|
41
|
+
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
public string AssemblyDescription
|
46
|
+
{
|
47
|
+
get
|
48
|
+
{
|
49
|
+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false);
|
50
|
+
if (attributes.Length == 0)
|
51
|
+
{
|
52
|
+
return "";
|
53
|
+
}
|
54
|
+
return ((AssemblyDescriptionAttribute)attributes[0]).Description;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
public string AssemblyProduct
|
59
|
+
{
|
60
|
+
get
|
61
|
+
{
|
62
|
+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false);
|
63
|
+
if (attributes.Length == 0)
|
64
|
+
{
|
65
|
+
return "";
|
66
|
+
}
|
67
|
+
return ((AssemblyProductAttribute)attributes[0]).Product;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
public string AssemblyCopyright
|
72
|
+
{
|
73
|
+
get
|
74
|
+
{
|
75
|
+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
76
|
+
if (attributes.Length == 0)
|
77
|
+
{
|
78
|
+
return "";
|
79
|
+
}
|
80
|
+
return ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
public string AssemblyCompany
|
85
|
+
{
|
86
|
+
get
|
87
|
+
{
|
88
|
+
object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
|
89
|
+
if (attributes.Length == 0)
|
90
|
+
{
|
91
|
+
return "";
|
92
|
+
}
|
93
|
+
return ((AssemblyCompanyAttribute)attributes[0]).Company;
|
94
|
+
}
|
95
|
+
}
|
96
|
+
#endregion
|
97
|
+
|
98
|
+
private void button1_Click(object sender, EventArgs e)
|
99
|
+
{
|
100
|
+
this.Close();
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
@@ -0,0 +1,123 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<root>
|
3
|
+
<!--
|
4
|
+
Microsoft ResX Schema
|
5
|
+
|
6
|
+
Version 2.0
|
7
|
+
|
8
|
+
The primary goals of this format is to allow a simple XML format
|
9
|
+
that is mostly human readable. The generation and parsing of the
|
10
|
+
various data types are done through the TypeConverter classes
|
11
|
+
associated with the data types.
|
12
|
+
|
13
|
+
Example:
|
14
|
+
|
15
|
+
... ado.net/XML headers & schema ...
|
16
|
+
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
17
|
+
<resheader name="version">2.0</resheader>
|
18
|
+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
19
|
+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
20
|
+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
21
|
+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
22
|
+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
23
|
+
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
24
|
+
</data>
|
25
|
+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
26
|
+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
27
|
+
<comment>This is a comment</comment>
|
28
|
+
</data>
|
29
|
+
|
30
|
+
There are any number of "resheader" rows that contain simple
|
31
|
+
name/value pairs.
|
32
|
+
|
33
|
+
Each data row contains a name, and value. The row also contains a
|
34
|
+
type or mimetype. Type corresponds to a .NET class that support
|
35
|
+
text/value conversion through the TypeConverter architecture.
|
36
|
+
Classes that don't support this are serialized and stored with the
|
37
|
+
mimetype set.
|
38
|
+
|
39
|
+
The mimetype is used for serialized objects, and tells the
|
40
|
+
ResXResourceReader how to depersist the object. This is currently not
|
41
|
+
extensible. For a given mimetype the value must be set accordingly:
|
42
|
+
|
43
|
+
Note - application/x-microsoft.net.object.binary.base64 is the format
|
44
|
+
that the ResXResourceWriter will generate, however the reader can
|
45
|
+
read any of the formats listed below.
|
46
|
+
|
47
|
+
mimetype: application/x-microsoft.net.object.binary.base64
|
48
|
+
value : The object must be serialized with
|
49
|
+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
50
|
+
: and then encoded with base64 encoding.
|
51
|
+
|
52
|
+
mimetype: application/x-microsoft.net.object.soap.base64
|
53
|
+
value : The object must be serialized with
|
54
|
+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
55
|
+
: and then encoded with base64 encoding.
|
56
|
+
|
57
|
+
mimetype: application/x-microsoft.net.object.bytearray.base64
|
58
|
+
value : The object must be serialized into a byte array
|
59
|
+
: using a System.ComponentModel.TypeConverter
|
60
|
+
: and then encoded with base64 encoding.
|
61
|
+
-->
|
62
|
+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
63
|
+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
64
|
+
<xsd:element name="root" msdata:IsDataSet="true">
|
65
|
+
<xsd:complexType>
|
66
|
+
<xsd:choice maxOccurs="unbounded">
|
67
|
+
<xsd:element name="metadata">
|
68
|
+
<xsd:complexType>
|
69
|
+
<xsd:sequence>
|
70
|
+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
71
|
+
</xsd:sequence>
|
72
|
+
<xsd:attribute name="name" use="required" type="xsd:string" />
|
73
|
+
<xsd:attribute name="type" type="xsd:string" />
|
74
|
+
<xsd:attribute name="mimetype" type="xsd:string" />
|
75
|
+
<xsd:attribute ref="xml:space" />
|
76
|
+
</xsd:complexType>
|
77
|
+
</xsd:element>
|
78
|
+
<xsd:element name="assembly">
|
79
|
+
<xsd:complexType>
|
80
|
+
<xsd:attribute name="alias" type="xsd:string" />
|
81
|
+
<xsd:attribute name="name" type="xsd:string" />
|
82
|
+
</xsd:complexType>
|
83
|
+
</xsd:element>
|
84
|
+
<xsd:element name="data">
|
85
|
+
<xsd:complexType>
|
86
|
+
<xsd:sequence>
|
87
|
+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
88
|
+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
89
|
+
</xsd:sequence>
|
90
|
+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
91
|
+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
92
|
+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
93
|
+
<xsd:attribute ref="xml:space" />
|
94
|
+
</xsd:complexType>
|
95
|
+
</xsd:element>
|
96
|
+
<xsd:element name="resheader">
|
97
|
+
<xsd:complexType>
|
98
|
+
<xsd:sequence>
|
99
|
+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
100
|
+
</xsd:sequence>
|
101
|
+
<xsd:attribute name="name" type="xsd:string" use="required" />
|
102
|
+
</xsd:complexType>
|
103
|
+
</xsd:element>
|
104
|
+
</xsd:choice>
|
105
|
+
</xsd:complexType>
|
106
|
+
</xsd:element>
|
107
|
+
</xsd:schema>
|
108
|
+
<resheader name="resmimetype">
|
109
|
+
<value>text/microsoft-resx</value>
|
110
|
+
</resheader>
|
111
|
+
<resheader name="version">
|
112
|
+
<value>2.0</value>
|
113
|
+
</resheader>
|
114
|
+
<resheader name="reader">
|
115
|
+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
116
|
+
</resheader>
|
117
|
+
<resheader name="writer">
|
118
|
+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
119
|
+
</resheader>
|
120
|
+
<data name="textBox1.Text" xml:space="preserve">
|
121
|
+
<value>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean et urna tellus. Ut tincidunt ligula quam, sed mattis eros suscipit id. In volutpat, enim at scelerisque elementum, dui tellus cursus metus, et dignissim mi nulla eget nisl. Duis ipsum orci, placerat nec libero a, vulputate bibendum tellus. Sed accumsan est ipsum, a tincidunt nunc dictum eget. Proin mattis iaculis nisl. Suspendisse ac velit ac augue feugiat mollis vitae in velit. Donec rutrum nunc hendrerit, aliquet lorem quis, cursus enim. Nam vel aliquet dolor, fermentum molestie risus. Curabitur vitae nulla eget est tempus elementum. Nunc venenatis posuere lorem, nec consectetur libero semper in.</value>
|
122
|
+
</data>
|
123
|
+
</root>
|
@@ -0,0 +1,218 @@
|
|
1
|
+
namespace WindowsForms
|
2
|
+
{
|
3
|
+
partial class DataEntryForm
|
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.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(new string[] {
|
32
|
+
"John Doe",
|
33
|
+
"12/15/1967",
|
34
|
+
"FL"}, -1);
|
35
|
+
System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem(new string[] {
|
36
|
+
"Anna Doe",
|
37
|
+
"3/4/1975"}, -1);
|
38
|
+
this.deleteItemButton = new System.Windows.Forms.Button();
|
39
|
+
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
40
|
+
this.addItemButton = new System.Windows.Forms.Button();
|
41
|
+
this.personListView = new System.Windows.Forms.ListView();
|
42
|
+
this.columnName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
43
|
+
this.columnDateOfBirth = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
44
|
+
this.columnState = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
45
|
+
this.closeDataEntryFormButton = new System.Windows.Forms.Button();
|
46
|
+
this.maskedTextBox1 = new System.Windows.Forms.MaskedTextBox();
|
47
|
+
this.label1 = new System.Windows.Forms.Label();
|
48
|
+
this.maskedTextBox2 = new System.Windows.Forms.MaskedTextBox();
|
49
|
+
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
|
50
|
+
this.toggleMultiSelect = new System.Windows.Forms.Button();
|
51
|
+
this.groupBox3.SuspendLayout();
|
52
|
+
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
|
53
|
+
this.SuspendLayout();
|
54
|
+
//
|
55
|
+
// deleteItemButton
|
56
|
+
//
|
57
|
+
this.deleteItemButton.Location = new System.Drawing.Point(334, 55);
|
58
|
+
this.deleteItemButton.Name = "deleteItemButton";
|
59
|
+
this.deleteItemButton.Size = new System.Drawing.Size(75, 23);
|
60
|
+
this.deleteItemButton.TabIndex = 2;
|
61
|
+
this.deleteItemButton.Text = "Delete";
|
62
|
+
this.deleteItemButton.UseVisualStyleBackColor = true;
|
63
|
+
this.deleteItemButton.Click += new System.EventHandler(this.deleteItemButton_Click);
|
64
|
+
//
|
65
|
+
// groupBox3
|
66
|
+
//
|
67
|
+
this.groupBox3.Controls.Add(this.deleteItemButton);
|
68
|
+
this.groupBox3.Controls.Add(this.addItemButton);
|
69
|
+
this.groupBox3.Controls.Add(this.personListView);
|
70
|
+
this.groupBox3.Location = new System.Drawing.Point(135, 12);
|
71
|
+
this.groupBox3.Name = "groupBox3";
|
72
|
+
this.groupBox3.Size = new System.Drawing.Size(415, 114);
|
73
|
+
this.groupBox3.TabIndex = 9;
|
74
|
+
this.groupBox3.TabStop = false;
|
75
|
+
this.groupBox3.Text = "List of items";
|
76
|
+
//
|
77
|
+
// addItemButton
|
78
|
+
//
|
79
|
+
this.addItemButton.Location = new System.Drawing.Point(334, 26);
|
80
|
+
this.addItemButton.Name = "addItemButton";
|
81
|
+
this.addItemButton.Size = new System.Drawing.Size(75, 23);
|
82
|
+
this.addItemButton.TabIndex = 1;
|
83
|
+
this.addItemButton.Text = "Add ...";
|
84
|
+
this.addItemButton.UseVisualStyleBackColor = true;
|
85
|
+
this.addItemButton.Click += new System.EventHandler(this.addItemButton_Click);
|
86
|
+
//
|
87
|
+
// personListView
|
88
|
+
//
|
89
|
+
this.personListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
90
|
+
this.columnName,
|
91
|
+
this.columnDateOfBirth,
|
92
|
+
this.columnState});
|
93
|
+
this.personListView.GridLines = true;
|
94
|
+
this.personListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
|
95
|
+
this.personListView.Items.AddRange(new System.Windows.Forms.ListViewItem[] {
|
96
|
+
listViewItem1,
|
97
|
+
listViewItem2});
|
98
|
+
this.personListView.Location = new System.Drawing.Point(6, 26);
|
99
|
+
this.personListView.Name = "personListView";
|
100
|
+
this.personListView.Size = new System.Drawing.Size(314, 74);
|
101
|
+
this.personListView.TabIndex = 0;
|
102
|
+
this.personListView.UseCompatibleStateImageBehavior = false;
|
103
|
+
this.personListView.View = System.Windows.Forms.View.Details;
|
104
|
+
this.personListView.SelectedIndexChanged += new System.EventHandler(this.personListView_SelectedIndexChanged);
|
105
|
+
//
|
106
|
+
// columnName
|
107
|
+
//
|
108
|
+
this.columnName.Text = "Name";
|
109
|
+
this.columnName.Width = 148;
|
110
|
+
//
|
111
|
+
// columnDateOfBirth
|
112
|
+
//
|
113
|
+
this.columnDateOfBirth.Text = "Date of birth";
|
114
|
+
this.columnDateOfBirth.Width = 100;
|
115
|
+
//
|
116
|
+
// columnState
|
117
|
+
//
|
118
|
+
this.columnState.Text = "State";
|
119
|
+
//
|
120
|
+
// closeDataEntryFormButton
|
121
|
+
//
|
122
|
+
this.closeDataEntryFormButton.Location = new System.Drawing.Point(12, 12);
|
123
|
+
this.closeDataEntryFormButton.Name = "closeDataEntryFormButton";
|
124
|
+
this.closeDataEntryFormButton.Size = new System.Drawing.Size(95, 23);
|
125
|
+
this.closeDataEntryFormButton.TabIndex = 11;
|
126
|
+
this.closeDataEntryFormButton.Text = "Close";
|
127
|
+
this.closeDataEntryFormButton.UseVisualStyleBackColor = true;
|
128
|
+
this.closeDataEntryFormButton.Click += new System.EventHandler(this.closeDataEntryFormButton_Click);
|
129
|
+
//
|
130
|
+
// maskedTextBox1
|
131
|
+
//
|
132
|
+
this.maskedTextBox1.Location = new System.Drawing.Point(254, 147);
|
133
|
+
this.maskedTextBox1.Mask = "(999) 000-0000";
|
134
|
+
this.maskedTextBox1.Name = "maskedTextBox1";
|
135
|
+
this.maskedTextBox1.Size = new System.Drawing.Size(100, 20);
|
136
|
+
this.maskedTextBox1.TabIndex = 12;
|
137
|
+
//
|
138
|
+
// label1
|
139
|
+
//
|
140
|
+
this.label1.AutoSize = true;
|
141
|
+
this.label1.Location = new System.Drawing.Point(138, 150);
|
142
|
+
this.label1.Name = "label1";
|
143
|
+
this.label1.Size = new System.Drawing.Size(76, 13);
|
144
|
+
this.label1.TabIndex = 13;
|
145
|
+
this.label1.Text = "Phone number";
|
146
|
+
//
|
147
|
+
// maskedTextBox2
|
148
|
+
//
|
149
|
+
this.maskedTextBox2.Location = new System.Drawing.Point(425, 280);
|
150
|
+
this.maskedTextBox2.Mask = "00/00/0000";
|
151
|
+
this.maskedTextBox2.Name = "maskedTextBox2";
|
152
|
+
this.maskedTextBox2.Size = new System.Drawing.Size(100, 20);
|
153
|
+
this.maskedTextBox2.TabIndex = 14;
|
154
|
+
this.maskedTextBox2.ValidatingType = typeof(System.DateTime);
|
155
|
+
//
|
156
|
+
// numericUpDown1
|
157
|
+
//
|
158
|
+
this.numericUpDown1.Location = new System.Drawing.Point(574, 38);
|
159
|
+
this.numericUpDown1.Minimum = new decimal(new int[] {
|
160
|
+
100,
|
161
|
+
0,
|
162
|
+
0,
|
163
|
+
-2147483648});
|
164
|
+
this.numericUpDown1.Name = "numericUpDown1";
|
165
|
+
this.numericUpDown1.Size = new System.Drawing.Size(120, 20);
|
166
|
+
this.numericUpDown1.TabIndex = 15;
|
167
|
+
//
|
168
|
+
// toggleMultiSelect
|
169
|
+
//
|
170
|
+
this.toggleMultiSelect.Location = new System.Drawing.Point(12, 41);
|
171
|
+
this.toggleMultiSelect.Name = "toggleMultiSelect";
|
172
|
+
this.toggleMultiSelect.Size = new System.Drawing.Size(95, 23);
|
173
|
+
this.toggleMultiSelect.TabIndex = 16;
|
174
|
+
this.toggleMultiSelect.Text = "Toggle Multi";
|
175
|
+
this.toggleMultiSelect.UseVisualStyleBackColor = true;
|
176
|
+
this.toggleMultiSelect.Click += new System.EventHandler(this.toggleMultiSelect_Click);
|
177
|
+
//
|
178
|
+
// DataEntryForm
|
179
|
+
//
|
180
|
+
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
181
|
+
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
182
|
+
this.ClientSize = new System.Drawing.Size(724, 474);
|
183
|
+
this.Controls.Add(this.toggleMultiSelect);
|
184
|
+
this.Controls.Add(this.numericUpDown1);
|
185
|
+
this.Controls.Add(this.maskedTextBox2);
|
186
|
+
this.Controls.Add(this.label1);
|
187
|
+
this.Controls.Add(this.maskedTextBox1);
|
188
|
+
this.Controls.Add(this.closeDataEntryFormButton);
|
189
|
+
this.Controls.Add(this.groupBox3);
|
190
|
+
this.MaximizeBox = false;
|
191
|
+
this.MinimizeBox = false;
|
192
|
+
this.Name = "DataEntryForm";
|
193
|
+
this.ShowInTaskbar = false;
|
194
|
+
this.Text = "DataEntryForm";
|
195
|
+
this.groupBox3.ResumeLayout(false);
|
196
|
+
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
|
197
|
+
this.ResumeLayout(false);
|
198
|
+
this.PerformLayout();
|
199
|
+
|
200
|
+
}
|
201
|
+
|
202
|
+
#endregion
|
203
|
+
|
204
|
+
private System.Windows.Forms.Button deleteItemButton;
|
205
|
+
private System.Windows.Forms.GroupBox groupBox3;
|
206
|
+
private System.Windows.Forms.Button addItemButton;
|
207
|
+
private System.Windows.Forms.ListView personListView;
|
208
|
+
private System.Windows.Forms.ColumnHeader columnName;
|
209
|
+
private System.Windows.Forms.ColumnHeader columnDateOfBirth;
|
210
|
+
private System.Windows.Forms.Button closeDataEntryFormButton;
|
211
|
+
private System.Windows.Forms.MaskedTextBox maskedTextBox1;
|
212
|
+
private System.Windows.Forms.Label label1;
|
213
|
+
private System.Windows.Forms.ColumnHeader columnState;
|
214
|
+
private System.Windows.Forms.MaskedTextBox maskedTextBox2;
|
215
|
+
private System.Windows.Forms.NumericUpDown numericUpDown1;
|
216
|
+
private System.Windows.Forms.Button toggleMultiSelect;
|
217
|
+
}
|
218
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
using System;
|
2
|
+
using System.Windows.Forms;
|
3
|
+
using UIA.Extensions;
|
4
|
+
|
5
|
+
namespace WindowsForms
|
6
|
+
{
|
7
|
+
public partial class DataEntryForm : Form
|
8
|
+
{
|
9
|
+
public DataEntryForm()
|
10
|
+
{
|
11
|
+
InitializeComponent();
|
12
|
+
numericUpDown1.AsRangeValue();
|
13
|
+
}
|
14
|
+
|
15
|
+
private void closeDataEntryFormButton_Click(object sender, EventArgs e)
|
16
|
+
{
|
17
|
+
this.Close();
|
18
|
+
}
|
19
|
+
|
20
|
+
private void addItemButton_Click(object sender, EventArgs e)
|
21
|
+
{
|
22
|
+
PersonForm personForm = new PersonForm(this);
|
23
|
+
personForm.Show();
|
24
|
+
}
|
25
|
+
|
26
|
+
public void addPerson(String personName, String dateOfBirth)
|
27
|
+
{
|
28
|
+
ListViewItem newItem = new ListViewItem(personName);
|
29
|
+
newItem.SubItems.Add(dateOfBirth);
|
30
|
+
personListView.Items.Add(newItem);
|
31
|
+
}
|
32
|
+
|
33
|
+
private void deleteItemButton_Click(object sender, EventArgs e)
|
34
|
+
{
|
35
|
+
foreach (ListViewItem item in personListView.SelectedItems)
|
36
|
+
{
|
37
|
+
personListView.Items.Remove(item);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
private void personListView_SelectedIndexChanged(object sender, EventArgs e)
|
42
|
+
{
|
43
|
+
|
44
|
+
}
|
45
|
+
|
46
|
+
private void toggleMultiSelect_Click(object sender, EventArgs e)
|
47
|
+
{
|
48
|
+
personListView.MultiSelect = !personListView.MultiSelect;
|
49
|
+
}
|
50
|
+
|
51
|
+
}
|
52
|
+
}
|