⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmmain.cs

📁 usbio using microsoft visual c# example
💻 CS
📖 第 1 页 / 共 5 页
字号:
//Updated 6 Feb 2007 - G Vance to match version 2.3 VB.NET release on LVR site

using System;
using System.Diagnostics;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace HID_Test_Application
{
	
	internal class frmMain : System.Windows.Forms.Form
	{
		
    #region "Windows Form Designer generated code "
		public frmMain() {
			// This call is required by the Windows Form Designer.
			InitializeComponent();
		}

    private System.ComponentModel.IContainer components;
		public System.Windows.Forms.ToolTip ToolTip1;
		public System.Windows.Forms.Timer tmrContinuousDataCollect;
		public System.Windows.Forms.Button cmdContinuous;
		public System.Windows.Forms.Button cmdOnce;
		public System.Windows.Forms.GroupBox fraSendAndReceive;
		public System.Windows.Forms.TextBox txtBytesReceived;
		public System.Windows.Forms.GroupBox fraBytesReceived;
		public System.Windows.Forms.CheckBox chkAutoincrement;
		public System.Windows.Forms.ComboBox cboByte1;
		public System.Windows.Forms.ComboBox cboByte0;
		public System.Windows.Forms.GroupBox fraBytesToSend;
		public System.Windows.Forms.Timer tmrDelay;
		public System.Windows.Forms.ListBox lstResults;
		internal System.Windows.Forms.GroupBox fraReportTypes;
		internal System.Windows.Forms.RadioButton optInputOutput;
		internal System.Windows.Forms.RadioButton optFeature;
		internal System.Windows.Forms.GroupBox fraInputReportBufferSize;
		internal System.Windows.Forms.TextBox txtInputReportBufferSize;
		internal System.Windows.Forms.Button cmdInputReportBufferSize;
		internal System.Windows.Forms.GroupBox fraDeviceIdentifiers;
		internal System.Windows.Forms.Label lblVendorID;
		internal System.Windows.Forms.TextBox txtVendorID;
		internal System.Windows.Forms.Label lblProductID;
		internal System.Windows.Forms.TextBox txtProductID;
		internal System.Windows.Forms.Button cmdFindDevice;
        private Label lblFeatureRepLength;
		internal System.Windows.Forms.CheckBox chkUseControlTransfersOnly;
		[System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent ()
		{
            this.components = new System.ComponentModel.Container();
            this.ToolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.tmrContinuousDataCollect = new System.Windows.Forms.Timer(this.components);
            this.fraSendAndReceive = new System.Windows.Forms.GroupBox();
            this.cmdContinuous = new System.Windows.Forms.Button();
            this.cmdOnce = new System.Windows.Forms.Button();
            this.fraBytesReceived = new System.Windows.Forms.GroupBox();
            this.txtBytesReceived = new System.Windows.Forms.TextBox();
            this.fraBytesToSend = new System.Windows.Forms.GroupBox();
            this.chkAutoincrement = new System.Windows.Forms.CheckBox();
            this.cboByte1 = new System.Windows.Forms.ComboBox();
            this.cboByte0 = new System.Windows.Forms.ComboBox();
            this.tmrDelay = new System.Windows.Forms.Timer(this.components);
            this.lstResults = new System.Windows.Forms.ListBox();
            this.fraReportTypes = new System.Windows.Forms.GroupBox();
            this.chkUseControlTransfersOnly = new System.Windows.Forms.CheckBox();
            this.optFeature = new System.Windows.Forms.RadioButton();
            this.optInputOutput = new System.Windows.Forms.RadioButton();
            this.fraInputReportBufferSize = new System.Windows.Forms.GroupBox();
            this.cmdInputReportBufferSize = new System.Windows.Forms.Button();
            this.txtInputReportBufferSize = new System.Windows.Forms.TextBox();
            this.fraDeviceIdentifiers = new System.Windows.Forms.GroupBox();
            this.txtProductID = new System.Windows.Forms.TextBox();
            this.lblProductID = new System.Windows.Forms.Label();
            this.txtVendorID = new System.Windows.Forms.TextBox();
            this.lblVendorID = new System.Windows.Forms.Label();
            this.cmdFindDevice = new System.Windows.Forms.Button();
            this.lblFeatureRepLength = new System.Windows.Forms.Label();
            this.fraSendAndReceive.SuspendLayout();
            this.fraBytesReceived.SuspendLayout();
            this.fraBytesToSend.SuspendLayout();
            this.fraReportTypes.SuspendLayout();
            this.fraInputReportBufferSize.SuspendLayout();
            this.fraDeviceIdentifiers.SuspendLayout();
            this.SuspendLayout();
            // 
            // tmrContinuousDataCollect
            // 
            this.tmrContinuousDataCollect.Interval = 1;
            this.tmrContinuousDataCollect.Tick += new System.EventHandler(this.tmrContinuousDataCollect_Tick);
            // 
            // fraSendAndReceive
            // 
            this.fraSendAndReceive.BackColor = System.Drawing.SystemColors.Control;
            this.fraSendAndReceive.Controls.Add(this.cmdContinuous);
            this.fraSendAndReceive.Controls.Add(this.cmdOnce);
            this.fraSendAndReceive.ForeColor = System.Drawing.SystemColors.ControlText;
            this.fraSendAndReceive.Location = new System.Drawing.Point(507, 104);
            this.fraSendAndReceive.Name = "fraSendAndReceive";
            this.fraSendAndReceive.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.fraSendAndReceive.Size = new System.Drawing.Size(146, 111);
            this.fraSendAndReceive.TabIndex = 7;
            this.fraSendAndReceive.TabStop = false;
            this.fraSendAndReceive.Text = "Send and Receive Data";
            // 
            // cmdContinuous
            // 
            this.cmdContinuous.BackColor = System.Drawing.SystemColors.Control;
            this.cmdContinuous.Cursor = System.Windows.Forms.Cursors.Default;
            this.cmdContinuous.ForeColor = System.Drawing.SystemColors.ControlText;
            this.cmdContinuous.Location = new System.Drawing.Point(13, 72);
            this.cmdContinuous.Name = "cmdContinuous";
            this.cmdContinuous.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.cmdContinuous.Size = new System.Drawing.Size(101, 29);
            this.cmdContinuous.TabIndex = 9;
            this.cmdContinuous.Text = "Continuous";
            this.cmdContinuous.UseVisualStyleBackColor = false;
            this.cmdContinuous.Click += new System.EventHandler(this.cmdContinuous_Click);
            // 
            // cmdOnce
            // 
            this.cmdOnce.BackColor = System.Drawing.SystemColors.Control;
            this.cmdOnce.Cursor = System.Windows.Forms.Cursors.Default;
            this.cmdOnce.ForeColor = System.Drawing.SystemColors.ControlText;
            this.cmdOnce.Location = new System.Drawing.Point(13, 26);
            this.cmdOnce.Name = "cmdOnce";
            this.cmdOnce.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.cmdOnce.Size = new System.Drawing.Size(101, 29);
            this.cmdOnce.TabIndex = 8;
            this.cmdOnce.Text = "Once";
            this.cmdOnce.UseVisualStyleBackColor = false;
            this.cmdOnce.Click += new System.EventHandler(this.cmdOnce_Click);
            // 
            // fraBytesReceived
            // 
            this.fraBytesReceived.BackColor = System.Drawing.SystemColors.Control;
            this.fraBytesReceived.Controls.Add(this.txtBytesReceived);
            this.fraBytesReceived.ForeColor = System.Drawing.SystemColors.ControlText;
            this.fraBytesReceived.Location = new System.Drawing.Point(173, 104);
            this.fraBytesReceived.Name = "fraBytesReceived";
            this.fraBytesReceived.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.fraBytesReceived.Size = new System.Drawing.Size(107, 111);
            this.fraBytesReceived.TabIndex = 4;
            this.fraBytesReceived.TabStop = false;
            this.fraBytesReceived.Text = "Bytes Received";
            // 
            // txtBytesReceived
            // 
            this.txtBytesReceived.AcceptsReturn = true;
            this.txtBytesReceived.BackColor = System.Drawing.SystemColors.Window;
            this.txtBytesReceived.Cursor = System.Windows.Forms.Cursors.IBeam;
            this.txtBytesReceived.ForeColor = System.Drawing.SystemColors.WindowText;
            this.txtBytesReceived.Location = new System.Drawing.Point(13, 20);
            this.txtBytesReceived.MaxLength = 0;
            this.txtBytesReceived.Multiline = true;
            this.txtBytesReceived.Name = "txtBytesReceived";
            this.txtBytesReceived.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.txtBytesReceived.Size = new System.Drawing.Size(79, 78);
            this.txtBytesReceived.TabIndex = 5;
            // 
            // fraBytesToSend
            // 
            this.fraBytesToSend.BackColor = System.Drawing.SystemColors.Control;
            this.fraBytesToSend.Controls.Add(this.chkAutoincrement);
            this.fraBytesToSend.Controls.Add(this.cboByte1);
            this.fraBytesToSend.Controls.Add(this.cboByte0);
            this.fraBytesToSend.ForeColor = System.Drawing.SystemColors.ControlText;
            this.fraBytesToSend.Location = new System.Drawing.Point(13, 104);
            this.fraBytesToSend.Name = "fraBytesToSend";
            this.fraBytesToSend.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.fraBytesToSend.Size = new System.Drawing.Size(151, 111);
            this.fraBytesToSend.TabIndex = 1;
            this.fraBytesToSend.TabStop = false;
            this.fraBytesToSend.Text = "Bytes to Send";
            // 
            // chkAutoincrement
            // 
            this.chkAutoincrement.BackColor = System.Drawing.SystemColors.Control;
            this.chkAutoincrement.Cursor = System.Windows.Forms.Cursors.Default;
            this.chkAutoincrement.ForeColor = System.Drawing.SystemColors.ControlText;
            this.chkAutoincrement.Location = new System.Drawing.Point(8, 78);
            this.chkAutoincrement.Name = "chkAutoincrement";
            this.chkAutoincrement.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.chkAutoincrement.Size = new System.Drawing.Size(132, 28);
            this.chkAutoincrement.TabIndex = 6;
            this.chkAutoincrement.Text = "Autoincrement values";
            this.chkAutoincrement.UseVisualStyleBackColor = false;
            // 
            // cboByte1
            // 
            this.cboByte1.BackColor = System.Drawing.SystemColors.Window;
            this.cboByte1.Cursor = System.Windows.Forms.Cursors.Default;
            this.cboByte1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboByte1.ForeColor = System.Drawing.SystemColors.WindowText;
            this.cboByte1.Location = new System.Drawing.Point(7, 52);
            this.cboByte1.Name = "cboByte1";
            this.cboByte1.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.cboByte1.Size = new System.Drawing.Size(84, 21);
            this.cboByte1.TabIndex = 3;
            // 
            // cboByte0
            // 
            this.cboByte0.BackColor = System.Drawing.SystemColors.Window;
            this.cboByte0.Cursor = System.Windows.Forms.Cursors.Default;
            this.cboByte0.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboByte0.ForeColor = System.Drawing.SystemColors.WindowText;
            this.cboByte0.Location = new System.Drawing.Point(7, 20);
            this.cboByte0.Name = "cboByte0";
            this.cboByte0.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.cboByte0.Size = new System.Drawing.Size(84, 21);
            this.cboByte0.TabIndex = 2;
            // 
            // tmrDelay
            // 
            this.tmrDelay.Interval = 1;
            // 
            // lstResults
            // 
            this.lstResults.BackColor = System.Drawing.SystemColors.Window;
            this.lstResults.Cursor = System.Windows.Forms.Cursors.Default;
            this.lstResults.ForeColor = System.Drawing.SystemColors.WindowText;
            this.lstResults.HorizontalScrollbar = true;
            this.lstResults.Location = new System.Drawing.Point(13, 221);
            this.lstResults.Name = "lstResults";
            this.lstResults.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.lstResults.Size = new System.Drawing.Size(634, 212);
            this.lstResults.TabIndex = 0;
            // 
            // fraReportTypes
            // 
            this.fraReportTypes.Controls.Add(this.lblFeatureRepLength);
            this.fraReportTypes.Controls.Add(this.chkUseControlTransfersOnly);
            this.fraReportTypes.Controls.Add(this.optFeature);
            this.fraReportTypes.Controls.Add(this.optInputOutput);
            this.fraReportTypes.Location = new System.Drawing.Point(287, 104);
            this.fraReportTypes.Name = "fraReportTypes";
            this.fraReportTypes.Size = new System.Drawing.Size(213, 111);
            this.fraReportTypes.TabIndex = 8;
            this.fraReportTypes.TabStop = false;
            this.fraReportTypes.Text = "Report Options";
            // 
            // chkUseControlTransfersOnly
            // 
            this.chkUseControlTransfersOnly.Location = new System.Drawing.Point(20, 39);
            this.chkUseControlTransfersOnly.Name = "chkUseControlTransfersOnly";
            this.chkUseControlTransfersOnly.Size = new System.Drawing.Size(167, 20);
            this.chkUseControlTransfersOnly.TabIndex = 2;
            this.chkUseControlTransfersOnly.Text = "Use ControlTransfers Only";
            // 
            // optFeature
            // 
            this.optFeature.Location = new System.Drawing.Point(7, 65);
            this.optFeature.Name = "optFeature";
            this.optFeature.Size = new System.Drawing.Size(189, 20);
            this.optFeature.TabIndex = 1;
            this.optFeature.Text = "Exchange Feature Reports";
            // 
            // optInputOutput
            // 
            this.optInputOutput.Checked = true;
            this.optInputOutput.Location = new System.Drawing.Point(7, 20);
            this.optInputOutput.Name = "optInputOutput";
            this.optInputOutput.Size = new System.Drawing.Size(197, 19);
            this.optInputOutput.TabIndex = 0;
            this.optInputOutput.TabStop = true;
            this.optInputOutput.Text = "Exchange Input and Output Reports";
            // 
            // fraInputReportBufferSize
            // 
            this.fraInputReportBufferSize.Controls.Add(this.cmdInputReportBufferSize);
            this.fraInputReportBufferSize.Controls.Add(this.txtInputReportBufferSize);
            this.fraInputReportBufferSize.Location = new System.Drawing.Point(207, 13);
            this.fraInputReportBufferSize.Name = "fraInputReportBufferSize";
            this.fraInputReportBufferSize.Size = new System.Drawing.Size(173, 78);
            this.fraInputReportBufferSize.TabIndex = 9;
            this.fraInputReportBufferSize.TabStop = false;
            this.fraInputReportBufferSize.Text = "Input Report Buffer Size";
            // 
            // cmdInputReportBufferSize
            // 
            this.cmdInputReportBufferSize.Location = new System.Drawing.Point(80, 26);
            this.cmdInputReportBufferSize.Name = "cmdInputReportBufferSize";
            this.cmdInputReportBufferSize.Size = new System.Drawing.Size(80, 46);
            this.cmdInputReportBufferSize.TabIndex = 1;
            this.cmdInputReportBufferSize.Text = "Change Buffer Size";
            this.cmdInputReportBufferSize.Click += new System.EventHandler(this.cmdInputReportBufferSize_Click);
            // 
            // txtInputReportBufferSize
            // 
            this.txtInputReportBufferSize.Location = new System.Drawing.Point(13, 33);
            this.txtInputReportBufferSize.Name = "txtInputReportBufferSize";
            this.txtInputReportBufferSize.Size = new System.Drawing.Size(47, 20);
            this.txtInputReportBufferSize.TabIndex = 0;
            // 
            // fraDeviceIdentifiers
            // 
            this.fraDeviceIdentifiers.Controls.Add(this.txtProductID);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -