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

📄 new_fxin.cs

📁 源码..C#开发的手机短信发送接收程序
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Threading;
using System.Text;
using JustinIO;
using SMS;
using System.IO;
using dxsf;


namespace smsForCsharp
{
	/// Form1 的摘要说明。
	public class Form1 : System.Windows.Forms.Form
	{
		static  JustinIO.CommPort ss_port = new JustinIO.CommPort();
		PDUdecoding sms = new SMS.PDUdecoding();
		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.TextBox targetNumber;
		private System.Windows.Forms.TextBox CenterNumber;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label ConnectState;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.Button btnSend;
		private System.Windows.Forms.Button btnConnect;
		private System.Windows.Forms.Button btnExit;
		private System.Windows.Forms.TextBox smsState;
		private System.Windows.Forms.TextBox smsContent;
		private System.Windows.Forms.ComboBox ConnectPort;
        private System.Windows.Forms.ComboBox ConnectBaudRate;
		
		/// 必需的设计器变量。F:\毕业设计\手机短信收发程序\frmMain\frmMain\Form2.cs
		private System.ComponentModel.Container components = null;

		public Form1()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// 清理所有正在使用的资源。
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		private void InitializeComponent()
		{
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.smsState = new System.Windows.Forms.TextBox();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.smsContent = new System.Windows.Forms.TextBox();
            this.targetNumber = new System.Windows.Forms.TextBox();
            this.CenterNumber = new System.Windows.Forms.TextBox();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.ConnectState = new System.Windows.Forms.Label();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.ConnectBaudRate = new System.Windows.Forms.ComboBox();
            this.ConnectPort = new System.Windows.Forms.ComboBox();
            this.btnSend = new System.Windows.Forms.Button();
            this.btnConnect = new System.Windows.Forms.Button();
            this.btnExit = new System.Windows.Forms.Button();
            this.groupBox1.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.SuspendLayout();
            // 
            // label1
            // 
            this.label1.Location = new System.Drawing.Point(280, 47);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(72, 16);
            this.label1.TabIndex = 0;
            this.label1.Text = "对方手机号:";
            // 
            // label2
            // 
            this.label2.Location = new System.Drawing.Point(280, 94);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(72, 16);
            this.label2.TabIndex = 1;
            this.label2.Text = "短信中心号:";
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.smsState);
            this.groupBox1.Location = new System.Drawing.Point(266, 207);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(243, 152);
            this.groupBox1.TabIndex = 3;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "短信返回状态";
            // 
            // smsState
            // 
            this.smsState.Location = new System.Drawing.Point(6, 17);
            this.smsState.Multiline = true;
            this.smsState.Name = "smsState";
            this.smsState.ReadOnly = true;
            this.smsState.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
            this.smsState.Size = new System.Drawing.Size(231, 127);
            this.smsState.TabIndex = 0;
            // 
            // groupBox2
            // 
            this.groupBox2.Controls.Add(this.smsContent);
            this.groupBox2.Location = new System.Drawing.Point(12, 206);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(248, 152);
            this.groupBox2.TabIndex = 4;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "短信内容";
            // 
            // smsContent
            // 
            this.smsContent.Location = new System.Drawing.Point(8, 17);
            this.smsContent.Multiline = true;
            this.smsContent.Name = "smsContent";
            this.smsContent.Size = new System.Drawing.Size(229, 127);
            this.smsContent.TabIndex = 0;
            // 
            // targetNumber
            // 
            this.targetNumber.Location = new System.Drawing.Point(354, 44);
            this.targetNumber.Name = "targetNumber";
            this.targetNumber.Size = new System.Drawing.Size(132, 21);
            this.targetNumber.TabIndex = 5;
            // 
            // CenterNumber
            // 
            this.CenterNumber.Location = new System.Drawing.Point(354, 91);
            this.CenterNumber.Name = "CenterNumber";
            this.CenterNumber.Size = new System.Drawing.Size(132, 21);
            this.CenterNumber.TabIndex = 6;
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(24, 32);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(65, 12);
            this.label3.TabIndex = 7;
            this.label3.Text = "通信端口:";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(24, 77);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(65, 12);
            this.label4.TabIndex = 8;
            this.label4.Text = "波 特 率:";
            // 
            // ConnectState
            // 
            this.ConnectState.BackColor = System.Drawing.SystemColors.Control;
            this.ConnectState.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
            this.ConnectState.ForeColor = System.Drawing.Color.Red;
            this.ConnectState.Location = new System.Drawing.Point(6, 117);
            this.ConnectState.Name = "ConnectState";
            this.ConnectState.Size = new System.Drawing.Size(224, 16);
            this.ConnectState.TabIndex = 10;
            this.ConnectState.Text = "尚未与任何设备连接";
            // 
            // groupBox3
            // 
            this.groupBox3.Controls.Add(this.ConnectBaudRate);
            this.groupBox3.Controls.Add(this.ConnectPort);
            this.groupBox3.Controls.Add(this.ConnectState);
            this.groupBox3.Controls.Add(this.label3);
            this.groupBox3.Controls.Add(this.label4);
            this.groupBox3.Location = new System.Drawing.Point(9, 21);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(240, 160);
            this.groupBox3.TabIndex = 0;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "端口设置";
            // 
            // ConnectBaudRate
            // 
            this.ConnectBaudRate.Items.AddRange(new object[] {
            "9600",
            "14400",
            "19200",
            "57600"});
            this.ConnectBaudRate.Location = new System.Drawing.Point(120, 67);
            this.ConnectBaudRate.Name = "ConnectBaudRate";
            this.ConnectBaudRate.Size = new System.Drawing.Size(80, 20);

⌨️ 快捷键说明

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