?? form1.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Text;
using System.IO;
using SMS;
namespace unicodetest
{
/// <summary>
/// Form1 的摘要說明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
PDUdecoding ss = new SMS.PDUdecoding();
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button m_btnDecoded;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtCenterNumber;
private System.Windows.Forms.TextBox txtNumber;
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
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.m_btnDecoded = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.txtCenterNumber = new System.Windows.Forms.TextBox();
this.txtNumber = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// m_btnDecoded
//
this.m_btnDecoded.Location = new System.Drawing.Point(424, 72);
this.m_btnDecoded.Name = "m_btnDecoded";
this.m_btnDecoded.Size = new System.Drawing.Size(75, 24);
this.m_btnDecoded.TabIndex = 0;
this.m_btnDecoded.Text = "生成";
this.m_btnDecoded.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(88, 48);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(408, 21);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(8, 104);
this.textBox2.Multiline = true;
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(488, 128);
this.textBox2.TabIndex = 2;
this.textBox2.Text = "";
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 72);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 16);
this.label1.TabIndex = 3;
this.label1.Text = "編碼結果:";
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(100, 16);
this.label2.TabIndex = 4;
this.label2.Text = "短信發送內容:";
//
// label3
//
this.label3.Location = new System.Drawing.Point(216, 16);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(100, 16);
this.label3.TabIndex = 5;
this.label3.Text = "接收手機號:";
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 16);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(100, 16);
this.label4.TabIndex = 6;
this.label4.Text = "短信中心號:";
//
// txtCenterNumber
//
this.txtCenterNumber.Location = new System.Drawing.Point(88, 14);
this.txtCenterNumber.Name = "txtCenterNumber";
this.txtCenterNumber.TabIndex = 7;
this.txtCenterNumber.Text = "8613800755500";
//
// txtNumber
//
this.txtNumber.Location = new System.Drawing.Point(296, 14);
this.txtNumber.Name = "txtNumber";
this.txtNumber.TabIndex = 8;
this.txtNumber.Text = "13510743492";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(504, 237);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.textBox1,
this.txtNumber,
this.txtCenterNumber,
this.label4,
this.label3,
this.label2,
this.label1,
this.textBox2,
this.m_btnDecoded});
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// 應用程序的主入口點。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
textBox2.Text = ss.smsDecodedsms(txtCenterNumber.Text,txtNumber.Text,textBox1.Text);
textBox2.AppendText(ss.nLength);
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -