Adding support for usage value and thus joystick/gamepad.
Adding generic support for direction pad.
2 using System.Collections.Generic;
5 namespace RemoteControlSample
7 public partial class MainForm
9 #region Windows Form Designer generated code
11 /// Required method for Designer support - do not modify
12 /// the contents of this method with the code editor.
14 private void InitializeComponent()
16 this.labelButtonName = new System.Windows.Forms.Label();
17 this.labelDeviceName = new System.Windows.Forms.Label();
18 this.buttonClear = new System.Windows.Forms.Button();
19 this.tabControl = new System.Windows.Forms.TabControl();
20 this.tabPageMessages = new System.Windows.Forms.TabPage();
21 this.listViewEvents = new System.Windows.Forms.ListView();
22 this.columnHeaderUsages = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
23 this.columnHeaderInputReport = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
24 this.columnHeaderUsagePage = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
25 this.columnHeaderUsageCollection = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
26 this.columnHeaderRepeat = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
27 this.columnHeaderTime = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
28 this.tabPageDevices = new System.Windows.Forms.TabPage();
29 this.buttonTreeViewExpandAll = new System.Windows.Forms.Button();
30 this.buttonTreeViewCollapseAll = new System.Windows.Forms.Button();
31 this.treeViewDevices = new System.Windows.Forms.TreeView();
32 this.tabPageTests = new System.Windows.Forms.TabPage();
33 this.textBoxTests = new System.Windows.Forms.TextBox();
34 this.statusStrip = new System.Windows.Forms.StatusStrip();
35 this.toolStripStatusLabelDevice = new System.Windows.Forms.ToolStripStatusLabel();
36 this.buttonRefresh = new System.Windows.Forms.Button();
37 this.tabControl.SuspendLayout();
38 this.tabPageMessages.SuspendLayout();
39 this.tabPageDevices.SuspendLayout();
40 this.tabPageTests.SuspendLayout();
41 this.statusStrip.SuspendLayout();
46 this.labelButtonName.AutoSize = true;
47 this.labelButtonName.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
48 this.labelButtonName.Location = new System.Drawing.Point(785, 53);
49 this.labelButtonName.Name = "labelButtonName";
50 this.labelButtonName.Size = new System.Drawing.Size(103, 20);
51 this.labelButtonName.TabIndex = 0;
52 this.labelButtonName.Text = "Button Name";
56 this.labelDeviceName.AutoSize = true;
57 this.labelDeviceName.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
58 this.labelDeviceName.Location = new System.Drawing.Point(785, 33);
59 this.labelDeviceName.Name = "labelDeviceName";
60 this.labelDeviceName.Size = new System.Drawing.Size(103, 20);
61 this.labelDeviceName.TabIndex = 1;
62 this.labelDeviceName.Text = "Device Name";
66 this.buttonClear.Location = new System.Drawing.Point(813, 6);
67 this.buttonClear.Name = "buttonClear";
68 this.buttonClear.Size = new System.Drawing.Size(75, 23);
69 this.buttonClear.TabIndex = 3;
70 this.buttonClear.Text = "Clear";
71 this.buttonClear.UseVisualStyleBackColor = true;
72 this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click);
76 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
77 | System.Windows.Forms.AnchorStyles.Left)));
78 this.tabControl.Controls.Add(this.tabPageMessages);
79 this.tabControl.Controls.Add(this.tabPageDevices);
80 this.tabControl.Controls.Add(this.tabPageTests);
81 this.tabControl.Location = new System.Drawing.Point(12, 12);
82 this.tabControl.Name = "tabControl";
83 this.tabControl.SelectedIndex = 0;
84 this.tabControl.Size = new System.Drawing.Size(902, 532);
85 this.tabControl.TabIndex = 4;
89 this.tabPageMessages.Controls.Add(this.listViewEvents);
90 this.tabPageMessages.Controls.Add(this.buttonClear);
91 this.tabPageMessages.Controls.Add(this.labelDeviceName);
92 this.tabPageMessages.Controls.Add(this.labelButtonName);
93 this.tabPageMessages.Location = new System.Drawing.Point(4, 22);
94 this.tabPageMessages.Name = "tabPageMessages";
95 this.tabPageMessages.Padding = new System.Windows.Forms.Padding(3);
96 this.tabPageMessages.Size = new System.Drawing.Size(894, 506);
97 this.tabPageMessages.TabIndex = 0;
98 this.tabPageMessages.Text = "Messages";
99 this.tabPageMessages.UseVisualStyleBackColor = true;
103 this.listViewEvents.Alignment = System.Windows.Forms.ListViewAlignment.Left;
104 this.listViewEvents.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
105 | System.Windows.Forms.AnchorStyles.Left)));
106 this.listViewEvents.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
107 this.listViewEvents.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
108 this.columnHeaderUsages,
109 this.columnHeaderInputReport,
110 this.columnHeaderUsagePage,
111 this.columnHeaderUsageCollection,
112 this.columnHeaderRepeat,
113 this.columnHeaderTime});
114 this.listViewEvents.GridLines = true;
115 this.listViewEvents.Location = new System.Drawing.Point(8, 6);
116 this.listViewEvents.Name = "listViewEvents";
117 this.listViewEvents.Size = new System.Drawing.Size(744, 492);
118 this.listViewEvents.TabIndex = 3;
119 this.listViewEvents.UseCompatibleStateImageBehavior = false;
120 this.listViewEvents.View = System.Windows.Forms.View.Details;
122 // columnHeaderUsages
124 this.columnHeaderUsages.Text = "Usages";
125 this.columnHeaderUsages.Width = 180;
127 // columnHeaderInputReport
129 this.columnHeaderInputReport.Text = "Input Report";
130 this.columnHeaderInputReport.Width = 176;
132 // columnHeaderUsagePage
134 this.columnHeaderUsagePage.Text = "Usage Page";
135 this.columnHeaderUsagePage.Width = 87;
137 // columnHeaderUsageCollection
139 this.columnHeaderUsageCollection.Text = "Usage Collection";
140 this.columnHeaderUsageCollection.Width = 134;
142 // columnHeaderRepeat
144 this.columnHeaderRepeat.Text = "Repeat";
145 this.columnHeaderRepeat.Width = 68;
149 this.columnHeaderTime.Text = "Time";
150 this.columnHeaderTime.Width = 76;
154 this.tabPageDevices.Controls.Add(this.buttonRefresh);
155 this.tabPageDevices.Controls.Add(this.buttonTreeViewExpandAll);
156 this.tabPageDevices.Controls.Add(this.buttonTreeViewCollapseAll);
157 this.tabPageDevices.Controls.Add(this.treeViewDevices);
158 this.tabPageDevices.Location = new System.Drawing.Point(4, 22);
159 this.tabPageDevices.Name = "tabPageDevices";
160 this.tabPageDevices.Padding = new System.Windows.Forms.Padding(3);
161 this.tabPageDevices.Size = new System.Drawing.Size(894, 506);
162 this.tabPageDevices.TabIndex = 1;
163 this.tabPageDevices.Text = "Devices";
164 this.tabPageDevices.UseVisualStyleBackColor = true;
166 // buttonTreeViewExpandAll
168 this.buttonTreeViewExpandAll.Location = new System.Drawing.Point(813, 6);
169 this.buttonTreeViewExpandAll.Name = "buttonTreeViewExpandAll";
170 this.buttonTreeViewExpandAll.Size = new System.Drawing.Size(75, 23);
171 this.buttonTreeViewExpandAll.TabIndex = 2;
172 this.buttonTreeViewExpandAll.Text = "Expand All";
173 this.buttonTreeViewExpandAll.UseVisualStyleBackColor = true;
174 this.buttonTreeViewExpandAll.Click += new System.EventHandler(this.buttonTreeViewExpandAll_Click);
176 // buttonTreeViewCollapseAll
178 this.buttonTreeViewCollapseAll.Location = new System.Drawing.Point(813, 35);
179 this.buttonTreeViewCollapseAll.Name = "buttonTreeViewCollapseAll";
180 this.buttonTreeViewCollapseAll.Size = new System.Drawing.Size(75, 23);
181 this.buttonTreeViewCollapseAll.TabIndex = 1;
182 this.buttonTreeViewCollapseAll.Text = "Collapse All";
183 this.buttonTreeViewCollapseAll.UseVisualStyleBackColor = true;
184 this.buttonTreeViewCollapseAll.Click += new System.EventHandler(this.buttonTreeViewCollapseAll_Click);
188 this.treeViewDevices.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
189 | System.Windows.Forms.AnchorStyles.Left)));
190 this.treeViewDevices.Location = new System.Drawing.Point(8, 6);
191 this.treeViewDevices.Name = "treeViewDevices";
192 this.treeViewDevices.Size = new System.Drawing.Size(713, 492);
193 this.treeViewDevices.TabIndex = 0;
197 this.tabPageTests.Controls.Add(this.textBoxTests);
198 this.tabPageTests.Location = new System.Drawing.Point(4, 22);
199 this.tabPageTests.Name = "tabPageTests";
200 this.tabPageTests.Size = new System.Drawing.Size(894, 506);
201 this.tabPageTests.TabIndex = 2;
202 this.tabPageTests.Text = "Tests";
203 this.tabPageTests.UseVisualStyleBackColor = true;
207 this.textBoxTests.Location = new System.Drawing.Point(4, 4);
208 this.textBoxTests.Multiline = true;
209 this.textBoxTests.Name = "textBoxTests";
210 this.textBoxTests.Size = new System.Drawing.Size(887, 499);
211 this.textBoxTests.TabIndex = 0;
215 this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
216 this.toolStripStatusLabelDevice});
217 this.statusStrip.Location = new System.Drawing.Point(0, 547);
218 this.statusStrip.Name = "statusStrip";
219 this.statusStrip.Size = new System.Drawing.Size(935, 22);
220 this.statusStrip.TabIndex = 5;
221 this.statusStrip.Text = "statusStrip1";
223 // toolStripStatusLabelDevice
225 this.toolStripStatusLabelDevice.Name = "toolStripStatusLabelDevice";
226 this.toolStripStatusLabelDevice.Size = new System.Drawing.Size(61, 17);
227 this.toolStripStatusLabelDevice.Text = "No Device";
231 this.buttonRefresh.Location = new System.Drawing.Point(813, 64);
232 this.buttonRefresh.Name = "buttonRefresh";
233 this.buttonRefresh.Size = new System.Drawing.Size(75, 23);
234 this.buttonRefresh.TabIndex = 3;
235 this.buttonRefresh.Text = "Refresh";
236 this.buttonRefresh.UseVisualStyleBackColor = true;
237 this.buttonRefresh.Click += new System.EventHandler(this.buttonRefresh_Click);
241 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
242 this.BackColor = System.Drawing.SystemColors.Control;
243 this.ClientSize = new System.Drawing.Size(935, 569);
244 this.Controls.Add(this.statusStrip);
245 this.Controls.Add(this.tabControl);
246 this.Name = "MainForm";
247 this.Text = "Remote Control Sample";
248 this.Load += new System.EventHandler(this.MainForm_Load);
249 this.tabControl.ResumeLayout(false);
250 this.tabPageMessages.ResumeLayout(false);
251 this.tabPageMessages.PerformLayout();
252 this.tabPageDevices.ResumeLayout(false);
253 this.tabPageTests.ResumeLayout(false);
254 this.tabPageTests.PerformLayout();
255 this.statusStrip.ResumeLayout(false);
256 this.statusStrip.PerformLayout();
257 this.ResumeLayout(false);
258 this.PerformLayout();
261 #endregion Windows Form Designer generated code
263 private System.Windows.Forms.Button buttonTreeViewExpandAll;
264 private System.Windows.Forms.Button buttonTreeViewCollapseAll;
265 private System.Windows.Forms.StatusStrip statusStrip;
266 private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelDevice;
267 private System.Windows.Forms.TabPage tabPageTests;
268 private System.Windows.Forms.TextBox textBoxTests;
269 private System.Windows.Forms.Button buttonRefresh;