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

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

?? form1.cs

?? Wince Comport test CE串口標準組件
?? CS
?? 第 1 頁 / 共 2 頁
字號:
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using System.Runtime.InteropServices;  
using Microsoft.WindowsCE.Forms;  

namespace COMTest
{



	/// <summary>
	/// Form1 的摘要說明。
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.ComboBox comboBox1;
		private System.Windows.Forms.ComboBox comboBox2;
		private System.Windows.Forms.ComboBox comboBox3;
		private System.Windows.Forms.ComboBox comboBox4;
		private System.Windows.Forms.ComboBox comboBox5;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button button3;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.ListBox listBox1;
		private System.Windows.Forms.Button button4;


		#region 串口變量定義
			const uint COM_SINGLEFRAME=4096;
			const uint COM_FRAMECOUNT=16;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
			const uint WM_COMUSERDEFINE=0x0501;


			enum COM_NO{COM1=0,COM2,COM3,COM4,COM5,COM6,COM7,COM8,COM9};
			enum COM_StopBits{COM_StopBits_1=0,COM_StopBits_1_5,COM_StopBits_2};
			enum COM_ByteSize{COM_ByteSize_5=0, COM_ByteSize_6, COM_ByteSize_7, COM_ByteSize_8};
			enum COM_Parity{COM_Parity_None=0, COM_Parity_Odd, COM_Parity_Even, COM_Parity_Mark, COM_Parity_Space};
			enum COM_Baudrate{COM_Baudrate_110=0,COM_Baudrate_300,COM_Baudrate_600,COM_Baudrate_1200,COM_Baudrate_2400,COM_Baudrate_4800,COM_Baudrate_9600,COM_Baudrate_19200,COM_Baudrate_38400,COM_Baudrate_57600,COM_Baudrate_115200};
			enum THREAD_PRIORITY{PRIORITY_TIME_CRITICAL=0,PRIORITY_HIGHEST,PRIORITY_ABOVE_NORMAL,PRIORITY_NORMAL,PRIORITY_BELOW_NORMAL,PRIORITY_LOWEST,PRIORITY_ABOVE_IDLE,PRIORITY_IDLE};


			[DllImport("COMPort.dll",CallingConvention=CallingConvention.Winapi)]
			static extern IntPtr COMPort_Init(
				COM_NO comNo,
				COM_Baudrate BaudRate,
				COM_Parity Parity,
				COM_ByteSize ByteSize,
				COM_StopBits StopBits,
				uint FrameCount,
				uint SingleFrameLength,
				THREAD_PRIORITY SendThreadPriority,
				THREAD_PRIORITY RecvThreadPriority,
				uint WM_USERDEFINE,
				IntPtr MainHWnd
			); 
			
		[DllImport("COMPort.dll",CallingConvention=CallingConvention.Winapi)]
		static extern void COMPort_DeInit(IntPtr ComPointer);

		[DllImport("COMPort.dll",CallingConvention=CallingConvention.Winapi)]
		static extern void COMPort_SendByte(IntPtr ComPointer,byte[] Data,uint DataLen);
			
		[DllImport("COMPort.dll",CallingConvention=CallingConvention.Winapi)]
		static extern void COMPort_RecvByte(IntPtr ComPointer,byte[] Data,ref uint DataLen);

		#endregion 串口變量定義

		myMessageWindow MMW=null;
		byte[] CurrentByte=new byte[COM_SINGLEFRAME*COM_FRAMECOUNT];
		uint AllCount=0;

		IntPtr ComPointer=IntPtr.Zero; 


		public Form1()
		{
			//
			// Windows 窗體設計器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 調用后添加任何構造函數代碼
			//
		}
		/// <summary>
		/// 清理所有正在使用的資源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			base.Dispose( disposing );
		}
		#region Windows 窗體設計器生成的代碼
		/// <summary>
		/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
		/// 此方法的內容。
		/// </summary>
		private void InitializeComponent()
		{
			this.button1 = new System.Windows.Forms.Button();
			this.comboBox1 = new System.Windows.Forms.ComboBox();
			this.comboBox2 = new System.Windows.Forms.ComboBox();
			this.comboBox3 = new System.Windows.Forms.ComboBox();
			this.comboBox4 = new System.Windows.Forms.ComboBox();
			this.comboBox5 = new System.Windows.Forms.ComboBox();
			this.button2 = new System.Windows.Forms.Button();
			this.button3 = new System.Windows.Forms.Button();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.listBox1 = new System.Windows.Forms.ListBox();
			this.button4 = new System.Windows.Forms.Button();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(8, 56);
			this.button1.Size = new System.Drawing.Size(88, 32);
			this.button1.Text = "打開串口";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// comboBox1
			// 
			this.comboBox1.Items.Add("COM1");
			this.comboBox1.Items.Add("COM2");
			this.comboBox1.Items.Add("COM3");
			this.comboBox1.Items.Add("COM4");
			this.comboBox1.Items.Add("COM5");
			this.comboBox1.Items.Add("COM6");
			this.comboBox1.Items.Add("COM7");
			this.comboBox1.Items.Add("COM8");
			this.comboBox1.Items.Add("COM9");
			this.comboBox1.Location = new System.Drawing.Point(8, 16);
			this.comboBox1.Size = new System.Drawing.Size(64, 20);
			// 
			// comboBox2
			// 
			this.comboBox2.Items.Add("110");
			this.comboBox2.Items.Add("300");
			this.comboBox2.Items.Add("600");
			this.comboBox2.Items.Add("1200");
			this.comboBox2.Items.Add("2400");
			this.comboBox2.Items.Add("4800");
			this.comboBox2.Items.Add("9600");
			this.comboBox2.Items.Add("19200");
			this.comboBox2.Items.Add("38400");
			this.comboBox2.Items.Add("57600");
			this.comboBox2.Items.Add("115200");
			this.comboBox2.Location = new System.Drawing.Point(88, 16);
			this.comboBox2.Size = new System.Drawing.Size(64, 20);
			// 
			// comboBox3
			// 
			this.comboBox3.Items.Add("None");
			this.comboBox3.Items.Add("ODD");
			this.comboBox3.Items.Add("Even");
			this.comboBox3.Items.Add("Mark");
			this.comboBox3.Items.Add("Space");
			this.comboBox3.Location = new System.Drawing.Point(168, 16);
			this.comboBox3.Size = new System.Drawing.Size(64, 20);
			// 
			// comboBox4
			// 
			this.comboBox4.Items.Add("5");
			this.comboBox4.Items.Add("6");
			this.comboBox4.Items.Add("7");
			this.comboBox4.Items.Add("8");
			this.comboBox4.Location = new System.Drawing.Point(240, 16);
			this.comboBox4.Size = new System.Drawing.Size(64, 20);
			// 
			// comboBox5
			// 
			this.comboBox5.Items.Add("1");
			this.comboBox5.Items.Add("1.5");
			this.comboBox5.Items.Add("2");
			this.comboBox5.Location = new System.Drawing.Point(320, 16);
			this.comboBox5.Size = new System.Drawing.Size(64, 20);
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(104, 56);
			this.button2.Size = new System.Drawing.Size(64, 32);
			this.button2.Text = "關閉串口";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// button3
			// 
			this.button3.Location = new System.Drawing.Point(176, 56);
			this.button3.Size = new System.Drawing.Size(80, 32);
			this.button3.Text = "發送數據";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(272, 64);
			this.textBox1.Size = new System.Drawing.Size(40, 21);
			this.textBox1.Text = "255";
			// 
			// listBox1
			// 
			this.listBox1.Location = new System.Drawing.Point(8, 96);
			this.listBox1.Size = new System.Drawing.Size(544, 278);
			// 
			// button4
			// 
			this.button4.Location = new System.Drawing.Point(344, 56);
			this.button4.Size = new System.Drawing.Size(72, 32);
			this.button4.Text = "clear";
			this.button4.Click += new System.EventHandler(this.button4_Click);
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(440, 24);
			this.label1.Size = new System.Drawing.Size(112, 20);
			this.label1.Text = "Clear以后總個數";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(440, 64);
			this.label2.Text = "0";
			// 
			// Form1
			// 
			this.ClientSize = new System.Drawing.Size(562, 384);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.button4);
			this.Controls.Add(this.listBox1);
			this.Controls.Add(this.textBox1);
			this.Controls.Add(this.button3);
			this.Controls.Add(this.button2);
			this.Controls.Add(this.comboBox5);
			this.Controls.Add(this.comboBox4);
			this.Controls.Add(this.comboBox3);
			this.Controls.Add(this.comboBox2);
			this.Controls.Add(this.comboBox1);
			this.Controls.Add(this.button1);
			this.Text = "串口測試";
			this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
			this.Load += new System.EventHandler(this.Form1_Load);

		}
		#endregion

		/// <summary>
		/// 應用程序的主入口點。
		/// </summary>

		static void Main() 
		{
			Application.Run(new Form1());
		}



		private void Form1_Load(object sender, System.EventArgs e)
		{
			this.comboBox1.SelectedIndex=0;  //com1
			this.comboBox2.SelectedIndex=6;  //9600
			this.comboBox3.SelectedIndex=0;  //None
			this.comboBox4.SelectedIndex=3;  //8
			this.comboBox5.SelectedIndex=0;  //1
			//得到自己的接受消息的窗口
			this.MMW=new myMessageWindow(this); 


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美经典视频| 亚洲va欧美va国产va天堂影院| www.成人在线| 亚洲成人av福利| 国产欧美日韩在线看| 欧美日本一区二区三区四区| 成人国产精品免费| 美国欧美日韩国产在线播放| 亚洲精品一二三区| 中国av一区二区三区| 日韩欧美你懂的| 欧美亚洲高清一区| eeuss鲁一区二区三区| 国内偷窥港台综合视频在线播放| 亚洲一区二区三区中文字幕| 日本一区二区综合亚洲| 精品久久久三级丝袜| 欧美精品乱码久久久久久| 在线观看国产日韩| 972aa.com艺术欧美| 成人一级片在线观看| 国内成人自拍视频| 久久精品72免费观看| 视频一区二区不卡| 亚洲国产欧美日韩另类综合| 亚洲免费观看视频| 中文字幕在线不卡国产视频| 欧美激情一区二区三区四区| 国产亚洲精品aa午夜观看| 久久这里都是精品| 欧美xxxx在线观看| 欧美成人aa大片| 日韩精品一区二区三区蜜臀| 日韩女优电影在线观看| 欧美一区二区三区电影| 91精品国产色综合久久久蜜香臀| 欧美日韩成人综合| 欧美日本一道本| 欧美一级理论片| 欧美www视频| 久久综合九色综合久久久精品综合| 日韩欧美一级二级三级久久久| 欧美一级片免费看| 精品奇米国产一区二区三区| 精品99999| 久久精品人人做人人爽人人| 国产精品萝li| 亚洲三级免费观看| 亚洲国产一区视频| 日韩电影一区二区三区| 精品一区二区三区免费毛片爱| 国产一区二区视频在线| 高清在线观看日韩| 99精品欧美一区二区蜜桃免费| 色综合久久久久| 欧美日高清视频| 日韩精品一区国产麻豆| 国产欧美日韩另类一区| 亚洲视频在线观看三级| 亚洲一区二区不卡免费| 麻豆精品在线看| 成人综合在线网站| 日本丶国产丶欧美色综合| 欧美二区三区91| 国产三级久久久| 亚洲欧美区自拍先锋| 亚洲不卡在线观看| 国产一区二区三区黄视频| av亚洲精华国产精华| 欧美日韩一级视频| 久久综合色鬼综合色| 亚洲欧洲综合另类| 秋霞国产午夜精品免费视频| 成人综合在线视频| 欧美日韩小视频| 久久精品日韩一区二区三区| 一区二区高清视频在线观看| 免费在线一区观看| 成人福利电影精品一区二区在线观看| 色婷婷一区二区| 337p粉嫩大胆噜噜噜噜噜91av| 一色屋精品亚洲香蕉网站| 日本午夜精品一区二区三区电影 | 亚洲永久精品国产| 久久激情综合网| 色嗨嗨av一区二区三区| 欧美va日韩va| 亚洲一区二区三区四区不卡| 国产美女在线观看一区| 欧美性色黄大片| 中文字幕av不卡| 男人的j进女人的j一区| 94色蜜桃网一区二区三区| 精品久久人人做人人爰| 亚洲午夜精品网| 丰满少妇在线播放bd日韩电影| 欧美日本一道本| 国产精品久久久久久亚洲毛片| 奇米亚洲午夜久久精品| 色呦呦国产精品| 中文字幕第一区二区| 免费欧美在线视频| 欧美在线免费播放| 国产精品乱码久久久久久| 蜜桃精品在线观看| 欧美这里有精品| 中文字幕中文字幕在线一区| 国产在线精品免费| 日韩欧美一级二级| 日韩av一级电影| 欧美色偷偷大香| 亚洲男人都懂的| heyzo一本久久综合| 久久精品一区四区| 国产综合色精品一区二区三区| 欧美一区二区三区视频在线 | 国产一区二区三区免费播放| 欧美精品乱码久久久久久 | 一区二区久久久久久| 99精品欧美一区二区蜜桃免费| 日本一区二区视频在线观看| 国产一区二区三区免费观看| 日韩美女主播在线视频一区二区三区 | 成人激情小说网站| 久久久久久久久久久电影| 青娱乐精品视频| 日韩一区二区三区免费观看| 日韩中文欧美在线| 91麻豆精品国产自产在线观看一区| 一区二区三区四区不卡视频| 91在线你懂得| 亚洲人精品午夜| 91在线视频播放地址| 亚洲免费大片在线观看| 99精品黄色片免费大全| 亚洲视频一区二区在线观看| 色哟哟一区二区在线观看| 一区二区三区四区视频精品免费| 色综合一区二区| 亚洲国产日韩在线一区模特| 欧美人狂配大交3d怪物一区| 婷婷国产在线综合| 欧美一区二区三区男人的天堂| 青青草原综合久久大伊人精品 | 亚洲一区二区视频| 欧美喷潮久久久xxxxx| 日韩制服丝袜av| 精品国产亚洲在线| 国产1区2区3区精品美女| 国产精品久久久久久久久搜平片| 99久久精品免费| 亚洲制服丝袜一区| 5月丁香婷婷综合| 久久99精品久久久| 国产女主播一区| 91国产免费看| 日韩国产欧美一区二区三区| 久久久久久免费毛片精品| 成人免费视频免费观看| 一区二区三区高清不卡| 欧美一级欧美三级| 成人午夜精品在线| 亚洲影视资源网| 欧美成人video| 成人精品视频一区| 三级不卡在线观看| 久久人人爽爽爽人久久久| 99视频一区二区| 奇米一区二区三区av| 国产精品人成在线观看免费| 欧美三区在线观看| 韩国欧美国产一区| 亚洲综合视频网| 精品成人在线观看| 色偷偷久久人人79超碰人人澡| 男男成人高潮片免费网站| 久久99国产精品麻豆| 国产精品午夜在线观看| 欧美精品久久久久久久久老牛影院| 国产一区二区在线看| 亚洲综合小说图片| 久久久久久久免费视频了| 欧美性猛交一区二区三区精品| 精品一区二区日韩| 一区二区三区美女视频| 久久综合九色综合97婷婷 | 国产午夜精品久久| 欧美日韩亚洲高清一区二区| 国产999精品久久| 免费亚洲电影在线| 中文字幕在线播放不卡一区| 精品少妇一区二区三区| 欧美在线看片a免费观看| 成人免费视频免费观看| 蜜臀久久久99精品久久久久久| 日韩一区在线看| 久久久久久久网| 欧美videossexotv100| 欧美性高清videossexo| av高清久久久|