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

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

?? testgpsreader.cs

?? 讀取并分析GPS數據的GPSReader程序(C#和VB.net版代碼) .NET2003下使用
?? 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一区二区三区免费野_久草精品视频
中文字幕不卡的av| 久久综合久久99| 99九九99九九九视频精品| 另类中文字幕网| 亚洲成a天堂v人片| 亚洲6080在线| 丝袜美腿亚洲一区二区图片| 亚洲精品成人精品456| 亚洲激情第一区| 亚洲国产精品久久艾草纯爱| 亚洲国产日韩在线一区模特 | 激情都市一区二区| 久久99精品一区二区三区三区| 久久精品理论片| 国内精品写真在线观看| 国产成人高清视频| 91亚洲精品乱码久久久久久蜜桃| 91蝌蚪国产九色| 欧美精品xxxxbbbb| 久久品道一品道久久精品| 国产精品国产三级国产普通话蜜臀| 国产精品久久久久久久久果冻传媒| 亚洲欧美国产77777| 亚洲成人av电影在线| 老司机一区二区| 成人福利视频网站| 欧美日韩dvd在线观看| 欧美xxxxx裸体时装秀| 国产精品入口麻豆九色| 亚洲国产欧美另类丝袜| 免费观看在线色综合| 国产高清不卡一区| 欧美日韩成人在线| 国产婷婷色一区二区三区| 亚洲夂夂婷婷色拍ww47| 久草精品在线观看| 一本一本久久a久久精品综合麻豆| 91精品国产综合久久久蜜臀图片| 久久久另类综合| 亚洲一区在线电影| 国产精品一区二区在线观看不卡| 91在线精品一区二区三区| 日韩一级大片在线观看| 亚洲人成精品久久久久| 精品一二三四区| 欧美三日本三级三级在线播放| 日韩欧美亚洲国产另类| 尤物在线观看一区| 国产精品一区一区| 日韩网站在线看片你懂的| 亚洲日本乱码在线观看| 国产露脸91国语对白| 欧美日韩精品欧美日韩精品一 | 久久综合狠狠综合| 亚洲综合精品久久| 99久久久免费精品国产一区二区| 日韩精品一区二区三区四区| 亚洲一区二区影院| 91美女在线视频| 亚洲国产精品激情在线观看| 韩国中文字幕2020精品| 91精品国产麻豆国产自产在线| 亚洲蜜桃精久久久久久久| 成人综合婷婷国产精品久久蜜臀| 日韩免费观看2025年上映的电影 | 69堂精品视频| 亚洲欧美韩国综合色| 成人综合在线视频| 中文字幕不卡三区| 成人福利电影精品一区二区在线观看| 精品精品国产高清一毛片一天堂| 天天色 色综合| 欧美日韩精品一区二区在线播放| 亚洲另类在线视频| 欧美专区亚洲专区| 亚洲综合男人的天堂| 欧美系列日韩一区| 一区二区三区四区在线播放| 91免费观看视频在线| 中文字幕亚洲不卡| 99热99精品| 亚洲欧美欧美一区二区三区| 99精品久久99久久久久| 亚洲免费在线视频一区 二区| 成人av一区二区三区| 亚洲欧洲韩国日本视频| 91丨porny丨国产| 一卡二卡欧美日韩| 91精品麻豆日日躁夜夜躁| 蜜桃久久久久久| 亚洲精品一区二区三区福利 | 午夜欧美一区二区三区在线播放| 欧美私人免费视频| 日韩国产成人精品| 久久久噜噜噜久久中文字幕色伊伊 | 国产麻豆成人传媒免费观看| 久久久精品影视| 91在线丨porny丨国产| 亚洲高清免费视频| 精品黑人一区二区三区久久 | 在线亚洲一区观看| 男人的天堂亚洲一区| 久久久91精品国产一区二区精品 | 日本高清不卡视频| 日本欧美一区二区三区| 中文天堂在线一区| 欧美猛男超大videosgay| 精品系列免费在线观看| 国产精品家庭影院| 欧美日韩激情一区二区三区| 国产精品一区二区三区99| 亚洲精品美国一| 精品国产第一区二区三区观看体验 | 蜜臀av一级做a爰片久久| 亚洲国产岛国毛片在线| 欧美日韩高清不卡| 国产一区二区导航在线播放| 亚洲理论在线观看| 久久婷婷综合激情| 欧美日韩国产系列| 不卡的av在线| 日本欧美一区二区| 亚洲精品视频在线观看免费| 欧美大肚乱孕交hd孕妇| 欧美在线免费观看视频| 国产成人av电影| 美腿丝袜一区二区三区| 亚洲成人精品一区二区| 亚洲视频一二三区| 欧美国产综合一区二区| 日韩一二三四区| 欧美日韩一区二区三区视频 | 美女mm1313爽爽久久久蜜臀| 亚洲日本一区二区| 中文久久乱码一区二区| 2020国产精品| 日韩一区二区电影| 欧美一区二区三区系列电影| 91久久人澡人人添人人爽欧美| 国产a级毛片一区| 黑人巨大精品欧美一区| 久久成人免费网站| 日本成人中文字幕| 日韩电影免费在线看| 午夜私人影院久久久久| 亚洲一区在线视频| 亚洲综合在线电影| 日韩美女啊v在线免费观看| 国产亚洲精品aa| 国产清纯在线一区二区www| 精品蜜桃在线看| 日韩欧美国产麻豆| 欧美电影免费观看高清完整版| 欧美一级久久久久久久大片| 欧美日韩国产另类不卡| 欧美精品一卡两卡| 日韩一区二区三区视频| 在线91免费看| 欧美成人综合网站| 久久久久久久久久看片| 欧美国产成人在线| 亚洲日本一区二区三区| 一区二区三区中文字幕在线观看| 亚洲精品第一国产综合野| 亚洲永久精品国产| 天天色综合天天| 韩国精品免费视频| 成人毛片视频在线观看| 91黄色激情网站| 欧美精品高清视频| 欧美成人a∨高清免费观看| 久久精品一区四区| 国产精品久久久久久久久快鸭 | 精品成人佐山爱一区二区| 精品国产免费人成在线观看| 国产午夜精品美女毛片视频| 中文字幕一区二区三区四区不卡 | 精品国产凹凸成av人网站| 久久九九99视频| 一级中文字幕一区二区| 男女性色大片免费观看一区二区 | 色综合中文字幕国产| 欧美三级资源在线| 久久品道一品道久久精品| 亚洲图片激情小说| 日韩精品一区第一页| 国产99久久久久| 欧美蜜桃一区二区三区| 国产色婷婷亚洲99精品小说| 一区二区三区小说| 蜜臀va亚洲va欧美va天堂 | 欧美亚洲国产一区二区三区va| 538在线一区二区精品国产| 久久久91精品国产一区二区精品| 亚洲综合在线免费观看| 国产盗摄一区二区| 欧美精品黑人性xxxx| 亚洲欧美综合在线精品| 精品一区二区三区日韩| 日本精品一级二级|