📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace TestForCSharp
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class TestGSM : System.Windows.Forms.Form
{
internal System.Windows.Forms.GroupBox GroupBox1;
internal System.Windows.Forms.Label Label9;
internal System.Windows.Forms.TextBox Baud;
internal System.Windows.Forms.Label Label8;
internal System.Windows.Forms.TextBox Device;
internal System.Windows.Forms.TextBox cwxx;
internal System.Windows.Forms.Button Button2;
internal System.Windows.Forms.Label Label2;
internal System.Windows.Forms.TextBox sqhm;
internal System.Windows.Forms.GroupBox GroupBox3;
internal System.Windows.Forms.Button Button5;
internal System.Windows.Forms.TextBox jsnr;
internal System.Windows.Forms.Label Label6;
internal System.Windows.Forms.Button Button4;
internal System.Windows.Forms.GroupBox GroupBox2;
internal System.Windows.Forms.Button Button3;
internal System.Windows.Forms.TextBox fsnr;
internal System.Windows.Forms.TextBox jshm;
internal System.Windows.Forms.Label Label5;
internal System.Windows.Forms.Label Label4;
internal System.Windows.Forms.Label Label12;
internal System.Windows.Forms.Label label1;
internal System.Windows.Forms.Label Label3;
internal System.Windows.Forms.Button Button6;
internal System.Windows.Forms.Label label10;
internal System.Windows.Forms.Label Label7;
internal System.Windows.Forms.CheckBox sendState;
internal System.Windows.Forms.CheckBox isClear;
internal System.Windows.Forms.ProgressBar pb1;
internal System.Windows.Forms.TextBox status1;
internal System.Windows.Forms.Label Label13;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public TestGSM()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.GroupBox1 = new System.Windows.Forms.GroupBox();
this.Button6 = new System.Windows.Forms.Button();
this.label10 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.Label9 = new System.Windows.Forms.Label();
this.Baud = new System.Windows.Forms.TextBox();
this.Label8 = new System.Windows.Forms.Label();
this.Device = new System.Windows.Forms.TextBox();
this.cwxx = new System.Windows.Forms.TextBox();
this.Button2 = new System.Windows.Forms.Button();
this.Label2 = new System.Windows.Forms.Label();
this.sqhm = new System.Windows.Forms.TextBox();
this.GroupBox3 = new System.Windows.Forms.GroupBox();
this.isClear = new System.Windows.Forms.CheckBox();
this.Label7 = new System.Windows.Forms.Label();
this.Button5 = new System.Windows.Forms.Button();
this.jsnr = new System.Windows.Forms.TextBox();
this.Label6 = new System.Windows.Forms.Label();
this.Button4 = new System.Windows.Forms.Button();
this.GroupBox2 = new System.Windows.Forms.GroupBox();
this.sendState = new System.Windows.Forms.CheckBox();
this.Label12 = new System.Windows.Forms.Label();
this.Button3 = new System.Windows.Forms.Button();
this.fsnr = new System.Windows.Forms.TextBox();
this.jshm = new System.Windows.Forms.TextBox();
this.Label5 = new System.Windows.Forms.Label();
this.Label4 = new System.Windows.Forms.Label();
this.pb1 = new System.Windows.Forms.ProgressBar();
this.status1 = new System.Windows.Forms.TextBox();
this.Label13 = new System.Windows.Forms.Label();
this.GroupBox1.SuspendLayout();
this.GroupBox3.SuspendLayout();
this.GroupBox2.SuspendLayout();
this.SuspendLayout();
//
// GroupBox1
//
this.GroupBox1.Controls.Add(this.Button6);
this.GroupBox1.Controls.Add(this.label10);
this.GroupBox1.Controls.Add(this.Label3);
this.GroupBox1.Controls.Add(this.label1);
this.GroupBox1.Controls.Add(this.Label9);
this.GroupBox1.Controls.Add(this.Baud);
this.GroupBox1.Controls.Add(this.Label8);
this.GroupBox1.Controls.Add(this.Device);
this.GroupBox1.Controls.Add(this.cwxx);
this.GroupBox1.Controls.Add(this.Button2);
this.GroupBox1.Controls.Add(this.Label2);
this.GroupBox1.Controls.Add(this.sqhm);
this.GroupBox1.Location = new System.Drawing.Point(0, 8);
this.GroupBox1.Name = "GroupBox1";
this.GroupBox1.Size = new System.Drawing.Size(616, 176);
this.GroupBox1.TabIndex = 2;
this.GroupBox1.TabStop = false;
this.GroupBox1.Text = "系统信息";
//
// Button6
//
this.Button6.Location = new System.Drawing.Point(528, 144);
this.Button6.Name = "Button6";
this.Button6.TabIndex = 20;
this.Button6.Text = "连接设备";
this.Button6.Click += new System.EventHandler(this.Button6_Click);
//
// label10
//
this.label10.BackColor = System.Drawing.Color.DarkSeaGreen;
this.label10.ForeColor = System.Drawing.Color.Black;
this.label10.Location = new System.Drawing.Point(24, 147);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(496, 16);
this.label10.TabIndex = 19;
this.label10.Text = "*使用说明:1)通讯配置;2)输入授权码;3)连接设备;4)发送测试;5)接收测试;6)退出。";
//
// Label3
//
this.Label3.BackColor = System.Drawing.Color.Gainsboro;
this.Label3.ForeColor = System.Drawing.Color.Black;
this.Label3.Location = new System.Drawing.Point(416, 24);
this.Label3.Name = "Label3";
this.Label3.Size = new System.Drawing.Size(184, 56);
this.Label3.TabIndex = 14;
this.Label3.Text = "*授权号码由厂家提供,在产品上或包装盒中可以找到。格式为: xxxx-xxxx-xxxx-xxxx";
//
// label1
//
this.label1.Location = new System.Drawing.Point(40, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 16);
this.label1.TabIndex = 13;
this.label1.Text = "通讯配置";
//
// Label9
//
this.Label9.Location = new System.Drawing.Point(280, 32);
this.Label9.Name = "Label9";
this.Label9.Size = new System.Drawing.Size(48, 16);
this.Label9.TabIndex = 12;
this.Label9.Text = "波特率";
//
// Baud
//
this.Baud.Location = new System.Drawing.Point(328, 24);
this.Baud.Name = "Baud";
this.Baud.Size = new System.Drawing.Size(72, 21);
this.Baud.TabIndex = 11;
this.Baud.Text = "9600";
//
// Label8
//
this.Label8.Location = new System.Drawing.Point(112, 32);
this.Label8.Name = "Label8";
this.Label8.Size = new System.Drawing.Size(32, 16);
this.Label8.TabIndex = 10;
this.Label8.Text = "端口";
//
// Device
//
this.Device.Location = new System.Drawing.Point(152, 24);
this.Device.Name = "Device";
this.Device.Size = new System.Drawing.Size(80, 21);
this.Device.TabIndex = 8;
this.Device.Text = "COM1";
//
// cwxx
//
this.cwxx.Location = new System.Drawing.Point(112, 88);
this.cwxx.Multiline = true;
this.cwxx.Name = "cwxx";
this.cwxx.Size = new System.Drawing.Size(488, 48);
this.cwxx.TabIndex = 5;
this.cwxx.Text = "";
//
// Button2
//
this.Button2.Location = new System.Drawing.Point(24, 99);
this.Button2.Name = "Button2";
this.Button2.TabIndex = 4;
this.Button2.Text = "错误信息";
this.Button2.Click += new System.EventHandler(this.Button2_Click);
//
// Label2
//
this.Label2.Location = new System.Drawing.Point(24, 56);
this.Label2.Name = "Label2";
this.Label2.Size = new System.Drawing.Size(80, 16);
this.Label2.TabIndex = 3;
this.Label2.Text = "输入授权号码";
//
// sqhm
//
this.sqhm.Location = new System.Drawing.Point(112, 56);
this.sqhm.Name = "sqhm";
this.sqhm.Size = new System.Drawing.Size(288, 21);
this.sqhm.TabIndex = 2;
this.sqhm.Text = "ERTI-BVDI-PDEW-VIWX";
//
// GroupBox3
//
this.GroupBox3.Controls.Add(this.isClear);
this.GroupBox3.Controls.Add(this.Label7);
this.GroupBox3.Controls.Add(this.Button5);
this.GroupBox3.Controls.Add(this.jsnr);
this.GroupBox3.Controls.Add(this.Label6);
this.GroupBox3.Location = new System.Drawing.Point(0, 344);
this.GroupBox3.Name = "GroupBox3";
this.GroupBox3.Size = new System.Drawing.Size(616, 144);
this.GroupBox3.TabIndex = 7;
this.GroupBox3.TabStop = false;
this.GroupBox3.Text = "接收短信测试";
//
// isClear
//
this.isClear.Checked = true;
this.isClear.CheckState = System.Windows.Forms.CheckState.Checked;
this.isClear.Location = new System.Drawing.Point(528, 56);
this.isClear.Name = "isClear";
this.isClear.Size = new System.Drawing.Size(80, 24);
this.isClear.TabIndex = 12;
this.isClear.Text = "清除短信";
//
// Label7
//
this.Label7.BackColor = System.Drawing.Color.Gainsboro;
this.Label7.ForeColor = System.Drawing.Color.Black;
this.Label7.Location = new System.Drawing.Point(24, 96);
this.Label7.Name = "Label7";
this.Label7.Size = new System.Drawing.Size(496, 40);
this.Label7.TabIndex = 9;
this.Label7.Text = "*短信息串格式:短信类型|存储位置|发送时间|接收号码|短信编码|短信长度|短信内容||短信类型|存储位置|发送时间|接收号码|短信编码|短信长度|短信内容||";
//
// Button5
//
this.Button5.Location = new System.Drawing.Point(528, 24);
this.Button5.Name = "Button5";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -