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

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

?? testgpsreader.cs

?? 在wince下接收gps的數據
?? CS
字號:
// TestGPSReader.cs
//
// Copyright (C) 2003 JW Hedgehog, Inc.  All rights reserved
//
// JW Hedgehog, Inc
// http://www.jwhh.com
// 
// Direct questions to mailto:jimw@jwhh.com
// 
// This code, comments and information are provided "AS IS" with
// no warrenty of any kind, either expressed or implied, including
// but not limited to the implied warranties of merchentability and/or
// fitness for a particular purpose
// ---------------------------------------------------------------------

using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
using GPSExample.Util ;

namespace TestGPSReader
{
	/// <summary>
	/// GPSReader test program.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button btnStartGPS;
		private System.Windows.Forms.Button btnStopGPS;
		private System.Windows.Forms.ListBox lbMessageDisplay;
		internal System.Windows.Forms.Label Label1;
		internal System.Windows.Forms.Label lblBearing;
		internal System.Windows.Forms.Label Label7;
		internal System.Windows.Forms.Label lblQuality;
		internal System.Windows.Forms.Label Label6;
		internal System.Windows.Forms.Label lblFixType;
		internal System.Windows.Forms.Label Label4;
		internal System.Windows.Forms.Label lblLonDirection;
		internal System.Windows.Forms.Label lblLatDirection;
		internal System.Windows.Forms.Label lblNumSats;
		internal System.Windows.Forms.Label Label2;
		internal System.Windows.Forms.Label lblLon;
		internal System.Windows.Forms.Label Label5;
		internal System.Windows.Forms.Label lblLat;
		internal System.Windows.Forms.Label Label3;
		internal System.Windows.Forms.Label lblTime;
		internal System.Windows.Forms.Label lblMessageType;
		private System.Windows.Forms.MainMenu mainMenu1;

		public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			// Construct the reader
			// The two-parameter constructor uses default port settings.  It is equivalent to the following
			//     _gpsReader = new GPSReader("COM4:", 19200, ParitySetting.NoParity, 8, StopBitsSetting.OneStopBit)
			_gpsReader = new GPSReader("COM4:", 19200) ;

			// Attach to GPSReader Events
			_gpsReader.OnGPSMessage += new GPSEventHandler(_gpsReader_OnGPSMessage);
			_gpsReader.OnGPSReadStart += new EventHandler(_gpsReader_OnGPSReadStart);
			_gpsReader.OnGPSReadStop +=new EventHandler(_gpsReader_OnGPSReadStop);
		}
		/// <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.btnStartGPS = new System.Windows.Forms.Button();
			this.btnStopGPS = new System.Windows.Forms.Button();
			this.lbMessageDisplay = new System.Windows.Forms.ListBox();
			this.Label1 = new System.Windows.Forms.Label();
			this.lblBearing = new System.Windows.Forms.Label();
			this.Label7 = new System.Windows.Forms.Label();
			this.lblQuality = new System.Windows.Forms.Label();
			this.Label6 = new System.Windows.Forms.Label();
			this.lblFixType = new System.Windows.Forms.Label();
			this.Label4 = new System.Windows.Forms.Label();
			this.lblLonDirection = new System.Windows.Forms.Label();
			this.lblLatDirection = new System.Windows.Forms.Label();
			this.lblNumSats = new System.Windows.Forms.Label();
			this.Label2 = new System.Windows.Forms.Label();
			this.lblLon = new System.Windows.Forms.Label();
			this.Label5 = new System.Windows.Forms.Label();
			this.lblLat = new System.Windows.Forms.Label();
			this.Label3 = new System.Windows.Forms.Label();
			this.lblTime = new System.Windows.Forms.Label();
			this.lblMessageType = new System.Windows.Forms.Label();
			// 
			// btnStartGPS
			// 
			this.btnStartGPS.Location = new System.Drawing.Point(32, 8);
			this.btnStartGPS.Text = "Start GPS";
			this.btnStartGPS.Click += new System.EventHandler(this.btnStartGPS_Click);
			// 
			// btnStopGPS
			// 
			this.btnStopGPS.Location = new System.Drawing.Point(128, 8);
			this.btnStopGPS.Text = "Stop GPS";
			this.btnStopGPS.Click += new System.EventHandler(this.btnStopGPS_Click);
			// 
			// lbMessageDisplay
			// 
			this.lbMessageDisplay.Location = new System.Drawing.Point(16, 160);
			this.lbMessageDisplay.Size = new System.Drawing.Size(216, 86);
			// 
			// Label1
			// 
			this.Label1.Location = new System.Drawing.Point(40, 40);
			this.Label1.Size = new System.Drawing.Size(48, 16);
			this.Label1.Text = "Time:";
			this.Label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// lblBearing
			// 
			this.lblBearing.Location = new System.Drawing.Point(96, 136);
			this.lblBearing.Size = new System.Drawing.Size(64, 16);
			// 
			// Label7
			// 
			this.Label7.Location = new System.Drawing.Point(32, 136);
			this.Label7.Size = new System.Drawing.Size(56, 16);
			this.Label7.Text = "Bearing:";
			this.Label7.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// lblQuality
			// 
			this.lblQuality.Location = new System.Drawing.Point(96, 120);
			this.lblQuality.Size = new System.Drawing.Size(64, 16);
			// 
			// Label6
			// 
			this.Label6.Location = new System.Drawing.Point(32, 120);
			this.Label6.Size = new System.Drawing.Size(56, 16);
			this.Label6.Text = "Quality:";
			this.Label6.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// lblFixType
			// 
			this.lblFixType.Location = new System.Drawing.Point(96, 104);
			this.lblFixType.Size = new System.Drawing.Size(64, 16);
			// 
			// Label4
			// 
			this.Label4.Location = new System.Drawing.Point(32, 104);
			this.Label4.Size = new System.Drawing.Size(56, 16);
			this.Label4.Text = "Fix Type:";
			this.Label4.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// lblLonDirection
			// 
			this.lblLonDirection.Location = new System.Drawing.Point(176, 72);
			this.lblLonDirection.Size = new System.Drawing.Size(32, 16);
			this.lblLonDirection.TextAlign = System.Drawing.ContentAlignment.TopCenter;
			// 
			// lblLatDirection
			// 
			this.lblLatDirection.Location = new System.Drawing.Point(176, 56);
			this.lblLatDirection.Size = new System.Drawing.Size(32, 16);
			this.lblLatDirection.TextAlign = System.Drawing.ContentAlignment.TopCenter;
			// 
			// lblNumSats
			// 
			this.lblNumSats.Location = new System.Drawing.Point(96, 88);
			this.lblNumSats.Size = new System.Drawing.Size(64, 16);
			// 
			// Label2
			// 
			this.Label2.Location = new System.Drawing.Point(32, 88);
			this.Label2.Size = new System.Drawing.Size(56, 16);
			this.Label2.Text = "# Sats:";
			this.Label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// lblLon
			// 
			this.lblLon.Location = new System.Drawing.Point(96, 72);
			this.lblLon.Size = new System.Drawing.Size(64, 16);
			// 
			// Label5
			// 
			this.Label5.Location = new System.Drawing.Point(32, 72);
			this.Label5.Size = new System.Drawing.Size(56, 16);
			this.Label5.Text = "Lon:";
			this.Label5.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// lblLat
			// 
			this.lblLat.Location = new System.Drawing.Point(96, 56);
			this.lblLat.Size = new System.Drawing.Size(64, 16);
			// 
			// Label3
			// 
			this.Label3.Location = new System.Drawing.Point(32, 56);
			this.Label3.Size = new System.Drawing.Size(56, 16);
			this.Label3.Text = "Lat:";
			this.Label3.TextAlign = System.Drawing.ContentAlignment.TopRight;
			// 
			// lblTime
			// 
			this.lblTime.Location = new System.Drawing.Point(96, 40);
			this.lblTime.Size = new System.Drawing.Size(104, 16);
			// 
			// lblMessageType
			// 
			this.lblMessageType.Location = new System.Drawing.Point(8, 248);
			this.lblMessageType.Size = new System.Drawing.Size(224, 16);
			// 
			// Form1
			// 
			this.Controls.Add(this.lblMessageType);
			this.Controls.Add(this.Label1);
			this.Controls.Add(this.lblBearing);
			this.Controls.Add(this.Label7);
			this.Controls.Add(this.lblQuality);
			this.Controls.Add(this.Label6);
			this.Controls.Add(this.lblFixType);
			this.Controls.Add(this.Label4);
			this.Controls.Add(this.lblLonDirection);
			this.Controls.Add(this.lblLatDirection);
			this.Controls.Add(this.lblNumSats);
			this.Controls.Add(this.Label2);
			this.Controls.Add(this.lblLon);
			this.Controls.Add(this.Label5);
			this.Controls.Add(this.lblLat);
			this.Controls.Add(this.Label3);
			this.Controls.Add(this.lblTime);
			this.Controls.Add(this.lbMessageDisplay);
			this.Controls.Add(this.btnStopGPS);
			this.Controls.Add(this.btnStartGPS);
			this.Menu = this.mainMenu1;
			this.MinimizeBox = false;
			this.Text = "Test GPS (C#)";

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>

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

		private GPSReader _gpsReader ;

		/// <summary>
		/// Initiate the GPS reading process
		/// StartRead launches the background thread and begins reading from the port
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnStartGPS_Click(object sender, System.EventArgs e)
		{
			lblMessageType.Text = "Read Starting..." ;
			_gpsReader.StartRead() ;
		}

		/// <summary>
		/// Terminate GPS reading process
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void btnStopGPS_Click(object sender, System.EventArgs e)
		{
			lblMessageType.Text = "Read Stopping..." ;
			_gpsReader.StopRead() ;
		}

		/// <summary>
		/// This event is called everytime a GPS sentence is received by the GPSReader
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="arg"></param>
		private void _gpsReader_OnGPSMessage(object sender, GPSEventArgs arg)
		{
			// Add the complete sentence to the listbox
			lbMessageDisplay.Items.Insert(0,arg.MessageText) ;
			if (lbMessageDisplay.Items.Count > 8)
				lbMessageDisplay.Items.RemoveAt(8) ;

			// Update the appropriate screen fields based on the message type
			switch(arg.MessageType)
			{
				case "GPGGA":
					lblTime.Text = ((int)arg.Time).ToString("D6") ;	// Show only whole time value
					lblLat.Text = arg.Lat.ToString("F6") ;			// Show exactly 6 decimal places
					lblLatDirection.Text = arg.LatDirection ;
					lblLon.Text = arg.Lon.ToString("F6") ;			// Show exactly 6 decimal places
					lblLonDirection.Text = arg.LonDirection ;
					lblNumSats.Text = arg.NumSats.ToString() ;
					lblQuality.Text = arg.Quality.ToString() ;
					break;
				case "GPGSA":
					lblFixType.Text = arg.FixType.ToString() ;
					break;
				case "GPRMC":
					lblBearing.Text = arg.Bearing.ToString() ;
					break;
				case "GPVTG":
					lblBearing.Text = arg.Bearing.ToString() ;
					break;
			}
		}

		/// <summary>
		/// This method is called when the background thread enters the GPS Read loop
		/// It is not required that your code handle this event.  It simply provides a confirmation
		/// that the reading process has actually begun
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="arg"></param>
		private void _gpsReader_OnGPSReadStart(object sender, EventArgs arg)
		{
	        lblMessageType.Text = "Read Started - Mode: " + _gpsReader.ActiveReadMode.ToString() ;
		}

		/// <summary>
		/// This method is called when the background thread exits the GPS Read loop
		/// It is not required that your code handle this event.  It simply provides a notification
		/// that the read loop is shutting down.  The event fires whether the thread terminated because
		/// of a call to StopRead or if an error occured.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="arg"></param>
		private void _gpsReader_OnGPSReadStop(object sender, EventArgs arg)
		{
			lblMessageType.Text = "Read Stopped" ;
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久毛片高清国产| 国产精品欧美久久久久一区二区| 国产欧美综合色| 欧美午夜片在线看| 成人一区二区三区| 日韩国产欧美三级| 亚洲午夜久久久久久久久电影网 | 欧美国产成人精品| 91精品国产综合久久精品麻豆| 国产伦精品一区二区三区在线观看| 一区二区三区在线观看视频| 久久综合九色综合欧美就去吻| 欧美美女激情18p| 一本一道久久a久久精品综合蜜臀| 国产综合久久久久久鬼色| 日韩激情一二三区| 亚洲午夜私人影院| 亚洲猫色日本管| 国产精品美女一区二区在线观看| 日韩精品一区国产麻豆| 欧美日韩午夜精品| 在线一区二区三区做爰视频网站| 国产成人av电影免费在线观看| 精品写真视频在线观看| 久久国产精品露脸对白| 琪琪一区二区三区| 美腿丝袜在线亚洲一区| 午夜欧美一区二区三区在线播放 | 伦理电影国产精品| 奇米一区二区三区| 蜜臀精品一区二区三区在线观看| 亚洲gay无套男同| 亚洲成国产人片在线观看| 亚洲综合激情另类小说区| 亚洲码国产岛国毛片在线| 尤物视频一区二区| 亚洲一级电影视频| 一区二区三区av电影| 一区二区三区不卡在线观看| 亚洲一区二区三区四区五区黄| 国产乱人伦偷精品视频不卡| 老司机精品视频一区二区三区| 理论电影国产精品| 国产在线一区观看| 高清shemale亚洲人妖| 成人在线综合网站| av不卡免费电影| 欧美在线视频日韩| 在线综合亚洲欧美在线视频 | 亚洲日本va午夜在线影院| 一区在线观看视频| 亚洲精品免费播放| 亚洲成人高清在线| 蜜臀av一区二区在线观看| 国产一区激情在线| kk眼镜猥琐国模调教系列一区二区| 91在线视频在线| 欧美人狂配大交3d怪物一区| 日韩三级中文字幕| 亚洲国产成人一区二区三区| 亚洲免费在线视频| 蜜桃视频一区二区三区在线观看| 极品少妇xxxx精品少妇偷拍| 波多野结衣精品在线| 色偷偷88欧美精品久久久| 91精品国产欧美一区二区成人| 精品国产乱码久久久久久1区2区 | 日韩av电影一区| 国产毛片精品视频| 色偷偷一区二区三区| 在线不卡a资源高清| 久久精品一二三| 亚洲一区在线视频| 国精品**一区二区三区在线蜜桃| www.一区二区| 日韩一区二区中文字幕| 国产精品国产自产拍高清av| 五月婷婷久久丁香| 丰满岳乱妇一区二区三区| 在线观看一区日韩| 久久无码av三级| 亚洲国产毛片aaaaa无费看| 国产一区二区免费看| 欧美亚洲日本国产| 日本一区二区成人在线| 婷婷综合久久一区二区三区| 丁香婷婷综合色啪| 欧美一区二区视频在线观看2020 | 麻豆免费看一区二区三区| 成人教育av在线| 日韩欧美在线不卡| 亚洲女同一区二区| 国产激情一区二区三区桃花岛亚洲| 色婷婷精品久久二区二区蜜臂av| 精品欧美久久久| 亚洲国产中文字幕| 不卡av在线免费观看| 日韩精品中文字幕在线一区| 一区二区三区产品免费精品久久75 | 国产精品久久久久久福利一牛影视| 亚洲va在线va天堂| 91麻豆成人久久精品二区三区| 精品1区2区在线观看| 午夜亚洲福利老司机| 99re66热这里只有精品3直播 | 久久草av在线| 欧美日韩和欧美的一区二区| 中文字幕一区二区三区乱码在线 | 91小视频免费观看| 久久伊人蜜桃av一区二区| 午夜精品一区二区三区电影天堂| k8久久久一区二区三区| 国产亚洲综合在线| 国内国产精品久久| 日韩午夜精品视频| 日韩和欧美一区二区| 欧美性受xxxx黑人xyx性爽| 最新欧美精品一区二区三区| 国产精品夜夜嗨| 久久综合999| 国产麻豆视频一区| 精品国产乱码久久久久久图片| 天天操天天综合网| 精品视频在线免费看| 亚洲综合久久久| 欧美网站一区二区| 亚洲综合成人在线| 欧美少妇性性性| 亚洲成av人片在www色猫咪| 欧美优质美女网站| 亚洲国产精品久久一线不卡| 欧美性受xxxx黑人xyx性爽| 亚洲一区二区三区四区的| 色狠狠色狠狠综合| 亚洲午夜av在线| 欧美日韩免费不卡视频一区二区三区| 亚洲最快最全在线视频| 在线亚洲人成电影网站色www| 亚洲日本在线观看| 在线看日本不卡| 亚洲不卡av一区二区三区| 777亚洲妇女| 麻豆精品视频在线观看| 久久蜜桃av一区精品变态类天堂 | 国产精品一级二级三级| www亚洲一区| 粉嫩13p一区二区三区| 中文字幕免费不卡在线| 99久久亚洲一区二区三区青草| 成人免费在线视频观看| 欧美午夜精品一区二区蜜桃 | 免费在线观看视频一区| 精品国产欧美一区二区| 东方aⅴ免费观看久久av| 专区另类欧美日韩| 欧美视频在线播放| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美变态tickling挠脚心| 国产成人免费视频精品含羞草妖精 | 美女国产一区二区三区| 久久麻豆一区二区| 91一区二区在线观看| 亚洲成人动漫在线免费观看| 欧美xxxx老人做受| 国产成人三级在线观看| 一区二区三区精品视频在线| 日韩一本二本av| 成人av电影在线观看| 亚洲v精品v日韩v欧美v专区| 精品黑人一区二区三区久久| 成人免费的视频| 亚欧色一区w666天堂| 久久精品亚洲乱码伦伦中文| 日本乱人伦一区| 久久精品72免费观看| 亚洲欧美国产高清| 欧美草草影院在线视频| 色婷婷狠狠综合| 国产一区二区三区观看| 亚洲最新视频在线播放| 久久精品亚洲麻豆av一区二区| 欧美一a一片一级一片| 国产精品中文有码| 亚洲午夜一二三区视频| 国产欧美日韩激情| 欧美精品一卡二卡| 成人激情黄色小说| 日本免费在线视频不卡一不卡二| 国产精品美女一区二区三区| 日韩午夜av一区| 色天使色偷偷av一区二区| 国产剧情一区二区| 天堂成人免费av电影一区| 国产精品伦理在线| 精品国产青草久久久久福利| 欧美伊人久久久久久午夜久久久久| 狠狠色丁香九九婷婷综合五月| 一区二区久久久久久| 日本一区二区三区国色天香 | 精品欧美一区二区久久|