Adding TreeView to display our devices.
1.1 --- a/FrmMain.cs Wed May 14 07:57:55 2014 +0200
1.2 +++ b/FrmMain.cs Wed May 14 15:42:29 2014 +0200
1.3 @@ -8,6 +8,8 @@
1.4 using System.Threading;
1.5 using System.Timers;
1.6 using System.Windows.Forms;
1.7 +using System.Collections.Generic;
1.8 +using System.Drawing;
1.9
1.10 namespace GenericHid
1.11 {
1.12 @@ -205,419 +207,429 @@
1.13 private RadioButton radFeature;
1.14 private RadioButton radInputOutputControl;
1.15 private RadioButton radInputOutputInterrupt;
1.16 + private TreeView treeViewDevices;
1.17 private Button cmdSendOutputReportInterrupt;
1.18
1.19 [System.Diagnostics.DebuggerStepThrough()]
1.20 private void InitializeComponent()
1.21 {
1.22 - this.components = new System.ComponentModel.Container();
1.23 - this.ToolTip1 = new System.Windows.Forms.ToolTip(this.components);
1.24 - this.FraBytesReceived = new System.Windows.Forms.GroupBox();
1.25 - this.TxtBytesReceived = new System.Windows.Forms.TextBox();
1.26 - this.FraBytesToSend = new System.Windows.Forms.GroupBox();
1.27 - this.ChkAutoincrement = new System.Windows.Forms.CheckBox();
1.28 - this.CboByte1 = new System.Windows.Forms.ComboBox();
1.29 - this.CboByte0 = new System.Windows.Forms.ComboBox();
1.30 - this.LstResults = new System.Windows.Forms.ListBox();
1.31 - this.fraInputReportBufferSize = new System.Windows.Forms.GroupBox();
1.32 - this.cmdInputReportBufferSize = new System.Windows.Forms.Button();
1.33 - this.txtInputReportBufferSize = new System.Windows.Forms.TextBox();
1.34 - this.fraDeviceIdentifiers = new System.Windows.Forms.GroupBox();
1.35 - this.txtProductID = new System.Windows.Forms.TextBox();
1.36 - this.lblProductID = new System.Windows.Forms.Label();
1.37 - this.txtVendorID = new System.Windows.Forms.TextBox();
1.38 - this.lblVendorID = new System.Windows.Forms.Label();
1.39 - this.cmdFindDevice = new System.Windows.Forms.Button();
1.40 - this.cmdSendOutputReportInterrupt = new System.Windows.Forms.Button();
1.41 - this.cmdGetInputReportInterrupt = new System.Windows.Forms.Button();
1.42 - this.fraInterruptTransfers = new System.Windows.Forms.GroupBox();
1.43 - this.cmdPeriodicTransfers = new System.Windows.Forms.Button();
1.44 - this.cmdSendOutputReportControl = new System.Windows.Forms.Button();
1.45 - this.cmdGetInputReportControl = new System.Windows.Forms.Button();
1.46 - this.fraControlTransfers = new System.Windows.Forms.GroupBox();
1.47 - this.cmdGetFeatureReport = new System.Windows.Forms.Button();
1.48 - this.cmdSendFeatureReport = new System.Windows.Forms.Button();
1.49 - this.fraSendAndGetContinuous = new System.Windows.Forms.GroupBox();
1.50 - this.radInputOutputInterrupt = new System.Windows.Forms.RadioButton();
1.51 - this.radInputOutputControl = new System.Windows.Forms.RadioButton();
1.52 - this.radFeature = new System.Windows.Forms.RadioButton();
1.53 - this.FraBytesReceived.SuspendLayout();
1.54 - this.FraBytesToSend.SuspendLayout();
1.55 - this.fraInputReportBufferSize.SuspendLayout();
1.56 - this.fraDeviceIdentifiers.SuspendLayout();
1.57 - this.fraInterruptTransfers.SuspendLayout();
1.58 - this.fraControlTransfers.SuspendLayout();
1.59 - this.fraSendAndGetContinuous.SuspendLayout();
1.60 - this.SuspendLayout();
1.61 - //
1.62 - // fraBytesReceived
1.63 - //
1.64 - this.FraBytesReceived.BackColor = System.Drawing.SystemColors.Control;
1.65 - this.FraBytesReceived.Controls.Add(this.TxtBytesReceived);
1.66 - this.FraBytesReceived.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.67 - this.FraBytesReceived.ForeColor = System.Drawing.SystemColors.ControlText;
1.68 - this.FraBytesReceived.Location = new System.Drawing.Point(16, 272);
1.69 - this.FraBytesReceived.Name = "FraBytesReceived";
1.70 - this.FraBytesReceived.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.71 - this.FraBytesReceived.Size = new System.Drawing.Size(112, 136);
1.72 - this.FraBytesReceived.TabIndex = 4;
1.73 - this.FraBytesReceived.TabStop = false;
1.74 - this.FraBytesReceived.Text = "Bytes Received";
1.75 - //
1.76 - // txtBytesReceived
1.77 - //
1.78 - this.TxtBytesReceived.AcceptsReturn = true;
1.79 - this.TxtBytesReceived.BackColor = System.Drawing.SystemColors.Window;
1.80 - this.TxtBytesReceived.Cursor = System.Windows.Forms.Cursors.IBeam;
1.81 - this.TxtBytesReceived.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.82 - this.TxtBytesReceived.ForeColor = System.Drawing.SystemColors.WindowText;
1.83 - this.TxtBytesReceived.Location = new System.Drawing.Point(18, 24);
1.84 - this.TxtBytesReceived.MaxLength = 0;
1.85 - this.TxtBytesReceived.Multiline = true;
1.86 - this.TxtBytesReceived.Name = "TxtBytesReceived";
1.87 - this.TxtBytesReceived.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.88 - this.TxtBytesReceived.Size = new System.Drawing.Size(72, 96);
1.89 - this.TxtBytesReceived.TabIndex = 5;
1.90 - //
1.91 - // fraBytesToSend
1.92 - //
1.93 - this.FraBytesToSend.BackColor = System.Drawing.SystemColors.Control;
1.94 - this.FraBytesToSend.Controls.Add(this.ChkAutoincrement);
1.95 - this.FraBytesToSend.Controls.Add(this.CboByte1);
1.96 - this.FraBytesToSend.Controls.Add(this.CboByte0);
1.97 - this.FraBytesToSend.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.98 - this.FraBytesToSend.ForeColor = System.Drawing.SystemColors.ControlText;
1.99 - this.FraBytesToSend.Location = new System.Drawing.Point(16, 128);
1.100 - this.FraBytesToSend.Name = "FraBytesToSend";
1.101 - this.FraBytesToSend.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.102 - this.FraBytesToSend.Size = new System.Drawing.Size(160, 136);
1.103 - this.FraBytesToSend.TabIndex = 1;
1.104 - this.FraBytesToSend.TabStop = false;
1.105 - this.FraBytesToSend.Text = "Bytes to Send";
1.106 - //
1.107 - // chkAutoincrement
1.108 - //
1.109 - this.ChkAutoincrement.BackColor = System.Drawing.SystemColors.Control;
1.110 - this.ChkAutoincrement.Cursor = System.Windows.Forms.Cursors.Default;
1.111 - this.ChkAutoincrement.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.112 - this.ChkAutoincrement.ForeColor = System.Drawing.SystemColors.ControlText;
1.113 - this.ChkAutoincrement.Location = new System.Drawing.Point(8, 96);
1.114 - this.ChkAutoincrement.Name = "ChkAutoincrement";
1.115 - this.ChkAutoincrement.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.116 - this.ChkAutoincrement.Size = new System.Drawing.Size(201, 35);
1.117 - this.ChkAutoincrement.TabIndex = 6;
1.118 - this.ChkAutoincrement.Text = "Autoincrement values";
1.119 - this.ChkAutoincrement.UseVisualStyleBackColor = false;
1.120 - //
1.121 - // cboByte1
1.122 - //
1.123 - this.CboByte1.BackColor = System.Drawing.SystemColors.Window;
1.124 - this.CboByte1.Cursor = System.Windows.Forms.Cursors.Default;
1.125 - this.CboByte1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
1.126 - this.CboByte1.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.127 - this.CboByte1.ForeColor = System.Drawing.SystemColors.WindowText;
1.128 - this.CboByte1.Location = new System.Drawing.Point(8, 64);
1.129 - this.CboByte1.Name = "CboByte1";
1.130 - this.CboByte1.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.131 - this.CboByte1.Size = new System.Drawing.Size(101, 22);
1.132 - this.CboByte1.TabIndex = 3;
1.133 - //
1.134 - // cboByte0
1.135 - //
1.136 - this.CboByte0.BackColor = System.Drawing.SystemColors.Window;
1.137 - this.CboByte0.Cursor = System.Windows.Forms.Cursors.Default;
1.138 - this.CboByte0.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
1.139 - this.CboByte0.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.140 - this.CboByte0.ForeColor = System.Drawing.SystemColors.WindowText;
1.141 - this.CboByte0.Location = new System.Drawing.Point(8, 24);
1.142 - this.CboByte0.Name = "CboByte0";
1.143 - this.CboByte0.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.144 - this.CboByte0.Size = new System.Drawing.Size(101, 22);
1.145 - this.CboByte0.TabIndex = 2;
1.146 - //
1.147 - // lstResults
1.148 - //
1.149 - this.LstResults.BackColor = System.Drawing.SystemColors.Window;
1.150 - this.LstResults.Cursor = System.Windows.Forms.Cursors.Default;
1.151 - this.LstResults.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.152 - this.LstResults.ForeColor = System.Drawing.SystemColors.WindowText;
1.153 - this.LstResults.HorizontalScrollbar = true;
1.154 - this.LstResults.ItemHeight = 14;
1.155 - this.LstResults.Location = new System.Drawing.Point(12, 424);
1.156 - this.LstResults.Name = "LstResults";
1.157 - this.LstResults.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.158 - this.LstResults.Size = new System.Drawing.Size(760, 326);
1.159 - this.LstResults.TabIndex = 0;
1.160 - //
1.161 - // fraInputReportBufferSize
1.162 - //
1.163 - this.fraInputReportBufferSize.Controls.Add(this.cmdInputReportBufferSize);
1.164 - this.fraInputReportBufferSize.Controls.Add(this.txtInputReportBufferSize);
1.165 - this.fraInputReportBufferSize.Location = new System.Drawing.Point(248, 16);
1.166 - this.fraInputReportBufferSize.Name = "fraInputReportBufferSize";
1.167 - this.fraInputReportBufferSize.Size = new System.Drawing.Size(208, 96);
1.168 - this.fraInputReportBufferSize.TabIndex = 9;
1.169 - this.fraInputReportBufferSize.TabStop = false;
1.170 - this.fraInputReportBufferSize.Text = "Input Report Buffer Size";
1.171 - //
1.172 - // cmdInputReportBufferSize
1.173 - //
1.174 - this.cmdInputReportBufferSize.Location = new System.Drawing.Point(96, 32);
1.175 - this.cmdInputReportBufferSize.Name = "cmdInputReportBufferSize";
1.176 - this.cmdInputReportBufferSize.Size = new System.Drawing.Size(96, 56);
1.177 - this.cmdInputReportBufferSize.TabIndex = 1;
1.178 - this.cmdInputReportBufferSize.Text = "Change Buffer Size";
1.179 - this.cmdInputReportBufferSize.Click += new System.EventHandler(this.cmdInputReportBufferSize_Click);
1.180 - //
1.181 - // txtInputReportBufferSize
1.182 - //
1.183 - this.txtInputReportBufferSize.Location = new System.Drawing.Point(16, 40);
1.184 - this.txtInputReportBufferSize.Name = "txtInputReportBufferSize";
1.185 - this.txtInputReportBufferSize.Size = new System.Drawing.Size(56, 20);
1.186 - this.txtInputReportBufferSize.TabIndex = 0;
1.187 - //
1.188 - // fraDeviceIdentifiers
1.189 - //
1.190 - this.fraDeviceIdentifiers.Controls.Add(this.txtProductID);
1.191 - this.fraDeviceIdentifiers.Controls.Add(this.lblProductID);
1.192 - this.fraDeviceIdentifiers.Controls.Add(this.txtVendorID);
1.193 - this.fraDeviceIdentifiers.Controls.Add(this.lblVendorID);
1.194 - this.fraDeviceIdentifiers.Location = new System.Drawing.Point(16, 16);
1.195 - this.fraDeviceIdentifiers.Name = "fraDeviceIdentifiers";
1.196 - this.fraDeviceIdentifiers.Size = new System.Drawing.Size(208, 96);
1.197 - this.fraDeviceIdentifiers.TabIndex = 10;
1.198 - this.fraDeviceIdentifiers.TabStop = false;
1.199 - this.fraDeviceIdentifiers.Text = "Device Identifiers";
1.200 - //
1.201 - // txtProductID
1.202 - //
1.203 - this.txtProductID.Location = new System.Drawing.Point(120, 56);
1.204 - this.txtProductID.Name = "txtProductID";
1.205 - this.txtProductID.Size = new System.Drawing.Size(72, 20);
1.206 - this.txtProductID.TabIndex = 3;
1.207 - this.txtProductID.Text = "1299";
1.208 - this.txtProductID.TextChanged += new System.EventHandler(this.txtProductID_TextChanged);
1.209 - //
1.210 - // lblProductID
1.211 - //
1.212 - this.lblProductID.Location = new System.Drawing.Point(16, 56);
1.213 - this.lblProductID.Name = "lblProductID";
1.214 - this.lblProductID.Size = new System.Drawing.Size(112, 23);
1.215 - this.lblProductID.TabIndex = 2;
1.216 - this.lblProductID.Text = "Product ID (hex):";
1.217 - //
1.218 - // txtVendorID
1.219 - //
1.220 - this.txtVendorID.Location = new System.Drawing.Point(120, 24);
1.221 - this.txtVendorID.Name = "txtVendorID";
1.222 - this.txtVendorID.Size = new System.Drawing.Size(72, 20);
1.223 - this.txtVendorID.TabIndex = 1;
1.224 - this.txtVendorID.Text = "0925";
1.225 - this.txtVendorID.TextChanged += new System.EventHandler(this.txtVendorID_TextChanged);
1.226 - //
1.227 - // lblVendorID
1.228 - //
1.229 - this.lblVendorID.Location = new System.Drawing.Point(16, 24);
1.230 - this.lblVendorID.Name = "lblVendorID";
1.231 - this.lblVendorID.Size = new System.Drawing.Size(112, 23);
1.232 - this.lblVendorID.TabIndex = 0;
1.233 - this.lblVendorID.Text = "Vendor ID (hex):";
1.234 - //
1.235 - // cmdFindDevice
1.236 - //
1.237 - this.cmdFindDevice.Location = new System.Drawing.Point(483, 37);
1.238 - this.cmdFindDevice.Name = "cmdFindDevice";
1.239 - this.cmdFindDevice.Size = new System.Drawing.Size(136, 55);
1.240 - this.cmdFindDevice.TabIndex = 11;
1.241 - this.cmdFindDevice.Text = "Find My Device";
1.242 - this.cmdFindDevice.Click += new System.EventHandler(this.cmdFindDevice_Click);
1.243 - //
1.244 - // cmdSendOutputReportInterrupt
1.245 - //
1.246 - this.cmdSendOutputReportInterrupt.Location = new System.Drawing.Point(10, 27);
1.247 - this.cmdSendOutputReportInterrupt.Name = "cmdSendOutputReportInterrupt";
1.248 - this.cmdSendOutputReportInterrupt.Size = new System.Drawing.Size(118, 50);
1.249 - this.cmdSendOutputReportInterrupt.TabIndex = 12;
1.250 - this.cmdSendOutputReportInterrupt.Text = "Send Output Report";
1.251 - this.cmdSendOutputReportInterrupt.UseVisualStyleBackColor = true;
1.252 - this.cmdSendOutputReportInterrupt.Click += new System.EventHandler(this.cmdSendOutputReportInterrupt_Click);
1.253 - //
1.254 - // cmdGetInputReportInterrupt
1.255 - //
1.256 - this.cmdGetInputReportInterrupt.Location = new System.Drawing.Point(10, 83);
1.257 - this.cmdGetInputReportInterrupt.Name = "cmdGetInputReportInterrupt";
1.258 - this.cmdGetInputReportInterrupt.Size = new System.Drawing.Size(118, 50);
1.259 - this.cmdGetInputReportInterrupt.TabIndex = 13;
1.260 - this.cmdGetInputReportInterrupt.Text = "Get Input Report";
1.261 - this.cmdGetInputReportInterrupt.UseVisualStyleBackColor = true;
1.262 - this.cmdGetInputReportInterrupt.Click += new System.EventHandler(this.cmdGetInputReportInterrupt_Click);
1.263 - //
1.264 - // fraInterruptTransfers
1.265 - //
1.266 - this.fraInterruptTransfers.BackColor = System.Drawing.SystemColors.Control;
1.267 - this.fraInterruptTransfers.Controls.Add(this.cmdSendOutputReportInterrupt);
1.268 - this.fraInterruptTransfers.Controls.Add(this.cmdGetInputReportInterrupt);
1.269 - this.fraInterruptTransfers.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.270 - this.fraInterruptTransfers.ForeColor = System.Drawing.SystemColors.ControlText;
1.271 - this.fraInterruptTransfers.Location = new System.Drawing.Point(194, 128);
1.272 - this.fraInterruptTransfers.Name = "fraInterruptTransfers";
1.273 - this.fraInterruptTransfers.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.274 - this.fraInterruptTransfers.Size = new System.Drawing.Size(145, 152);
1.275 - this.fraInterruptTransfers.TabIndex = 14;
1.276 - this.fraInterruptTransfers.TabStop = false;
1.277 - this.fraInterruptTransfers.Text = "Interrupt Transfers";
1.278 - //
1.279 - // cmdPeriodicTransfers
1.280 - //
1.281 - this.cmdPeriodicTransfers.Location = new System.Drawing.Point(153, 36);
1.282 - this.cmdPeriodicTransfers.Name = "cmdPeriodicTransfers";
1.283 - this.cmdPeriodicTransfers.Size = new System.Drawing.Size(118, 51);
1.284 - this.cmdPeriodicTransfers.TabIndex = 16;
1.285 - this.cmdPeriodicTransfers.Text = "Start";
1.286 - this.cmdPeriodicTransfers.UseVisualStyleBackColor = true;
1.287 - this.cmdPeriodicTransfers.Click += new System.EventHandler(this.cmdPeriodicTransfers_Click);
1.288 - //
1.289 - // cmdSendOutputReportControl
1.290 - //
1.291 - this.cmdSendOutputReportControl.Location = new System.Drawing.Point(10, 27);
1.292 - this.cmdSendOutputReportControl.Name = "cmdSendOutputReportControl";
1.293 - this.cmdSendOutputReportControl.Size = new System.Drawing.Size(118, 50);
1.294 - this.cmdSendOutputReportControl.TabIndex = 12;
1.295 - this.cmdSendOutputReportControl.Text = "Send Output Report";
1.296 - this.cmdSendOutputReportControl.UseVisualStyleBackColor = true;
1.297 - this.cmdSendOutputReportControl.Click += new System.EventHandler(this.cmdSendOutputReportControl_Click);
1.298 - //
1.299 - // cmdGetInputReportControl
1.300 - //
1.301 - this.cmdGetInputReportControl.Location = new System.Drawing.Point(10, 83);
1.302 - this.cmdGetInputReportControl.Name = "cmdGetInputReportControl";
1.303 - this.cmdGetInputReportControl.Size = new System.Drawing.Size(118, 50);
1.304 - this.cmdGetInputReportControl.TabIndex = 13;
1.305 - this.cmdGetInputReportControl.Text = "Get Input Report";
1.306 - this.cmdGetInputReportControl.UseVisualStyleBackColor = true;
1.307 - this.cmdGetInputReportControl.Click += new System.EventHandler(this.cmdGetInputReportControl_Click);
1.308 - //
1.309 - // fraControlTransfers
1.310 - //
1.311 - this.fraControlTransfers.BackColor = System.Drawing.SystemColors.Control;
1.312 - this.fraControlTransfers.Controls.Add(this.cmdGetFeatureReport);
1.313 - this.fraControlTransfers.Controls.Add(this.cmdSendFeatureReport);
1.314 - this.fraControlTransfers.Controls.Add(this.cmdSendOutputReportControl);
1.315 - this.fraControlTransfers.Controls.Add(this.cmdGetInputReportControl);
1.316 - this.fraControlTransfers.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.317 - this.fraControlTransfers.ForeColor = System.Drawing.SystemColors.ControlText;
1.318 - this.fraControlTransfers.Location = new System.Drawing.Point(359, 128);
1.319 - this.fraControlTransfers.Name = "fraControlTransfers";
1.320 - this.fraControlTransfers.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.321 - this.fraControlTransfers.Size = new System.Drawing.Size(277, 152);
1.322 - this.fraControlTransfers.TabIndex = 15;
1.323 - this.fraControlTransfers.TabStop = false;
1.324 - this.fraControlTransfers.Text = "Control Transfers";
1.325 - //
1.326 - // cmdGetFeatureReport
1.327 - //
1.328 - this.cmdGetFeatureReport.Location = new System.Drawing.Point(141, 83);
1.329 - this.cmdGetFeatureReport.Name = "cmdGetFeatureReport";
1.330 - this.cmdGetFeatureReport.Size = new System.Drawing.Size(118, 50);
1.331 - this.cmdGetFeatureReport.TabIndex = 15;
1.332 - this.cmdGetFeatureReport.Text = "Get Feature Report";
1.333 - this.cmdGetFeatureReport.UseVisualStyleBackColor = true;
1.334 - this.cmdGetFeatureReport.Click += new System.EventHandler(this.cmdGetFeatureReport_Click);
1.335 - //
1.336 - // cmdSendFeatureReport
1.337 - //
1.338 - this.cmdSendFeatureReport.Location = new System.Drawing.Point(141, 27);
1.339 - this.cmdSendFeatureReport.Name = "cmdSendFeatureReport";
1.340 - this.cmdSendFeatureReport.Size = new System.Drawing.Size(118, 50);
1.341 - this.cmdSendFeatureReport.TabIndex = 14;
1.342 - this.cmdSendFeatureReport.Text = "Send Feature Report";
1.343 - this.cmdSendFeatureReport.UseVisualStyleBackColor = true;
1.344 - this.cmdSendFeatureReport.Click += new System.EventHandler(this.cmdSendFeatureReport_Click);
1.345 - //
1.346 - // fraSendAndGetContinuous
1.347 - //
1.348 - this.fraSendAndGetContinuous.BackColor = System.Drawing.SystemColors.Control;
1.349 - this.fraSendAndGetContinuous.Controls.Add(this.radFeature);
1.350 - this.fraSendAndGetContinuous.Controls.Add(this.radInputOutputControl);
1.351 - this.fraSendAndGetContinuous.Controls.Add(this.radInputOutputInterrupt);
1.352 - this.fraSendAndGetContinuous.Controls.Add(this.cmdPeriodicTransfers);
1.353 - this.fraSendAndGetContinuous.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.354 - this.fraSendAndGetContinuous.ForeColor = System.Drawing.SystemColors.ControlText;
1.355 - this.fraSendAndGetContinuous.Location = new System.Drawing.Point(194, 296);
1.356 - this.fraSendAndGetContinuous.Name = "fraSendAndGetContinuous";
1.357 - this.fraSendAndGetContinuous.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.358 - this.fraSendAndGetContinuous.Size = new System.Drawing.Size(295, 112);
1.359 - this.fraSendAndGetContinuous.TabIndex = 17;
1.360 - this.fraSendAndGetContinuous.TabStop = false;
1.361 - this.fraSendAndGetContinuous.Text = "Send and Get Continuous";
1.362 - //
1.363 - // radInputOutputInterrupt
1.364 - //
1.365 - this.radInputOutputInterrupt.AutoSize = true;
1.366 - this.radInputOutputInterrupt.Location = new System.Drawing.Point(17, 28);
1.367 - this.radInputOutputInterrupt.Name = "radInputOutputInterrupt";
1.368 - this.radInputOutputInterrupt.Size = new System.Drawing.Size(126, 18);
1.369 - this.radInputOutputInterrupt.TabIndex = 17;
1.370 - this.radInputOutputInterrupt.TabStop = true;
1.371 - this.radInputOutputInterrupt.Text = "Input Output Interrupt";
1.372 - this.radInputOutputInterrupt.UseVisualStyleBackColor = true;
1.373 - this.radInputOutputInterrupt.CheckedChanged += new System.EventHandler(this.radInputOutputInterrupt_CheckedChanged);
1.374 - //
1.375 - // radInputOutputControl
1.376 - //
1.377 - this.radInputOutputControl.AutoSize = true;
1.378 - this.radInputOutputControl.Location = new System.Drawing.Point(17, 52);
1.379 - this.radInputOutputControl.Name = "radInputOutputControl";
1.380 - this.radInputOutputControl.Size = new System.Drawing.Size(120, 18);
1.381 - this.radInputOutputControl.TabIndex = 18;
1.382 - this.radInputOutputControl.TabStop = true;
1.383 - this.radInputOutputControl.Text = "Input Output Control";
1.384 - this.radInputOutputControl.UseVisualStyleBackColor = true;
1.385 - this.radInputOutputControl.CheckedChanged += new System.EventHandler(this.radInputOutputControl_CheckedChanged);
1.386 - //
1.387 - // radFeature
1.388 - //
1.389 - this.radFeature.AutoSize = true;
1.390 - this.radFeature.Location = new System.Drawing.Point(17, 76);
1.391 - this.radFeature.Name = "radFeature";
1.392 - this.radFeature.Size = new System.Drawing.Size(62, 18);
1.393 - this.radFeature.TabIndex = 19;
1.394 - this.radFeature.TabStop = true;
1.395 - this.radFeature.Text = "Feature";
1.396 - this.radFeature.UseVisualStyleBackColor = true;
1.397 - this.radFeature.CheckedChanged += new System.EventHandler(this.radFeature_CheckedChanged);
1.398 - //
1.399 - // FrmMain
1.400 - //
1.401 - this.ClientSize = new System.Drawing.Size(784, 756);
1.402 - this.Controls.Add(this.fraSendAndGetContinuous);
1.403 - this.Controls.Add(this.fraControlTransfers);
1.404 - this.Controls.Add(this.fraInterruptTransfers);
1.405 - this.Controls.Add(this.cmdFindDevice);
1.406 - this.Controls.Add(this.fraDeviceIdentifiers);
1.407 - this.Controls.Add(this.fraInputReportBufferSize);
1.408 - this.Controls.Add(this.FraBytesReceived);
1.409 - this.Controls.Add(this.FraBytesToSend);
1.410 - this.Controls.Add(this.LstResults);
1.411 - this.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.412 - this.Location = new System.Drawing.Point(21, 28);
1.413 - this.Name = "FrmMain";
1.414 - this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
1.415 - this.Text = "Generic HID Tester";
1.416 - this.Closed += new System.EventHandler(this.frmMain_Closed);
1.417 - this.Load += new System.EventHandler(this.frmMain_Load);
1.418 - this.FraBytesReceived.ResumeLayout(false);
1.419 - this.FraBytesReceived.PerformLayout();
1.420 - this.FraBytesToSend.ResumeLayout(false);
1.421 - this.fraInputReportBufferSize.ResumeLayout(false);
1.422 - this.fraInputReportBufferSize.PerformLayout();
1.423 - this.fraDeviceIdentifiers.ResumeLayout(false);
1.424 - this.fraDeviceIdentifiers.PerformLayout();
1.425 - this.fraInterruptTransfers.ResumeLayout(false);
1.426 - this.fraControlTransfers.ResumeLayout(false);
1.427 - this.fraSendAndGetContinuous.ResumeLayout(false);
1.428 - this.fraSendAndGetContinuous.PerformLayout();
1.429 - this.ResumeLayout(false);
1.430 + this.components = new System.ComponentModel.Container();
1.431 + this.ToolTip1 = new System.Windows.Forms.ToolTip(this.components);
1.432 + this.FraBytesReceived = new System.Windows.Forms.GroupBox();
1.433 + this.TxtBytesReceived = new System.Windows.Forms.TextBox();
1.434 + this.FraBytesToSend = new System.Windows.Forms.GroupBox();
1.435 + this.ChkAutoincrement = new System.Windows.Forms.CheckBox();
1.436 + this.CboByte1 = new System.Windows.Forms.ComboBox();
1.437 + this.CboByte0 = new System.Windows.Forms.ComboBox();
1.438 + this.LstResults = new System.Windows.Forms.ListBox();
1.439 + this.fraInputReportBufferSize = new System.Windows.Forms.GroupBox();
1.440 + this.cmdInputReportBufferSize = new System.Windows.Forms.Button();
1.441 + this.txtInputReportBufferSize = new System.Windows.Forms.TextBox();
1.442 + this.fraDeviceIdentifiers = new System.Windows.Forms.GroupBox();
1.443 + this.txtProductID = new System.Windows.Forms.TextBox();
1.444 + this.lblProductID = new System.Windows.Forms.Label();
1.445 + this.txtVendorID = new System.Windows.Forms.TextBox();
1.446 + this.lblVendorID = new System.Windows.Forms.Label();
1.447 + this.cmdFindDevice = new System.Windows.Forms.Button();
1.448 + this.cmdSendOutputReportInterrupt = new System.Windows.Forms.Button();
1.449 + this.cmdGetInputReportInterrupt = new System.Windows.Forms.Button();
1.450 + this.fraInterruptTransfers = new System.Windows.Forms.GroupBox();
1.451 + this.cmdPeriodicTransfers = new System.Windows.Forms.Button();
1.452 + this.cmdSendOutputReportControl = new System.Windows.Forms.Button();
1.453 + this.cmdGetInputReportControl = new System.Windows.Forms.Button();
1.454 + this.fraControlTransfers = new System.Windows.Forms.GroupBox();
1.455 + this.cmdGetFeatureReport = new System.Windows.Forms.Button();
1.456 + this.cmdSendFeatureReport = new System.Windows.Forms.Button();
1.457 + this.fraSendAndGetContinuous = new System.Windows.Forms.GroupBox();
1.458 + this.radFeature = new System.Windows.Forms.RadioButton();
1.459 + this.radInputOutputControl = new System.Windows.Forms.RadioButton();
1.460 + this.radInputOutputInterrupt = new System.Windows.Forms.RadioButton();
1.461 + this.treeViewDevices = new System.Windows.Forms.TreeView();
1.462 + this.FraBytesReceived.SuspendLayout();
1.463 + this.FraBytesToSend.SuspendLayout();
1.464 + this.fraInputReportBufferSize.SuspendLayout();
1.465 + this.fraDeviceIdentifiers.SuspendLayout();
1.466 + this.fraInterruptTransfers.SuspendLayout();
1.467 + this.fraControlTransfers.SuspendLayout();
1.468 + this.fraSendAndGetContinuous.SuspendLayout();
1.469 + this.SuspendLayout();
1.470 + //
1.471 + // FraBytesReceived
1.472 + //
1.473 + this.FraBytesReceived.BackColor = System.Drawing.SystemColors.Control;
1.474 + this.FraBytesReceived.Controls.Add(this.TxtBytesReceived);
1.475 + this.FraBytesReceived.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.476 + this.FraBytesReceived.ForeColor = System.Drawing.SystemColors.ControlText;
1.477 + this.FraBytesReceived.Location = new System.Drawing.Point(495, 353);
1.478 + this.FraBytesReceived.Name = "FraBytesReceived";
1.479 + this.FraBytesReceived.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.480 + this.FraBytesReceived.Size = new System.Drawing.Size(112, 136);
1.481 + this.FraBytesReceived.TabIndex = 4;
1.482 + this.FraBytesReceived.TabStop = false;
1.483 + this.FraBytesReceived.Text = "Bytes Received";
1.484 + //
1.485 + // TxtBytesReceived
1.486 + //
1.487 + this.TxtBytesReceived.AcceptsReturn = true;
1.488 + this.TxtBytesReceived.BackColor = System.Drawing.SystemColors.Window;
1.489 + this.TxtBytesReceived.Cursor = System.Windows.Forms.Cursors.IBeam;
1.490 + this.TxtBytesReceived.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.491 + this.TxtBytesReceived.ForeColor = System.Drawing.SystemColors.WindowText;
1.492 + this.TxtBytesReceived.Location = new System.Drawing.Point(18, 24);
1.493 + this.TxtBytesReceived.MaxLength = 0;
1.494 + this.TxtBytesReceived.Multiline = true;
1.495 + this.TxtBytesReceived.Name = "TxtBytesReceived";
1.496 + this.TxtBytesReceived.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.497 + this.TxtBytesReceived.Size = new System.Drawing.Size(72, 96);
1.498 + this.TxtBytesReceived.TabIndex = 5;
1.499 + //
1.500 + // FraBytesToSend
1.501 + //
1.502 + this.FraBytesToSend.BackColor = System.Drawing.SystemColors.Control;
1.503 + this.FraBytesToSend.Controls.Add(this.ChkAutoincrement);
1.504 + this.FraBytesToSend.Controls.Add(this.CboByte1);
1.505 + this.FraBytesToSend.Controls.Add(this.CboByte0);
1.506 + this.FraBytesToSend.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.507 + this.FraBytesToSend.ForeColor = System.Drawing.SystemColors.ControlText;
1.508 + this.FraBytesToSend.Location = new System.Drawing.Point(612, 235);
1.509 + this.FraBytesToSend.Name = "FraBytesToSend";
1.510 + this.FraBytesToSend.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.511 + this.FraBytesToSend.Size = new System.Drawing.Size(160, 136);
1.512 + this.FraBytesToSend.TabIndex = 1;
1.513 + this.FraBytesToSend.TabStop = false;
1.514 + this.FraBytesToSend.Text = "Bytes to Send";
1.515 + //
1.516 + // ChkAutoincrement
1.517 + //
1.518 + this.ChkAutoincrement.BackColor = System.Drawing.SystemColors.Control;
1.519 + this.ChkAutoincrement.Cursor = System.Windows.Forms.Cursors.Default;
1.520 + this.ChkAutoincrement.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.521 + this.ChkAutoincrement.ForeColor = System.Drawing.SystemColors.ControlText;
1.522 + this.ChkAutoincrement.Location = new System.Drawing.Point(8, 96);
1.523 + this.ChkAutoincrement.Name = "ChkAutoincrement";
1.524 + this.ChkAutoincrement.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.525 + this.ChkAutoincrement.Size = new System.Drawing.Size(201, 35);
1.526 + this.ChkAutoincrement.TabIndex = 6;
1.527 + this.ChkAutoincrement.Text = "Autoincrement values";
1.528 + this.ChkAutoincrement.UseVisualStyleBackColor = false;
1.529 + //
1.530 + // CboByte1
1.531 + //
1.532 + this.CboByte1.BackColor = System.Drawing.SystemColors.Window;
1.533 + this.CboByte1.Cursor = System.Windows.Forms.Cursors.Default;
1.534 + this.CboByte1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
1.535 + this.CboByte1.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.536 + this.CboByte1.ForeColor = System.Drawing.SystemColors.WindowText;
1.537 + this.CboByte1.Location = new System.Drawing.Point(8, 64);
1.538 + this.CboByte1.Name = "CboByte1";
1.539 + this.CboByte1.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.540 + this.CboByte1.Size = new System.Drawing.Size(101, 22);
1.541 + this.CboByte1.TabIndex = 3;
1.542 + //
1.543 + // CboByte0
1.544 + //
1.545 + this.CboByte0.BackColor = System.Drawing.SystemColors.Window;
1.546 + this.CboByte0.Cursor = System.Windows.Forms.Cursors.Default;
1.547 + this.CboByte0.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
1.548 + this.CboByte0.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.549 + this.CboByte0.ForeColor = System.Drawing.SystemColors.WindowText;
1.550 + this.CboByte0.Location = new System.Drawing.Point(8, 24);
1.551 + this.CboByte0.Name = "CboByte0";
1.552 + this.CboByte0.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.553 + this.CboByte0.Size = new System.Drawing.Size(101, 22);
1.554 + this.CboByte0.TabIndex = 2;
1.555 + //
1.556 + // LstResults
1.557 + //
1.558 + this.LstResults.BackColor = System.Drawing.SystemColors.Window;
1.559 + this.LstResults.Cursor = System.Windows.Forms.Cursors.Default;
1.560 + this.LstResults.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.561 + this.LstResults.ForeColor = System.Drawing.SystemColors.WindowText;
1.562 + this.LstResults.HorizontalScrollbar = true;
1.563 + this.LstResults.ItemHeight = 14;
1.564 + this.LstResults.Location = new System.Drawing.Point(12, 494);
1.565 + this.LstResults.Name = "LstResults";
1.566 + this.LstResults.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.567 + this.LstResults.Size = new System.Drawing.Size(760, 256);
1.568 + this.LstResults.TabIndex = 0;
1.569 + //
1.570 + // fraInputReportBufferSize
1.571 + //
1.572 + this.fraInputReportBufferSize.Controls.Add(this.cmdInputReportBufferSize);
1.573 + this.fraInputReportBufferSize.Controls.Add(this.txtInputReportBufferSize);
1.574 + this.fraInputReportBufferSize.Location = new System.Drawing.Point(623, 44);
1.575 + this.fraInputReportBufferSize.Name = "fraInputReportBufferSize";
1.576 + this.fraInputReportBufferSize.Size = new System.Drawing.Size(149, 79);
1.577 + this.fraInputReportBufferSize.TabIndex = 9;
1.578 + this.fraInputReportBufferSize.TabStop = false;
1.579 + this.fraInputReportBufferSize.Text = "Input Report Buffer Size";
1.580 + //
1.581 + // cmdInputReportBufferSize
1.582 + //
1.583 + this.cmdInputReportBufferSize.Location = new System.Drawing.Point(6, 47);
1.584 + this.cmdInputReportBufferSize.Name = "cmdInputReportBufferSize";
1.585 + this.cmdInputReportBufferSize.Size = new System.Drawing.Size(136, 26);
1.586 + this.cmdInputReportBufferSize.TabIndex = 1;
1.587 + this.cmdInputReportBufferSize.Text = "Change Buffer Size";
1.588 + this.cmdInputReportBufferSize.Click += new System.EventHandler(this.cmdInputReportBufferSize_Click);
1.589 + //
1.590 + // txtInputReportBufferSize
1.591 + //
1.592 + this.txtInputReportBufferSize.Location = new System.Drawing.Point(6, 21);
1.593 + this.txtInputReportBufferSize.Name = "txtInputReportBufferSize";
1.594 + this.txtInputReportBufferSize.Size = new System.Drawing.Size(56, 20);
1.595 + this.txtInputReportBufferSize.TabIndex = 0;
1.596 + //
1.597 + // fraDeviceIdentifiers
1.598 + //
1.599 + this.fraDeviceIdentifiers.Controls.Add(this.txtProductID);
1.600 + this.fraDeviceIdentifiers.Controls.Add(this.lblProductID);
1.601 + this.fraDeviceIdentifiers.Controls.Add(this.txtVendorID);
1.602 + this.fraDeviceIdentifiers.Controls.Add(this.lblVendorID);
1.603 + this.fraDeviceIdentifiers.Location = new System.Drawing.Point(409, 12);
1.604 + this.fraDeviceIdentifiers.Name = "fraDeviceIdentifiers";
1.605 + this.fraDeviceIdentifiers.Size = new System.Drawing.Size(208, 96);
1.606 + this.fraDeviceIdentifiers.TabIndex = 10;
1.607 + this.fraDeviceIdentifiers.TabStop = false;
1.608 + this.fraDeviceIdentifiers.Text = "Device Identifiers";
1.609 + //
1.610 + // txtProductID
1.611 + //
1.612 + this.txtProductID.Location = new System.Drawing.Point(120, 56);
1.613 + this.txtProductID.Name = "txtProductID";
1.614 + this.txtProductID.Size = new System.Drawing.Size(72, 20);
1.615 + this.txtProductID.TabIndex = 3;
1.616 + this.txtProductID.Text = "1299";
1.617 + this.txtProductID.TextChanged += new System.EventHandler(this.txtProductID_TextChanged);
1.618 + //
1.619 + // lblProductID
1.620 + //
1.621 + this.lblProductID.Location = new System.Drawing.Point(16, 56);
1.622 + this.lblProductID.Name = "lblProductID";
1.623 + this.lblProductID.Size = new System.Drawing.Size(112, 23);
1.624 + this.lblProductID.TabIndex = 2;
1.625 + this.lblProductID.Text = "Product ID (hex):";
1.626 + //
1.627 + // txtVendorID
1.628 + //
1.629 + this.txtVendorID.Location = new System.Drawing.Point(120, 24);
1.630 + this.txtVendorID.Name = "txtVendorID";
1.631 + this.txtVendorID.Size = new System.Drawing.Size(72, 20);
1.632 + this.txtVendorID.TabIndex = 1;
1.633 + this.txtVendorID.Text = "0925";
1.634 + this.txtVendorID.TextChanged += new System.EventHandler(this.txtVendorID_TextChanged);
1.635 + //
1.636 + // lblVendorID
1.637 + //
1.638 + this.lblVendorID.Location = new System.Drawing.Point(16, 24);
1.639 + this.lblVendorID.Name = "lblVendorID";
1.640 + this.lblVendorID.Size = new System.Drawing.Size(112, 23);
1.641 + this.lblVendorID.TabIndex = 0;
1.642 + this.lblVendorID.Text = "Vendor ID (hex):";
1.643 + //
1.644 + // cmdFindDevice
1.645 + //
1.646 + this.cmdFindDevice.Location = new System.Drawing.Point(636, 12);
1.647 + this.cmdFindDevice.Name = "cmdFindDevice";
1.648 + this.cmdFindDevice.Size = new System.Drawing.Size(136, 26);
1.649 + this.cmdFindDevice.TabIndex = 11;
1.650 + this.cmdFindDevice.Text = "Find My Device";
1.651 + this.cmdFindDevice.Click += new System.EventHandler(this.cmdFindDevice_Click);
1.652 + //
1.653 + // cmdSendOutputReportInterrupt
1.654 + //
1.655 + this.cmdSendOutputReportInterrupt.Location = new System.Drawing.Point(21, 27);
1.656 + this.cmdSendOutputReportInterrupt.Name = "cmdSendOutputReportInterrupt";
1.657 + this.cmdSendOutputReportInterrupt.Size = new System.Drawing.Size(118, 26);
1.658 + this.cmdSendOutputReportInterrupt.TabIndex = 12;
1.659 + this.cmdSendOutputReportInterrupt.Text = "Send Output Report";
1.660 + this.cmdSendOutputReportInterrupt.UseVisualStyleBackColor = true;
1.661 + this.cmdSendOutputReportInterrupt.Click += new System.EventHandler(this.cmdSendOutputReportInterrupt_Click);
1.662 + //
1.663 + // cmdGetInputReportInterrupt
1.664 + //
1.665 + this.cmdGetInputReportInterrupt.Location = new System.Drawing.Point(21, 60);
1.666 + this.cmdGetInputReportInterrupt.Name = "cmdGetInputReportInterrupt";
1.667 + this.cmdGetInputReportInterrupt.Size = new System.Drawing.Size(118, 26);
1.668 + this.cmdGetInputReportInterrupt.TabIndex = 13;
1.669 + this.cmdGetInputReportInterrupt.Text = "Get Input Report";
1.670 + this.cmdGetInputReportInterrupt.UseVisualStyleBackColor = true;
1.671 + this.cmdGetInputReportInterrupt.Click += new System.EventHandler(this.cmdGetInputReportInterrupt_Click);
1.672 + //
1.673 + // fraInterruptTransfers
1.674 + //
1.675 + this.fraInterruptTransfers.BackColor = System.Drawing.SystemColors.Control;
1.676 + this.fraInterruptTransfers.Controls.Add(this.cmdSendOutputReportInterrupt);
1.677 + this.fraInterruptTransfers.Controls.Add(this.cmdGetInputReportInterrupt);
1.678 + this.fraInterruptTransfers.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.679 + this.fraInterruptTransfers.ForeColor = System.Drawing.SystemColors.ControlText;
1.680 + this.fraInterruptTransfers.Location = new System.Drawing.Point(338, 129);
1.681 + this.fraInterruptTransfers.Name = "fraInterruptTransfers";
1.682 + this.fraInterruptTransfers.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.683 + this.fraInterruptTransfers.Size = new System.Drawing.Size(151, 100);
1.684 + this.fraInterruptTransfers.TabIndex = 14;
1.685 + this.fraInterruptTransfers.TabStop = false;
1.686 + this.fraInterruptTransfers.Text = "Interrupt Transfers";
1.687 + //
1.688 + // cmdPeriodicTransfers
1.689 + //
1.690 + this.cmdPeriodicTransfers.Location = new System.Drawing.Point(153, 36);
1.691 + this.cmdPeriodicTransfers.Name = "cmdPeriodicTransfers";
1.692 + this.cmdPeriodicTransfers.Size = new System.Drawing.Size(118, 26);
1.693 + this.cmdPeriodicTransfers.TabIndex = 16;
1.694 + this.cmdPeriodicTransfers.Text = "Start";
1.695 + this.cmdPeriodicTransfers.UseVisualStyleBackColor = true;
1.696 + this.cmdPeriodicTransfers.Click += new System.EventHandler(this.cmdPeriodicTransfers_Click);
1.697 + //
1.698 + // cmdSendOutputReportControl
1.699 + //
1.700 + this.cmdSendOutputReportControl.Location = new System.Drawing.Point(10, 27);
1.701 + this.cmdSendOutputReportControl.Name = "cmdSendOutputReportControl";
1.702 + this.cmdSendOutputReportControl.Size = new System.Drawing.Size(118, 26);
1.703 + this.cmdSendOutputReportControl.TabIndex = 12;
1.704 + this.cmdSendOutputReportControl.Text = "Send Output Report";
1.705 + this.cmdSendOutputReportControl.UseVisualStyleBackColor = true;
1.706 + this.cmdSendOutputReportControl.Click += new System.EventHandler(this.cmdSendOutputReportControl_Click);
1.707 + //
1.708 + // cmdGetInputReportControl
1.709 + //
1.710 + this.cmdGetInputReportControl.Location = new System.Drawing.Point(10, 60);
1.711 + this.cmdGetInputReportControl.Name = "cmdGetInputReportControl";
1.712 + this.cmdGetInputReportControl.Size = new System.Drawing.Size(118, 26);
1.713 + this.cmdGetInputReportControl.TabIndex = 13;
1.714 + this.cmdGetInputReportControl.Text = "Get Input Report";
1.715 + this.cmdGetInputReportControl.UseVisualStyleBackColor = true;
1.716 + this.cmdGetInputReportControl.Click += new System.EventHandler(this.cmdGetInputReportControl_Click);
1.717 + //
1.718 + // fraControlTransfers
1.719 + //
1.720 + this.fraControlTransfers.BackColor = System.Drawing.SystemColors.Control;
1.721 + this.fraControlTransfers.Controls.Add(this.cmdGetFeatureReport);
1.722 + this.fraControlTransfers.Controls.Add(this.cmdSendFeatureReport);
1.723 + this.fraControlTransfers.Controls.Add(this.cmdSendOutputReportControl);
1.724 + this.fraControlTransfers.Controls.Add(this.cmdGetInputReportControl);
1.725 + this.fraControlTransfers.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.726 + this.fraControlTransfers.ForeColor = System.Drawing.SystemColors.ControlText;
1.727 + this.fraControlTransfers.Location = new System.Drawing.Point(495, 129);
1.728 + this.fraControlTransfers.Name = "fraControlTransfers";
1.729 + this.fraControlTransfers.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.730 + this.fraControlTransfers.Size = new System.Drawing.Size(277, 100);
1.731 + this.fraControlTransfers.TabIndex = 15;
1.732 + this.fraControlTransfers.TabStop = false;
1.733 + this.fraControlTransfers.Text = "Control Transfers";
1.734 + //
1.735 + // cmdGetFeatureReport
1.736 + //
1.737 + this.cmdGetFeatureReport.Location = new System.Drawing.Point(141, 60);
1.738 + this.cmdGetFeatureReport.Name = "cmdGetFeatureReport";
1.739 + this.cmdGetFeatureReport.Size = new System.Drawing.Size(118, 26);
1.740 + this.cmdGetFeatureReport.TabIndex = 15;
1.741 + this.cmdGetFeatureReport.Text = "Get Feature Report";
1.742 + this.cmdGetFeatureReport.UseVisualStyleBackColor = true;
1.743 + this.cmdGetFeatureReport.Click += new System.EventHandler(this.cmdGetFeatureReport_Click);
1.744 + //
1.745 + // cmdSendFeatureReport
1.746 + //
1.747 + this.cmdSendFeatureReport.Location = new System.Drawing.Point(141, 27);
1.748 + this.cmdSendFeatureReport.Name = "cmdSendFeatureReport";
1.749 + this.cmdSendFeatureReport.Size = new System.Drawing.Size(118, 26);
1.750 + this.cmdSendFeatureReport.TabIndex = 14;
1.751 + this.cmdSendFeatureReport.Text = "Send Feature Report";
1.752 + this.cmdSendFeatureReport.UseVisualStyleBackColor = true;
1.753 + this.cmdSendFeatureReport.Click += new System.EventHandler(this.cmdSendFeatureReport_Click);
1.754 + //
1.755 + // fraSendAndGetContinuous
1.756 + //
1.757 + this.fraSendAndGetContinuous.BackColor = System.Drawing.SystemColors.Control;
1.758 + this.fraSendAndGetContinuous.Controls.Add(this.radFeature);
1.759 + this.fraSendAndGetContinuous.Controls.Add(this.radInputOutputControl);
1.760 + this.fraSendAndGetContinuous.Controls.Add(this.radInputOutputInterrupt);
1.761 + this.fraSendAndGetContinuous.Controls.Add(this.cmdPeriodicTransfers);
1.762 + this.fraSendAndGetContinuous.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.763 + this.fraSendAndGetContinuous.ForeColor = System.Drawing.SystemColors.ControlText;
1.764 + this.fraSendAndGetContinuous.Location = new System.Drawing.Point(311, 235);
1.765 + this.fraSendAndGetContinuous.Name = "fraSendAndGetContinuous";
1.766 + this.fraSendAndGetContinuous.RightToLeft = System.Windows.Forms.RightToLeft.No;
1.767 + this.fraSendAndGetContinuous.Size = new System.Drawing.Size(295, 112);
1.768 + this.fraSendAndGetContinuous.TabIndex = 17;
1.769 + this.fraSendAndGetContinuous.TabStop = false;
1.770 + this.fraSendAndGetContinuous.Text = "Send and Get Continuous";
1.771 + //
1.772 + // radFeature
1.773 + //
1.774 + this.radFeature.AutoSize = true;
1.775 + this.radFeature.Location = new System.Drawing.Point(17, 76);
1.776 + this.radFeature.Name = "radFeature";
1.777 + this.radFeature.Size = new System.Drawing.Size(62, 18);
1.778 + this.radFeature.TabIndex = 19;
1.779 + this.radFeature.TabStop = true;
1.780 + this.radFeature.Text = "Feature";
1.781 + this.radFeature.UseVisualStyleBackColor = true;
1.782 + this.radFeature.CheckedChanged += new System.EventHandler(this.radFeature_CheckedChanged);
1.783 + //
1.784 + // radInputOutputControl
1.785 + //
1.786 + this.radInputOutputControl.AutoSize = true;
1.787 + this.radInputOutputControl.Location = new System.Drawing.Point(17, 52);
1.788 + this.radInputOutputControl.Name = "radInputOutputControl";
1.789 + this.radInputOutputControl.Size = new System.Drawing.Size(120, 18);
1.790 + this.radInputOutputControl.TabIndex = 18;
1.791 + this.radInputOutputControl.TabStop = true;
1.792 + this.radInputOutputControl.Text = "Input Output Control";
1.793 + this.radInputOutputControl.UseVisualStyleBackColor = true;
1.794 + this.radInputOutputControl.CheckedChanged += new System.EventHandler(this.radInputOutputControl_CheckedChanged);
1.795 + //
1.796 + // radInputOutputInterrupt
1.797 + //
1.798 + this.radInputOutputInterrupt.AutoSize = true;
1.799 + this.radInputOutputInterrupt.Location = new System.Drawing.Point(17, 28);
1.800 + this.radInputOutputInterrupt.Name = "radInputOutputInterrupt";
1.801 + this.radInputOutputInterrupt.Size = new System.Drawing.Size(126, 18);
1.802 + this.radInputOutputInterrupt.TabIndex = 17;
1.803 + this.radInputOutputInterrupt.TabStop = true;
1.804 + this.radInputOutputInterrupt.Text = "Input Output Interrupt";
1.805 + this.radInputOutputInterrupt.UseVisualStyleBackColor = true;
1.806 + this.radInputOutputInterrupt.CheckedChanged += new System.EventHandler(this.radInputOutputInterrupt_CheckedChanged);
1.807 + //
1.808 + // treeViewDevices
1.809 + //
1.810 + this.treeViewDevices.Location = new System.Drawing.Point(12, 12);
1.811 + this.treeViewDevices.Name = "treeViewDevices";
1.812 + this.treeViewDevices.Size = new System.Drawing.Size(284, 461);
1.813 + this.treeViewDevices.TabIndex = 18;
1.814 + //
1.815 + // FrmMain
1.816 + //
1.817 + this.ClientSize = new System.Drawing.Size(784, 756);
1.818 + this.Controls.Add(this.treeViewDevices);
1.819 + this.Controls.Add(this.fraSendAndGetContinuous);
1.820 + this.Controls.Add(this.fraControlTransfers);
1.821 + this.Controls.Add(this.fraInterruptTransfers);
1.822 + this.Controls.Add(this.cmdFindDevice);
1.823 + this.Controls.Add(this.fraDeviceIdentifiers);
1.824 + this.Controls.Add(this.fraInputReportBufferSize);
1.825 + this.Controls.Add(this.FraBytesReceived);
1.826 + this.Controls.Add(this.FraBytesToSend);
1.827 + this.Controls.Add(this.LstResults);
1.828 + this.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
1.829 + this.Location = new System.Drawing.Point(21, 28);
1.830 + this.Name = "FrmMain";
1.831 + this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
1.832 + this.Text = "Generic HID Tester";
1.833 + this.Closed += new System.EventHandler(this.frmMain_Closed);
1.834 + this.Load += new System.EventHandler(this.frmMain_Load);
1.835 + this.FraBytesReceived.ResumeLayout(false);
1.836 + this.FraBytesReceived.PerformLayout();
1.837 + this.FraBytesToSend.ResumeLayout(false);
1.838 + this.fraInputReportBufferSize.ResumeLayout(false);
1.839 + this.fraInputReportBufferSize.PerformLayout();
1.840 + this.fraDeviceIdentifiers.ResumeLayout(false);
1.841 + this.fraDeviceIdentifiers.PerformLayout();
1.842 + this.fraInterruptTransfers.ResumeLayout(false);
1.843 + this.fraControlTransfers.ResumeLayout(false);
1.844 + this.fraSendAndGetContinuous.ResumeLayout(false);
1.845 + this.fraSendAndGetContinuous.PerformLayout();
1.846 + this.ResumeLayout(false);
1.847
1.848 }
1.849 #endregion '"Windows Form Designer generated code "'
1.850 @@ -654,7 +666,10 @@
1.851 EnableInputReportBufferSize,
1.852 EnableSendOutputReportInterrupt,
1.853 ScrollToBottomOfListBox,
1.854 - SetInputReportBufferSize
1.855 + SetInputReportBufferSize,
1.856 + AddDeviceToTreeView,
1.857 + ResetDeviceTreeView,
1.858 + SelectDeviceInTreeView
1.859 }
1.860
1.861 private enum ReportReadOrWritten
1.862 @@ -698,7 +713,7 @@
1.863 // This delegate has the same parameters as AccessForm.
1.864 // Used in accessing the application's form from a different thread.
1.865
1.866 - private delegate void MarshalDataToForm(FormActions action, String textToAdd);
1.867 + private delegate void MarshalDataToForm(FormActions action, params string[] strings);
1.868
1.869 /// <summary>
1.870 /// Performs various application-specific functions that
1.871 @@ -709,7 +724,7 @@
1.872 /// <param name="formText"> text that the form displays or the code uses for
1.873 /// another purpose. Actions that don't use text ignore this parameter. </param>
1.874
1.875 - private void AccessForm(FormActions action, String formText)
1.876 + private void AccessForm(FormActions action, params string[] strings)
1.877 {
1.878 try
1.879 {
1.880 @@ -719,7 +734,7 @@
1.881 {
1.882 case FormActions.AddItemToListBox:
1.883
1.884 - LstResults.Items.Add(formText);
1.885 + LstResults.Items.Add(strings[0]);
1.886 break;
1.887
1.888 case FormActions.DisableInputReportBufferSize:
1.889 @@ -749,8 +764,41 @@
1.890
1.891 case FormActions.SetInputReportBufferSize:
1.892
1.893 - txtInputReportBufferSize.Text = formText;
1.894 + txtInputReportBufferSize.Text = strings[0];
1.895 break;
1.896 +
1.897 + case FormActions.AddDeviceToTreeView:
1.898 + //Build our node from our string array
1.899 + TreeNode newNode = new TreeNode(strings[0]);
1.900 + for (int i=1;i<strings.Length;i++)
1.901 + {
1.902 + newNode.Nodes.Add(strings[i]);
1.903 + if (strings[i].StartsWith("Name: "))
1.904 + {
1.905 + //Found our name property, update our node text
1.906 + newNode.Text = strings[i].Substring(6, strings[i].Length - 6);
1.907 + }
1.908 + }
1.909 +
1.910 + newNode.Name = strings[0]; //Set ID as name to make sure we can find it
1.911 + treeViewDevices.Nodes.Add(newNode);
1.912 + break;
1.913 +
1.914 + case FormActions.ResetDeviceTreeView:
1.915 + treeViewDevices.Nodes.Clear();
1.916 + break;
1.917 +
1.918 + case FormActions.SelectDeviceInTreeView:
1.919 + treeViewDevices.SelectedNode = null;
1.920 + TreeNode[] res=treeViewDevices.Nodes.Find(strings[0], false);
1.921 + if (res.Length>0)
1.922 + {
1.923 + treeViewDevices.SelectedNode = res[0];
1.924 + treeViewDevices.SelectedNode.ForeColor = Color.Blue;
1.925 + }
1.926 +
1.927 +
1.928 + break;
1.929 }
1.930 }
1.931 catch (Exception ex)
1.932 @@ -1332,6 +1380,7 @@
1.933 {
1.934 try
1.935 {
1.936 + MyMarshalDataToForm(FormActions.ResetDeviceTreeView);
1.937 // Prepend "@" to string below to treat backslash as a normal character (not escape character):
1.938
1.939 String deviceIdString = @"USB\VID_" + _myVendorId.ToString("X4") + "&PID_" + _myProductId.ToString("X4");
1.940 @@ -1345,33 +1394,40 @@
1.941 string deviceId = queryObj["PNPDeviceID"].ToString();
1.942 if (deviceId.Contains(deviceIdString))
1.943 {
1.944 - usbDeviceCounter++;
1.945 _deviceDetected = true;
1.946 - MyMarshalDataToForm(FormActions.AddItemToListBox, "--------");
1.947 MyMarshalDataToForm(FormActions.AddItemToListBox, "My device found (WMI):");
1.948
1.949 + MyMarshalDataToForm(FormActions.AddItemToListBox, "--------");
1.950 + List<string> device = new List<string>();
1.951 + device.Add(deviceId);
1.952 + usbDeviceCounter++;
1.953 // Display device properties.
1.954 -
1.955 foreach (WmiDeviceProperties wmiDeviceProperty in Enum.GetValues(typeof(WmiDeviceProperties)))
1.956 {
1.957 MyMarshalDataToForm(FormActions.AddItemToListBox, (wmiDeviceProperty.ToString() + ": " + queryObj[wmiDeviceProperty.ToString()]));
1.958 + device.Add((wmiDeviceProperty.ToString() + ": " + queryObj[wmiDeviceProperty.ToString()]));
1.959 Debug.WriteLine(wmiDeviceProperty.ToString() + ": {0}", queryObj[wmiDeviceProperty.ToString()]);
1.960 }
1.961 MyMarshalDataToForm(FormActions.AddItemToListBox, "--------");
1.962 MyMarshalDataToForm(FormActions.ScrollToBottomOfListBox, "");
1.963 +
1.964 + MyMarshalDataToForm(FormActions.AddDeviceToTreeView, device.ToArray());
1.965 + MyMarshalDataToForm(FormActions.SelectDeviceInTreeView, deviceId);
1.966 +
1.967 }
1.968 - else if (deviceId.StartsWith("USB\\"))
1.969 + else if (deviceId.StartsWith("USB\\VID"))
1.970 {
1.971 + List<string> device = new List<string>();
1.972 + device.Add(deviceId);
1.973 usbDeviceCounter++;
1.974 - MyMarshalDataToForm(FormActions.AddItemToListBox, "--------");
1.975 - MyMarshalDataToForm(FormActions.AddItemToListBox, "Skipping device:" + deviceId);
1.976 + // Add device properties.
1.977 foreach (WmiDeviceProperties wmiDeviceProperty in Enum.GetValues(typeof(WmiDeviceProperties)))
1.978 {
1.979 - MyMarshalDataToForm(FormActions.AddItemToListBox, (wmiDeviceProperty.ToString() + ": " + queryObj[wmiDeviceProperty.ToString()]));
1.980 + device.Add((wmiDeviceProperty.ToString() + ": " + queryObj[wmiDeviceProperty.ToString()]));
1.981 Debug.WriteLine(wmiDeviceProperty.ToString() + ": {0}", queryObj[wmiDeviceProperty.ToString()]);
1.982 }
1.983 - MyMarshalDataToForm(FormActions.AddItemToListBox, "--------");
1.984 - MyMarshalDataToForm(FormActions.ScrollToBottomOfListBox, "");
1.985 +
1.986 + MyMarshalDataToForm(FormActions.AddDeviceToTreeView, device.ToArray());
1.987 }
1.988 }
1.989
1.990 @@ -1738,11 +1794,11 @@
1.991 /// <param name="textToDisplay"> text that the form displays or the code uses for
1.992 /// another purpose. Actions that don't use text ignore this parameter. </param>
1.993
1.994 - private void MyMarshalDataToForm(FormActions action, String textToDisplay)
1.995 + private void MyMarshalDataToForm(FormActions action, params string[] strings)
1.996 {
1.997 try
1.998 {
1.999 - object[] args = { action, textToDisplay };
1.1000 + object[] args = { action, strings };
1.1001
1.1002 // The AccessForm routine contains the code that accesses the form.
1.1003