亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? frmconnection.cs

?? about sms how to send a sms to the mobile
?? CS
字號:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using GsmComm.GsmCommunication;

namespace SMS
{
	/// <summary>
	/// Summary description for frmConnection.
	/// </summary>
	public class frmConnection : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label lblTimeout;
		private System.Windows.Forms.Label lblBaudRate;
		private System.Windows.Forms.ComboBox cboTimeout;
		private System.Windows.Forms.Label lblPort;
		private System.Windows.Forms.ComboBox cboPort;
		private System.Windows.Forms.ComboBox cboBaudRate;
		private System.Windows.Forms.Button btnOK;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.Button btnTest;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		private int port;
		private int baudRate;
		private int timeout;

		public frmConnection()
		{
			//
			// 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 )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			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.lblTimeout = new System.Windows.Forms.Label();
			this.lblBaudRate = new System.Windows.Forms.Label();
			this.cboTimeout = new System.Windows.Forms.ComboBox();
			this.lblPort = new System.Windows.Forms.Label();
			this.cboPort = new System.Windows.Forms.ComboBox();
			this.cboBaudRate = new System.Windows.Forms.ComboBox();
			this.btnOK = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.btnTest = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// lblTimeout
			// 
			this.lblTimeout.Location = new System.Drawing.Point(33, 64);
			this.lblTimeout.Name = "lblTimeout";
			this.lblTimeout.TabIndex = 4;
			this.lblTimeout.Text = "Ti&meout (ms):";
			this.lblTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// lblBaudRate
			// 
			this.lblBaudRate.Location = new System.Drawing.Point(33, 40);
			this.lblBaudRate.Name = "lblBaudRate";
			this.lblBaudRate.TabIndex = 2;
			this.lblBaudRate.Text = "&Baud rate:";
			this.lblBaudRate.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// cboTimeout
			// 
			this.cboTimeout.Location = new System.Drawing.Point(145, 64);
			this.cboTimeout.Name = "cboTimeout";
			this.cboTimeout.Size = new System.Drawing.Size(104, 21);
			this.cboTimeout.TabIndex = 5;
			// 
			// lblPort
			// 
			this.lblPort.Location = new System.Drawing.Point(33, 16);
			this.lblPort.Name = "lblPort";
			this.lblPort.Size = new System.Drawing.Size(88, 23);
			this.lblPort.TabIndex = 0;
			this.lblPort.Text = "&COM-Port:";
			this.lblPort.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// cboPort
			// 
			this.cboPort.Location = new System.Drawing.Point(145, 16);
			this.cboPort.Name = "cboPort";
			this.cboPort.Size = new System.Drawing.Size(104, 21);
			this.cboPort.TabIndex = 1;
			// 
			// cboBaudRate
			// 
			this.cboBaudRate.Location = new System.Drawing.Point(145, 40);
			this.cboBaudRate.Name = "cboBaudRate";
			this.cboBaudRate.Size = new System.Drawing.Size(104, 21);
			this.cboBaudRate.TabIndex = 3;
			// 
			// btnOK
			// 
			this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
			this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.btnOK.Location = new System.Drawing.Point(104, 112);
			this.btnOK.Name = "btnOK";
			this.btnOK.TabIndex = 7;
			this.btnOK.Text = "OK";
			this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
			// 
			// btnCancel
			// 
			this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.btnCancel.Location = new System.Drawing.Point(192, 112);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.TabIndex = 8;
			this.btnCancel.Text = "Cancel";
			// 
			// btnTest
			// 
			this.btnTest.FlatStyle = System.Windows.Forms.FlatStyle.System;
			this.btnTest.Location = new System.Drawing.Point(16, 112);
			this.btnTest.Name = "btnTest";
			this.btnTest.TabIndex = 6;
			this.btnTest.Text = "&Test";
			this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
			// 
			// frmConnection
			// 
			this.AcceptButton = this.btnOK;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.CancelButton = this.btnCancel;
			this.ClientSize = new System.Drawing.Size(282, 152);
			this.Controls.Add(this.btnTest);
			this.Controls.Add(this.btnCancel);
			this.Controls.Add(this.btnOK);
			this.Controls.Add(this.lblTimeout);
			this.Controls.Add(this.lblBaudRate);
			this.Controls.Add(this.cboTimeout);
			this.Controls.Add(this.lblPort);
			this.Controls.Add(this.cboPort);
			this.Controls.Add(this.cboBaudRate);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "frmConnection";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "Connection settings";
			this.Load += new System.EventHandler(this.frmConnection_Load);
			this.ResumeLayout(false);

		}
		#endregion

		public void SetData(int port, int baudRate, int timeout)
		{
			this.port = port;
			this.baudRate = baudRate;
			this.timeout = timeout;
		}

		public void GetData(out int port, out int baudRate, out int timeout)
		{
			port = this.port;
			baudRate = this.baudRate;
			timeout = this.timeout;
		}

		private bool EnterNewSettings()
		{
			int newPort;
			int newBaudRate;
			int newTimeout;

			try
			{
				newPort = int.Parse(cboPort.Text);
			}
			catch(Exception)
			{
				MessageBox.Show(this, "Invalid port number.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				cboPort.Focus();
				return false;
			}

			try
			{
				newBaudRate = int.Parse(cboBaudRate.Text);
			}
			catch(Exception)
			{
				MessageBox.Show(this, "Invalid baud rate.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				cboBaudRate.Focus();
				return false;
			}

			try
			{
				newTimeout = int.Parse(cboTimeout.Text);
			}
			catch(Exception)
			{
				MessageBox.Show(this, "Invalid timeout value.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				cboTimeout.Focus();
				return false;
			}

			SetData(newPort,newBaudRate,newTimeout);
			
			return true;
		}

		private void btnOK_Click(object sender, System.EventArgs e)
		{
			if (!EnterNewSettings())
				DialogResult = DialogResult.None;
		}

		private void frmConnection_Load(object sender, System.EventArgs e)
		{
			cboPort.Items.Add("1");
			cboPort.Items.Add("2");
			cboPort.Items.Add("3");
			cboPort.Items.Add("4");
			cboPort.Text = port.ToString();

			cboBaudRate.Items.Add("9600");
			cboBaudRate.Items.Add("19200");
			cboBaudRate.Items.Add("38400");
			cboBaudRate.Items.Add("57600");
			cboBaudRate.Items.Add("115200");
			cboBaudRate.Text = baudRate.ToString();

			cboTimeout.Items.Add("150");
			cboTimeout.Items.Add("300");
			cboTimeout.Items.Add("600");
			cboTimeout.Items.Add("900");
			cboTimeout.Items.Add("1200");
			cboTimeout.Items.Add("1500");
			cboTimeout.Items.Add("1800");
			cboTimeout.Items.Add("2000");
			cboTimeout.Text = timeout.ToString();
		}

		private void btnTest_Click(object sender, System.EventArgs e)
		{
			if (!EnterNewSettings())
				return;

			Cursor.Current = Cursors.WaitCursor;
			GsmCommMain comm = new GsmCommMain(port, baudRate, timeout);
			try
			{
				comm.Open();
				while (!comm.IsConnected())
				{
					Cursor.Current = Cursors.Default;
					if (MessageBox.Show(this, "No phone connected.", "Connection setup",
						MessageBoxButtons.RetryCancel, MessageBoxIcon.Exclamation) == DialogResult.Cancel)
					{
						comm.Close();
						return;
					}
					Cursor.Current = Cursors.WaitCursor;
				}

				comm.Close();
			}
			catch(Exception ex)
			{
				MessageBox.Show(this, "Connection error: " + ex.Message, "Connection setup", MessageBoxButtons.OK, MessageBoxIcon.Warning);
				return;
			}
			MessageBox.Show(this, "Successfully connected to the phone.", "Connection setup", MessageBoxButtons.OK, MessageBoxIcon.Information);
			
				
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲自拍偷拍| 成年人网站91| 2021中文字幕一区亚洲| 久久电影国产免费久久电影| 久久婷婷国产综合精品青草| 国产高清在线精品| 亚洲黄色录像片| 欧美日韩久久久久久| 蜜桃视频在线一区| 中文字幕欧美国产| 色天天综合久久久久综合片| 亚洲高清免费观看高清完整版在线观看| 中文字幕欧美一区| 欧美天天综合网| 麻豆91在线播放| 国产日韩欧美精品在线| 99麻豆久久久国产精品免费| 一区二区三区四区国产精品| 在线播放亚洲一区| 粉嫩嫩av羞羞动漫久久久| 亚洲理论在线观看| 欧美精品一区二区三区在线| av中文字幕一区| 日韩精品乱码av一区二区| 国产日韩欧美综合一区| 日本精品一区二区三区四区的功能| 欧美日韩一区二区欧美激情| 理论电影国产精品| ㊣最新国产の精品bt伙计久久| 日本一道高清亚洲日美韩| 2欧美一区二区三区在线观看视频| 亚洲成人在线观看视频| 日韩西西人体444www| 日韩一区二区电影| av男人天堂一区| 秋霞午夜av一区二区三区| 亚洲欧洲日产国码二区| 欧美成人一级视频| 在线免费观看不卡av| 国产精品一品二品| 水野朝阳av一区二区三区| 中文字幕av资源一区| 91精品国产综合久久精品| 99视频有精品| 国产精品香蕉一区二区三区| 日韩电影免费在线看| 一区二区三区在线看| 欧美激情一区二区| 精品999久久久| 4438x亚洲最大成人网| 91麻豆6部合集magnet| 高清成人免费视频| 国产在线一区二区| 免费观看在线综合| 首页欧美精品中文字幕| 一区二区三区四区高清精品免费观看 | 色综合天天综合网天天看片| 日韩成人av影视| 亚洲蜜臀av乱码久久精品| 久久综合色综合88| 5月丁香婷婷综合| 欧美在线观看视频一区二区| 成人激情免费电影网址| 国产xxx精品视频大全| 久久精品国产99| 日韩成人一区二区| 性做久久久久久免费观看| 一区二区在线观看av| 最新国产の精品合集bt伙计| 国产日韩欧美不卡在线| 精品国产乱码久久久久久闺蜜| 国产精品亚洲一区二区三区在线| 国产女人18水真多18精品一级做| 成人综合在线网站| 国产99久久久精品| 成人a级免费电影| 99精品视频在线免费观看| 成人精品免费视频| 成人av影视在线观看| 成人美女在线观看| 91美女片黄在线| 91视频你懂的| 欧美在线啊v一区| 欧美日韩免费高清一区色橹橹| 久久国产精品99精品国产| 久草这里只有精品视频| 蜜桃久久av一区| 国产一区在线看| 国产suv精品一区二区三区| 成人中文字幕电影| 91激情五月电影| 欧美午夜精品久久久| 在线成人小视频| 欧美zozo另类异族| 欧美激情一区不卡| 一区二区三区色| 视频一区二区三区中文字幕| 久久99精品久久久久久动态图| 亚洲电影视频在线| 日韩福利电影在线观看| 久久精品久久久精品美女| 国产成人在线观看免费网站| 99r精品视频| 日韩三级视频在线看| 国产日产欧美一区二区三区 | 91麻豆精品国产自产在线观看一区 | 日韩欧美国产一区二区三区| 精品少妇一区二区| 《视频一区视频二区| 亚洲成人免费av| 国产馆精品极品| 欧美日韩一区二区在线视频| 精品99一区二区三区| 亚洲精品高清在线| 麻豆成人在线观看| 精品国精品国产| 亚洲免费伊人电影| 久久爱www久久做| 在线免费不卡电影| 久久久久久久综合狠狠综合| 亚洲免费观看高清在线观看| 久久91精品久久久久久秒播| 91一区二区三区在线播放| 日韩亚洲欧美一区| 一区二区在线观看av| 国产麻豆成人传媒免费观看| 色88888久久久久久影院野外| 国产高清无密码一区二区三区| 毛片av一区二区| 91亚洲国产成人精品一区二区三| 国产精品自在在线| 欧美日韩第一区日日骚| 国产精品白丝在线| 黑人巨大精品欧美一区| a亚洲天堂av| 欧美精品一区二区三区蜜臀| 亚洲综合丁香婷婷六月香| 成人黄色a**站在线观看| 精品剧情在线观看| 午夜精品久久久| 欧美最新大片在线看| 中文字幕日本不卡| 风流少妇一区二区| 精品嫩草影院久久| 日韩高清一区在线| 欧美网站一区二区| 一区二区三区高清| 一本一道波多野结衣一区二区| 色综合久久综合网欧美综合网| 91免费视频网| 国产女人18毛片水真多成人如厕| 国产精品国模大尺度视频| 国产资源精品在线观看| 69精品人人人人| 亚洲欧美乱综合| a在线播放不卡| 欧美激情综合五月色丁香| 激情综合色丁香一区二区| 欧美一区二区在线观看| 亚洲国产综合视频在线观看| 91美女片黄在线观看91美女| 中文字幕亚洲不卡| av电影天堂一区二区在线| 国产女人水真多18毛片18精品视频| 亚洲精品免费在线| 99精品1区2区| 亚洲女人小视频在线观看| 91偷拍与自偷拍精品| 亚洲日韩欧美一区二区在线| 成人精品视频网站| 国产精品成人免费在线| 99麻豆久久久国产精品免费| 成人免费一区二区三区视频| 成人性生交大片免费看中文| 国产欧美一区二区三区网站| 国产精品99久久久久久久vr | 日韩一二三区视频| 美日韩黄色大片| 欧美tickling网站挠脚心| 久久99国产精品麻豆| 精品国产制服丝袜高跟| 粉嫩av亚洲一区二区图片| 最好看的中文字幕久久| 97久久精品人人做人人爽50路| 欧美一个色资源| 国产一区日韩二区欧美三区| 国产日韩影视精品| 高清shemale亚洲人妖| 综合分类小说区另类春色亚洲小说欧美| 视频一区二区三区在线| 欧美电视剧在线看免费| 国产精品一区二区视频| 国产午夜精品一区二区三区四区 | 亚洲成人一区在线| 日韩欧美高清dvd碟片| 国产精品一区二区三区网站| 日本一区二区三级电影在线观看| 色婷婷亚洲婷婷| 日韩电影在线观看一区| 久久久久久久久岛国免费|