📄 form1.designer.cs
字号:
namespace Csharp_Simple_CDC_Demo
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.btnConnect = new System.Windows.Forms.Button();
this.btnSendData = new System.Windows.Forms.Button();
this.lstCOMPorts = new System.Windows.Forms.ComboBox();
this.txtData = new System.Windows.Forms.TextBox();
this.btnClose = new System.Windows.Forms.Button();
this.txtDataReceived = new System.Windows.Forms.TextBox();
this.serialPort1 = new System.IO.Ports.SerialPort(this.components);
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// btnConnect
//
this.btnConnect.Location = new System.Drawing.Point(12, 12);
this.btnConnect.Name = "btnConnect";
this.btnConnect.Size = new System.Drawing.Size(75, 23);
this.btnConnect.TabIndex = 0;
this.btnConnect.Text = "Connect";
this.btnConnect.UseVisualStyleBackColor = true;
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
//
// btnSendData
//
this.btnSendData.Location = new System.Drawing.Point(12, 41);
this.btnSendData.Name = "btnSendData";
this.btnSendData.Size = new System.Drawing.Size(75, 23);
this.btnSendData.TabIndex = 1;
this.btnSendData.Text = "Send Data";
this.btnSendData.UseVisualStyleBackColor = true;
this.btnSendData.Click += new System.EventHandler(this.btnSendData_Click);
//
// lstCOMPorts
//
this.lstCOMPorts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.lstCOMPorts.FormattingEnabled = true;
this.lstCOMPorts.Location = new System.Drawing.Point(93, 14);
this.lstCOMPorts.Name = "lstCOMPorts";
this.lstCOMPorts.Size = new System.Drawing.Size(92, 21);
this.lstCOMPorts.TabIndex = 2;
//
// txtData
//
this.txtData.Location = new System.Drawing.Point(93, 43);
this.txtData.Name = "txtData";
this.txtData.Size = new System.Drawing.Size(359, 20);
this.txtData.TabIndex = 3;
//
// btnClose
//
this.btnClose.Enabled = false;
this.btnClose.Location = new System.Drawing.Point(191, 12);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 4;
this.btnClose.Text = "Close";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// txtDataReceived
//
this.txtDataReceived.Location = new System.Drawing.Point(12, 70);
this.txtDataReceived.Multiline = true;
this.txtDataReceived.Name = "txtDataReceived";
this.txtDataReceived.Size = new System.Drawing.Size(440, 184);
this.txtDataReceived.TabIndex = 5;
//
// serialPort1
//
this.serialPort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(this.serialPort1_DataReceived);
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 1;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(464, 266);
this.Controls.Add(this.txtDataReceived);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.txtData);
this.Controls.Add(this.lstCOMPorts);
this.Controls.Add(this.btnSendData);
this.Controls.Add(this.btnConnect);
this.Name = "Form1";
this.Text = "C# COM port example";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnConnect;
private System.Windows.Forms.Button btnSendData;
private System.Windows.Forms.ComboBox lstCOMPorts;
private System.Windows.Forms.TextBox txtData;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.TextBox txtDataReceived;
private System.IO.Ports.SerialPort serialPort1;
private System.Windows.Forms.Timer timer1;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -