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

📄 form1.cs

📁 短信源程序代码,请大家试用短信源程序代码,请大家试用短信源程序代码,请大家试用
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices; 

namespace WindowsApplication1
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.GroupBox groupBox4;
		private System.Windows.Forms.GroupBox groupBox5;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.TextBox MobPort;
		private System.Windows.Forms.Label State_Show;
		private System.Windows.Forms.Button Sms_Connection_Button;
		private System.Windows.Forms.Button Sms_Disconnection_Button;
		private System.Windows.Forms.TextBox SendSms_Text;
		private System.Windows.Forms.TextBox TelNum_Text;
		private System.Windows.Forms.Button Sms_Send_Button;
		private System.Windows.Forms.Label NewSms_Show;
		private System.Windows.Forms.Button Sms_Start_Button;
		private System.Windows.Forms.Button Sms_Close_Button;
		private System.Windows.Forms.TextBox ReceiveSms_Text;
		private System.Windows.Forms.Button Sms_Receive_Button;
		private System.Windows.Forms.TextBox DeleteSms_Index;
		private System.Windows.Forms.Button Sms_Delete_Button;
		private System.Windows.Forms.Button Sms_Exit_Button;
		private System.Windows.Forms.Timer NewSms_Timer;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label8;
		private System.ComponentModel.IContainer components;

		public Form1()
		{
			//
			// 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.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
			this.label1 = new System.Windows.Forms.Label();
			this.MobPort = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.Sms_Disconnection_Button = new System.Windows.Forms.Button();
			this.Sms_Connection_Button = new System.Windows.Forms.Button();
			this.State_Show = new System.Windows.Forms.Label();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.Sms_Send_Button = new System.Windows.Forms.Button();
			this.label6 = new System.Windows.Forms.Label();
			this.TelNum_Text = new System.Windows.Forms.TextBox();
			this.label5 = new System.Windows.Forms.Label();
			this.SendSms_Text = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.Sms_Close_Button = new System.Windows.Forms.Button();
			this.Sms_Start_Button = new System.Windows.Forms.Button();
			this.NewSms_Show = new System.Windows.Forms.Label();
			this.groupBox4 = new System.Windows.Forms.GroupBox();
			this.Sms_Receive_Button = new System.Windows.Forms.Button();
			this.ReceiveSms_Text = new System.Windows.Forms.TextBox();
			this.groupBox5 = new System.Windows.Forms.GroupBox();
			this.Sms_Delete_Button = new System.Windows.Forms.Button();
			this.DeleteSms_Index = new System.Windows.Forms.TextBox();
			this.label9 = new System.Windows.Forms.Label();
			this.Sms_Exit_Button = new System.Windows.Forms.Button();
			this.NewSms_Timer = new System.Windows.Forms.Timer(this.components);
			this.label3 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.groupBox3.SuspendLayout();
			this.groupBox4.SuspendLayout();
			this.groupBox5.SuspendLayout();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.AutoSize = true;
			this.label1.Location = new System.Drawing.Point(16, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(49, 13);
			this.label1.TabIndex = 0;
			this.label1.Text = "端口号:";
			// 
			// MobPort
			// 
			this.MobPort.Location = new System.Drawing.Point(64, 8);
			this.MobPort.Name = "MobPort";
			this.MobPort.Size = new System.Drawing.Size(56, 20);
			this.MobPort.TabIndex = 1;
			this.MobPort.Text = "5";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(16, 40);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(256, 16);
			this.label2.TabIndex = 2;
			this.label2.Text = "注:0为红外接口,1,2,3,...为串口";
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.Sms_Disconnection_Button,
																					this.Sms_Connection_Button,
																					this.State_Show});
			this.groupBox1.Location = new System.Drawing.Point(16, 56);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(256, 80);
			this.groupBox1.TabIndex = 3;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "连接诺亚短信猫";
			// 
			// Sms_Disconnection_Button
			// 
			this.Sms_Disconnection_Button.Enabled = false;
			this.Sms_Disconnection_Button.Location = new System.Drawing.Point(144, 48);
			this.Sms_Disconnection_Button.Name = "Sms_Disconnection_Button";
			this.Sms_Disconnection_Button.Size = new System.Drawing.Size(76, 24);
			this.Sms_Disconnection_Button.TabIndex = 2;
			this.Sms_Disconnection_Button.Text = "断开";
			this.Sms_Disconnection_Button.Click += new System.EventHandler(this.Sms_Disconnection_Button_Click);
			// 
			// Sms_Connection_Button
			// 
			this.Sms_Connection_Button.Location = new System.Drawing.Point(36, 48);
			this.Sms_Connection_Button.Name = "Sms_Connection_Button";
			this.Sms_Connection_Button.Size = new System.Drawing.Size(76, 24);
			this.Sms_Connection_Button.TabIndex = 1;
			this.Sms_Connection_Button.Text = "连接";
			this.Sms_Connection_Button.Click += new System.EventHandler(this.Sms_Connection_Button_Click);
			// 
			// State_Show
			// 
			this.State_Show.BackColor = System.Drawing.SystemColors.Desktop;
			this.State_Show.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.State_Show.Location = new System.Drawing.Point(8, 16);
			this.State_Show.Name = "State_Show";
			this.State_Show.Size = new System.Drawing.Size(240, 24);
			this.State_Show.TabIndex = 0;
			this.State_Show.Text = "连接状态";
			this.State_Show.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.Sms_Send_Button,
																					this.label6,
																					this.TelNum_Text,
																					this.label5,
																					this.SendSms_Text,
																					this.label4});
			this.groupBox2.Location = new System.Drawing.Point(16, 144);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(256, 232);
			this.groupBox2.TabIndex = 4;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "发送短信";
			// 
			// Sms_Send_Button
			// 
			this.Sms_Send_Button.Location = new System.Drawing.Point(72, 200);
			this.Sms_Send_Button.Name = "Sms_Send_Button";
			this.Sms_Send_Button.Size = new System.Drawing.Size(112, 24);
			this.Sms_Send_Button.TabIndex = 5;
			this.Sms_Send_Button.Text = "发送";
			this.Sms_Send_Button.Click += new System.EventHandler(this.Sms_Send_Button_Click);
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(8, 168);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(240, 32);
			this.label6.TabIndex = 4;
			this.label6.Text = "注:发送内容最多70个汉字或180个英文字母, 超长时自动分段发送。";
			// 
			// TelNum_Text
			// 
			this.TelNum_Text.Location = new System.Drawing.Point(8, 136);
			this.TelNum_Text.Name = "TelNum_Text";
			this.TelNum_Text.Size = new System.Drawing.Size(240, 20);
			this.TelNum_Text.TabIndex = 3;
			this.TelNum_Text.Text = "";
			// 
			// label5
			// 
			this.label5.AutoSize = true;
			this.label5.Location = new System.Drawing.Point(8, 120);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(61, 13);
			this.label5.TabIndex = 2;
			this.label5.Text = "手机号码:";
			// 
			// SendSms_Text
			// 
			this.SendSms_Text.Location = new System.Drawing.Point(8, 40);
			this.SendSms_Text.Multiline = true;
			this.SendSms_Text.Name = "SendSms_Text";
			this.SendSms_Text.Size = new System.Drawing.Size(240, 72);
			this.SendSms_Text.TabIndex = 1;
			this.SendSms_Text.Text = "";
			// 
			// label4
			// 
			this.label4.AutoSize = true;
			this.label4.Location = new System.Drawing.Point(8, 24);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(61, 13);
			this.label4.TabIndex = 0;
			this.label4.Text = "短信内容:";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(16, 384);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(552, 32);
			this.label7.TabIndex = 5;
			this.label7.Text = "注:本短信二次开发接口适用于诺亚短信设备。";
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.Sms_Close_Button,
																					this.Sms_Start_Button,
																					this.NewSms_Show});
			this.groupBox3.Location = new System.Drawing.Point(280, 8);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(280, 88);
			this.groupBox3.TabIndex = 6;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "自动接收短信";
			// 
			// Sms_Close_Button
			// 
			this.Sms_Close_Button.Location = new System.Drawing.Point(170, 56);
			this.Sms_Close_Button.Name = "Sms_Close_Button";
			this.Sms_Close_Button.Size = new System.Drawing.Size(76, 24);
			this.Sms_Close_Button.TabIndex = 2;
			this.Sms_Close_Button.Text = "关闭";
			this.Sms_Close_Button.Click += new System.EventHandler(this.button5_Click);
			// 
			// Sms_Start_Button
			// 
			this.Sms_Start_Button.Location = new System.Drawing.Point(34, 56);
			this.Sms_Start_Button.Name = "Sms_Start_Button";
			this.Sms_Start_Button.Size = new System.Drawing.Size(76, 24);

⌨️ 快捷键说明

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