?? form1.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using Microsoft.Wireless;
namespace SMS_CS {
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form {
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox txtPhoneNumber;
private System.Windows.Forms.TextBox txtMessage;
private System.Windows.Forms.MenuItem menuItem1;
public Microsoft.Wireless.SMS thisSMS;
public Form1() {
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing ) {
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.mainMenu1 = new System.Windows.Forms.MainMenu();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.txtPhoneNumber = new System.Windows.Forms.TextBox();
this.txtMessage = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.menuItem1 = new System.Windows.Forms.MenuItem();
//
// mainMenu1
//
this.mainMenu1.MenuItems.Add(this.menuItem1);
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 16);
this.label1.Text = "phone number:";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 40);
this.label2.Text = "message:";
//
// txtPhoneNumber
//
this.txtPhoneNumber.Location = new System.Drawing.Point(120, 16);
this.txtPhoneNumber.Text = "18005559655";
//
// txtMessage
//
this.txtMessage.Location = new System.Drawing.Point(120, 40);
this.txtMessage.Multiline = true;
this.txtMessage.Size = new System.Drawing.Size(100, 64);
this.txtMessage.Text = "I\'m Sending an SMS Using the .NET Compact Framework!";
//
// button1
//
this.button1.Location = new System.Drawing.Point(16, 112);
this.button1.Text = "send sms";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// menuItem1
//
this.menuItem1.Text = "quit";
this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
//
// Form1
//
this.Controls.Add(this.button1);
this.Controls.Add(this.txtMessage);
this.Controls.Add(this.txtPhoneNumber);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Menu = this.mainMenu1;
this.MinimizeBox = false;
this.Text = "Form1";
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main() {
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e) {
SMS.SendMessage( txtPhoneNumber.Text ,txtMessage.Text );
}
private void menuItem1_Click(object sender, System.EventArgs e) {
this.Close();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -