home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2004-08-25 | 84.5 KB | 1,842 lines
' ************************************************************************** ' **** ' **** GPS.NET Global Positioning SDK Example 1 ' **** A demonstration of GPS.NET's major features. ' **** ' **** For assistance with your GPS device or for troubleshooting: ' **** ' **** http://www.gpsdotnet.com/support ' **** support@gpsdotnet.com ' **** ' **** To view known product issues & updates in the Knowledge Base: ' **** ' **** http://www.gpsdotnet.com/kb ' **** ' **** For pricing information & online ordering: ' **** ' **** http://www.gpsdotnet.com/purchase ' **** ' **** This source code is considered public domain and may be re-used ' **** in your own applications. ' **** ' ************************************************************************* ' **** ' **** NOTE: Since GPS.NET is multi-threaded, the Invoke() method is ' **** used frequently to make sure that updates to form controls occur ' **** on the form's thread. This prevents the application from locking. ' **** up, especially for Compact Framework apps. For more information, ' **** refer to the Knowledge Base. ' **** ' ************************************************************************* Imports StormSource.Gps Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) MyBase.Dispose(disposing) End Sub 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents TabControl1 As System.Windows.Forms.TabControl Friend WithEvents RawDataTabPage As System.Windows.Forms.TabPage Friend WithEvents ParseButton As System.Windows.Forms.Button Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents ParsingText As System.Windows.Forms.TextBox Friend WithEvents RecognizedSentencesLabel As System.Windows.Forms.Label Friend WithEvents UnrecognizedSentencesLabel As System.Windows.Forms.Label Friend WithEvents UnrecognizedSentences As System.Windows.Forms.ListBox Friend WithEvents RecognizedSentences As System.Windows.Forms.ListBox Friend WithEvents PositionTabPage As System.Windows.Forms.TabPage Friend WithEvents SatelliteTabPage As System.Windows.Forms.TabPage Friend WithEvents WaypointDisplayModeComboBox As System.Windows.Forms.ComboBox Friend WithEvents WaypointColorComboBox As System.Windows.Forms.ComboBox Friend WithEvents WaypointSymbolComboBox As System.Windows.Forms.ComboBox Friend WithEvents WaypointIntersectingRoadCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointCountryCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointDepthCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointFacilityNameCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointCityCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointStateCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointAddressCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointAltitudeCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointDisplayModeCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointSymbolCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointColorCheckbox As System.Windows.Forms.CheckBox Friend WithEvents WaypointCommentCheckbox As System.Windows.Forms.CheckBox Friend WithEvents SupportsRoutes As System.Windows.Forms.Label Friend WithEvents SupportsTracks As System.Windows.Forms.Label Friend WithEvents SupportsWaypoints As System.Windows.Forms.Label Friend WithEvents SupportsRoutesLabel As System.Windows.Forms.Label Friend WithEvents SupportsTracksLabel As System.Windows.Forms.Label Friend WithEvents SupportsWaypointsLabel As System.Windows.Forms.Label Friend WithEvents BatteryLifeLabel As System.Windows.Forms.Label Friend WithEvents BatteryLife As System.Windows.Forms.Label Friend WithEvents ProtocolLabel As System.Windows.Forms.Label Friend WithEvents Protocol As System.Windows.Forms.Label Friend WithEvents SoftwareVersion As System.Windows.Forms.Label Friend WithEvents SoftwareVersionLabel As System.Windows.Forms.Label Friend WithEvents DeviceName As System.Windows.Forms.Label Friend WithEvents ManufacturerLabel As System.Windows.Forms.Label Friend WithEvents Manufacturer As System.Windows.Forms.Label Friend WithEvents DeviceNameLabel As System.Windows.Forms.Label Friend WithEvents PowerOffButton As System.Windows.Forms.Button Friend WithEvents ErrorTabPage As System.Windows.Forms.TabPage Friend WithEvents GpsExceptionTextBox As System.Windows.Forms.TextBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents ParsingExceptionTextBox As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader3 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader5 As System.Windows.Forms.ColumnHeader Friend WithEvents ColumnHeader4 As System.Windows.Forms.ColumnHeader Friend WithEvents BaudRateComboBox As System.Windows.Forms.ComboBox Friend WithEvents BaudRateLabel As System.Windows.Forms.Label Friend WithEvents ComPortLabel As System.Windows.Forms.Label Friend WithEvents COMPortComboBox As System.Windows.Forms.ComboBox Friend WithEvents StopButton As System.Windows.Forms.Button Friend WithEvents StartButton As System.Windows.Forms.Button Friend WithEvents UtmPosition As System.Windows.Forms.Label Friend WithEvents UtmPositionLabel As System.Windows.Forms.Label Friend WithEvents FixMethod As System.Windows.Forms.Label Friend WithEvents FixMethodLabel As System.Windows.Forms.Label Friend WithEvents TrackedSatellites As System.Windows.Forms.Label Friend WithEvents TrackedSatellitesLabel As System.Windows.Forms.Label Friend WithEvents FixedSatellites As System.Windows.Forms.Label Friend WithEvents ActiveSatellitesLabel As System.Windows.Forms.Label Friend WithEvents MeanDilutionOfPrecision As System.Windows.Forms.Label Friend WithEvents MeanDilutionOfPrecisionLabel As System.Windows.Forms.Label Friend WithEvents VerticalDilutionOfPrecision As System.Windows.Forms.Label Friend WithEvents VerticalDilutionOfPrecisionLabel As System.Windows.Forms.Label Friend WithEvents HorizontalDilutionOfPrecision As System.Windows.Forms.Label Friend WithEvents HorizontalDilutionOfPrecisionLabel As System.Windows.Forms.Label Friend WithEvents FixQuality As System.Windows.Forms.Label Friend WithEvents FixQualityLabel As System.Windows.Forms.Label Friend WithEvents FixObtained As System.Windows.Forms.Label Friend WithEvents FixObtainedLabel As System.Windows.Forms.Label Friend WithEvents FixMode As System.Windows.Forms.Label Friend WithEvents FixModeLabel As System.Windows.Forms.Label Friend WithEvents LocalTime As System.Windows.Forms.Label Friend WithEvents LocalTimeLabel As System.Windows.Forms.Label Friend WithEvents Speed As System.Windows.Forms.Label Friend WithEvents SpeedLabel As System.Windows.Forms.Label Friend WithEvents ActiveSatellites As System.Windows.Forms.Label Friend WithEvents FixedSatellitesLabel As System.Windows.Forms.Label Friend WithEvents UTCDateTime As System.Windows.Forms.Label Friend WithEvents UTCDateTimeLabel As System.Windows.Forms.Label Friend WithEvents Direction As System.Windows.Forms.Label Friend WithEvents DirectionLabel As System.Windows.Forms.Label Friend WithEvents Bearing As System.Windows.Forms.Label Friend WithEvents Altitude As System.Windows.Forms.Label Friend WithEvents Longitude As System.Windows.Forms.Label Friend WithEvents Latitude As System.Windows.Forms.Label Friend WithEvents BearingLabel As System.Windows.Forms.Label Friend WithEvents LongitudeLabel As System.Windows.Forms.Label Friend WithEvents AltitudeLabel As System.Windows.Forms.Label Friend WithEvents LatitudeLabel As System.Windows.Forms.Label Friend WithEvents StatusBar As System.Windows.Forms.StatusBar Friend WithEvents LocalTimeTimer As System.Windows.Forms.Timer Friend WithEvents SatelliteList As System.Windows.Forms.ListView Friend WithEvents SatelliteID As System.Windows.Forms.ColumnHeader Friend WithEvents SatelliteElevation As System.Windows.Forms.ColumnHeader Friend WithEvents SatelliteAzimuth As System.Windows.Forms.ColumnHeader Friend WithEvents SatelliteSignalStrength As System.Windows.Forms.ColumnHeader Private Sub InitializeComponent() Dim ListViewItem1 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem1 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem2 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem3 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem4 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem2 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem5 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem6 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem7 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem8 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem3 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem9 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem10 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem11 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem12 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem4 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem13 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem14 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem15 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem16 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem5 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem17 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem18 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem19 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem20 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem6 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem21 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem22 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem23 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem24 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem7 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem25 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem26 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem27 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem28 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem8 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem29 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem30 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem31 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem32 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem9 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem33 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem34 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem35 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem36 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem10 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem37 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem38 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem39 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem40 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem11 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem41 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem42 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem43 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem44 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem12 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem45 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem46 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem47 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem48 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem13 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem49 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem50 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem51 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem52 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem14 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem53 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem54 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem55 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem56 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem15 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem57 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem58 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem59 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem60 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewItem16 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem Dim ListViewSubItem61 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem62 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem63 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim ListViewSubItem64 As System.Windows.Forms.ListViewItem.ListViewSubItem = New System.Windows.Forms.ListViewItem.ListViewSubItem Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1)) Me.TabControl1 = New System.Windows.Forms.TabControl Me.RawDataTabPage = New System.Windows.Forms.TabPage Me.ParseButton = New System.Windows.Forms.Button Me.Label1 = New System.Windows.Forms.Label Me.ParsingText = New System.Windows.Forms.TextBox Me.RecognizedSentencesLabel = New System.Windows.Forms.Label Me.UnrecognizedSentencesLabel = New System.Windows.Forms.Label Me.UnrecognizedSentences = New System.Windows.Forms.ListBox Me.RecognizedSentences = New System.Windows.Forms.ListBox Me.PositionTabPage = New System.Windows.Forms.TabPage Me.UtmPosition = New System.Windows.Forms.Label Me.UtmPositionLabel = New System.Windows.Forms.Label Me.FixMethod = New System.Windows.Forms.Label Me.FixMethodLabel = New System.Windows.Forms.Label Me.TrackedSatellites = New System.Windows.Forms.Label Me.TrackedSatellitesLabel = New System.Windows.Forms.Label Me.FixedSatellites = New System.Windows.Forms.Label Me.ActiveSatellitesLabel = New System.Windows.Forms.Label Me.MeanDilutionOfPrecision = New System.Windows.Forms.Label Me.MeanDilutionOfPrecisionLabel = New System.Windows.Forms.Label Me.VerticalDilutionOfPrecision = New System.Windows.Forms.Label Me.VerticalDilutionOfPrecisionLabel = New System.Windows.Forms.Label Me.HorizontalDilutionOfPrecision = New System.Windows.Forms.Label Me.HorizontalDilutionOfPrecisionLabel = New System.Windows.Forms.Label Me.FixQuality = New System.Windows.Forms.Label Me.FixQualityLabel = New System.Windows.Forms.Label Me.FixObtained = New System.Windows.Forms.Label Me.FixObtainedLabel = New System.Windows.Forms.Label Me.FixMode = New System.Windows.Forms.Label Me.FixModeLabel = New System.Windows.Forms.Label Me.LocalTime = New System.Windows.Forms.Label Me.LocalTimeLabel = New System.Windows.Forms.Label Me.Speed = New System.Windows.Forms.Label Me.SpeedLabel = New System.Windows.Forms.Label Me.ActiveSatellites = New System.Windows.Forms.Label Me.FixedSatellitesLabel = New System.Windows.Forms.Label Me.UTCDateTime = New System.Windows.Forms.Label Me.UTCDateTimeLabel = New System.Windows.Forms.Label Me.Direction = New System.Windows.Forms.Label Me.DirectionLabel = New System.Windows.Forms.Label Me.Bearing = New System.Windows.Forms.Label Me.Altitude = New System.Windows.Forms.Label Me.Longitude = New System.Windows.Forms.Label Me.Latitude = New System.Windows.Forms.Label Me.BearingLabel = New System.Windows.Forms.Label Me.LongitudeLabel = New System.Windows.Forms.Label Me.AltitudeLabel = New System.Windows.Forms.Label Me.LatitudeLabel = New System.Windows.Forms.Label Me.SatelliteTabPage = New System.Windows.Forms.TabPage Me.SatelliteList = New System.Windows.Forms.ListView Me.SatelliteID = New System.Windows.Forms.ColumnHeader Me.SatelliteElevation = New System.Windows.Forms.ColumnHeader Me.SatelliteAzimuth = New System.Windows.Forms.ColumnHeader Me.SatelliteSignalStrength = New System.Windows.Forms.ColumnHeader Me.ErrorTabPage = New System.Windows.Forms.TabPage Me.GpsExceptionTextBox = New System.Windows.Forms.TextBox Me.Label3 = New System.Windows.Forms.Label Me.ParsingExceptionTextBox = New System.Windows.Forms.TextBox Me.Label2 = New System.Windows.Forms.Label Me.WaypointDisplayModeComboBox = New System.Windows.Forms.ComboBox Me.WaypointColorComboBox = New System.Windows.Forms.ComboBox Me.WaypointSymbolComboBox = New System.Windows.Forms.ComboBox Me.WaypointIntersectingRoadCheckbox = New System.Windows.Forms.CheckBox Me.WaypointCountryCheckbox = New System.Windows.Forms.CheckBox Me.WaypointDepthCheckbox = New System.Windows.Forms.CheckBox Me.WaypointFacilityNameCheckbox = New System.Windows.Forms.CheckBox Me.WaypointCityCheckbox = New System.Windows.Forms.CheckBox Me.WaypointStateCheckbox = New System.Windows.Forms.CheckBox Me.WaypointAddressCheckbox = New System.Windows.Forms.CheckBox Me.WaypointAltitudeCheckbox = New System.Windows.Forms.CheckBox Me.WaypointDisplayModeCheckbox = New System.Windows.Forms.CheckBox Me.WaypointSymbolCheckbox = New System.Windows.Forms.CheckBox Me.WaypointColorCheckbox = New System.Windows.Forms.CheckBox Me.WaypointCommentCheckbox = New System.Windows.Forms.CheckBox Me.SupportsRoutes = New System.Windows.Forms.Label Me.SupportsTracks = New System.Windows.Forms.Label Me.SupportsWaypoints = New System.Windows.Forms.Label Me.SupportsRoutesLabel = New System.Windows.Forms.Label Me.SupportsTracksLabel = New System.Windows.Forms.Label Me.SupportsWaypointsLabel = New System.Windows.Forms.Label Me.BatteryLifeLabel = New System.Windows.Forms.Label Me.BatteryLife = New System.Windows.Forms.Label Me.ProtocolLabel = New System.Windows.Forms.Label Me.Protocol = New System.Windows.Forms.Label Me.SoftwareVersion = New System.Windows.Forms.Label Me.SoftwareVersionLabel = New System.Windows.Forms.Label Me.DeviceName = New System.Windows.Forms.Label Me.ManufacturerLabel = New System.Windows.Forms.Label Me.Manufacturer = New System.Windows.Forms.Label Me.DeviceNameLabel = New System.Windows.Forms.Label Me.PowerOffButton = New System.Windows.Forms.Button Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader Me.ColumnHeader3 = New System.Windows.Forms.ColumnHeader Me.ColumnHeader5 = New System.Windows.Forms.ColumnHeader Me.ColumnHeader4 = New System.Windows.Forms.ColumnHeader Me.BaudRateComboBox = New System.Windows.Forms.ComboBox Me.BaudRateLabel = New System.Windows.Forms.Label Me.ComPortLabel = New System.Windows.Forms.Label Me.COMPortComboBox = New System.Windows.Forms.ComboBox Me.StopButton = New System.Windows.Forms.Button Me.StartButton = New System.Windows.Forms.Button Me.StatusBar = New System.Windows.Forms.StatusBar Me.LocalTimeTimer = New System.Windows.Forms.Timer ' 'TabControl1 ' Me.TabControl1.Controls.Add(Me.RawDataTabPage) Me.TabControl1.Controls.Add(Me.PositionTabPage) Me.TabControl1.Controls.Add(Me.SatelliteTabPage) Me.TabControl1.Controls.Add(Me.ErrorTabPage) Me.TabControl1.Location = New System.Drawing.Point(6, 9) Me.TabControl1.SelectedIndex = 0 Me.TabControl1.Size = New System.Drawing.Size(543, 381) ' 'RawDataTabPage ' Me.RawDataTabPage.BackColor = System.Drawing.SystemColors.Window Me.RawDataTabPage.Controls.Add(Me.ParseButton) Me.RawDataTabPage.Controls.Add(Me.Label1) Me.RawDataTabPage.Controls.Add(Me.ParsingText) Me.RawDataTabPage.Controls.Add(Me.RecognizedSentencesLabel) Me.RawDataTabPage.Controls.Add(Me.UnrecognizedSentencesLabel) Me.RawDataTabPage.Controls.Add(Me.UnrecognizedSentences) Me.RawDataTabPage.Controls.Add(Me.RecognizedSentences) Me.RawDataTabPage.Location = New System.Drawing.Point(4, 22) Me.RawDataTabPage.Size = New System.Drawing.Size(535, 355) Me.RawDataTabPage.Text = "Raw Data" ' 'ParseButton ' Me.ParseButton.Location = New System.Drawing.Point(453, 204) Me.ParseButton.Size = New System.Drawing.Size(72, 24) Me.ParseButton.Text = "Parse" ' 'Label1 ' Me.Label1.Location = New System.Drawing.Point(9, 186) Me.Label1.Size = New System.Drawing.Size(92, 15) Me.Label1.Text = "Manual parsing:" ' 'ParsingText ' Me.ParsingText.AcceptsReturn = True Me.ParsingText.Location = New System.Drawing.Point(6, 204) Me.ParsingText.Multiline = True Me.ParsingText.ScrollBars = System.Windows.Forms.ScrollBars.Vertical Me.ParsingText.Size = New System.Drawing.Size(441, 57) Me.ParsingText.Text = "" ' 'RecognizedSentencesLabel ' Me.RecognizedSentencesLabel.Location = New System.Drawing.Point(6, 6) Me.RecognizedSentencesLabel.Size = New System.Drawing.Size(141, 15) Me.RecognizedSentencesLabel.Text = "All Recognized Sentences:" ' 'UnrecognizedSentencesLabel ' Me.UnrecognizedSentencesLabel.Location = New System.Drawing.Point(9, 267) Me.UnrecognizedSentencesLabel.Size = New System.Drawing.Size(142, 15) Me.UnrecognizedSentencesLabel.Text = "Unrecognized Sentences:" ' 'UnrecognizedSentences ' Me.UnrecognizedSentences.Location = New System.Drawing.Point(9, 285) Me.UnrecognizedSentences.Size = New System.Drawing.Size(519, 58) ' 'RecognizedSentences ' Me.RecognizedSentences.Location = New System.Drawing.Point(6, 24) Me.RecognizedSentences.Size = New System.Drawing.Size(519, 156) ' 'PositionTabPage ' Me.PositionTabPage.BackColor = System.Drawing.SystemColors.Window Me.PositionTabPage.Controls.Add(Me.UtmPosition) Me.PositionTabPage.Controls.Add(Me.UtmPositionLabel) Me.PositionTabPage.Controls.Add(Me.FixMethod) Me.PositionTabPage.Controls.Add(Me.FixMethodLabel) Me.PositionTabPage.Controls.Add(Me.TrackedSatellites) Me.PositionTabPage.Controls.Add(Me.TrackedSatellitesLabel) Me.PositionTabPage.Controls.Add(Me.FixedSatellites) Me.PositionTabPage.Controls.Add(Me.ActiveSatellitesLabel) Me.PositionTabPage.Controls.Add(Me.MeanDilutionOfPrecision) Me.PositionTabPage.Controls.Add(Me.MeanDilutionOfPrecisionLabel) Me.PositionTabPage.Controls.Add(Me.VerticalDilutionOfPrecision) Me.PositionTabPage.Controls.Add(Me.VerticalDilutionOfPrecisionLabel) Me.PositionTabPage.Controls.Add(Me.HorizontalDilutionOfPrecision) Me.PositionTabPage.Controls.Add(Me.HorizontalDilutionOfPrecisionLabel) Me.PositionTabPage.Controls.Add(Me.FixQuality) Me.PositionTabPage.Controls.Add(Me.FixQualityLabel) Me.PositionTabPage.Controls.Add(Me.FixObtained) Me.PositionTabPage.Controls.Add(Me.FixObtainedLabel) Me.PositionTabPage.Controls.Add(Me.FixMode) Me.PositionTabPage.Controls.Add(Me.FixModeLabel) Me.PositionTabPage.Controls.Add(Me.LocalTime) Me.PositionTabPage.Controls.Add(Me.LocalTimeLabel) Me.PositionTabPage.Controls.Add(Me.Speed) Me.PositionTabPage.Controls.Add(Me.SpeedLabel) Me.PositionTabPage.Controls.Add(Me.ActiveSatellites) Me.PositionTabPage.Controls.Add(Me.FixedSatellitesLabel) Me.PositionTabPage.Controls.Add(Me.UTCDateTime) Me.PositionTabPage.Controls.Add(Me.UTCDateTimeLabel) Me.PositionTabPage.Controls.Add(Me.Direction) Me.PositionTabPage.Controls.Add(Me.DirectionLabel) Me.PositionTabPage.Controls.Add(Me.Bearing) Me.PositionTabPage.Controls.Add(Me.Altitude) Me.PositionTabPage.Controls.Add(Me.Longitude) Me.PositionTabPage.Controls.Add(Me.Latitude) Me.PositionTabPage.Controls.Add(Me.BearingLabel) Me.PositionTabPage.Controls.Add(Me.LongitudeLabel) Me.PositionTabPage.Controls.Add(Me.AltitudeLabel) Me.PositionTabPage.Controls.Add(Me.LatitudeLabel) Me.PositionTabPage.Location = New System.Drawing.Point(4, 22) Me.PositionTabPage.Size = New System.Drawing.Size(535, 355) Me.PositionTabPage.Text = "Position" ' 'UtmPosition ' Me.UtmPosition.Location = New System.Drawing.Point(123, 201) Me.UtmPosition.Size = New System.Drawing.Size(249, 18) Me.UtmPosition.Text = "(Unknown)" ' 'UtmPositionLabel ' Me.UtmPositionLabel.Location = New System.Drawing.Point(9, 201) Me.UtmPositionLabel.Size = New System.Drawing.Size(108, 18) Me.UtmPositionLabel.Text = "UTM Position:" ' 'FixMethod ' Me.FixMethod.Location = New System.Drawing.Point(123, 111) Me.FixMethod.Size = New System.Drawing.Size(249, 18) Me.FixMethod.Text = "(Unknown)" ' 'FixMethodLabel ' Me.FixMethodLabel.Location = New System.Drawing.Point(9, 111) Me.FixMethodLabel.Size = New System.Drawing.Size(108, 18) Me.FixMethodLabel.Text = "Fix Method:" ' 'TrackedSatellites ' Me.TrackedSatellites.Location = New System.Drawing.Point(123, 39) Me.TrackedSatellites.Size = New System.Drawing.Size(249, 18) Me.TrackedSatellites.Text = "(Unknown)" ' 'TrackedSatellitesLabel ' Me.TrackedSatellitesLabel.Location = New System.Drawing.Point(9, 39) Me.TrackedSatellitesLabel.Size = New System.Drawing.Size(108, 18) Me.TrackedSatellitesLabel.Text = "Tracked Sat.:" ' 'FixedSatellites ' Me.FixedSatellites.Location = New System.Drawing.Point(123, 21) Me.FixedSatellites.Size = New System.Drawing.Size(249, 18) Me.FixedSatellites.Text = "(Unknown)" ' 'ActiveSatellitesLabel ' Me.ActiveSatellitesLabel.Location = New System.Drawing.Point(9, 3) Me.ActiveSatellitesLabel.Size = New System.Drawing.Size(108, 18) Me.ActiveSatellitesLabel.Text = "Active Satellites:" ' 'MeanDilutionOfPrecision ' Me.MeanDilutionOfPrecision.Location = New System.Drawing.Point(123, 291) Me.MeanDilutionOfPrecision.Size = New System.Drawing.Size(249, 18) Me.MeanDilutionOfPrecision.Text = "(Unknown)" ' 'MeanDilutionOfPrecisionLabel ' Me.MeanDilutionOfPrecisionLabel.Location = New System.Drawing.Point(9, 291) Me.MeanDilutionOfPrecisionLabel.Size = New System.Drawing.Size(108, 18) Me.MeanDilutionOfPrecisionLabel.Text = "PDOP:" ' 'VerticalDilutionOfPrecision ' Me.VerticalDilutionOfPrecision.Location = New System.Drawing.Point(123, 327) Me.VerticalDilutionOfPrecision.Size = New System.Drawing.Size(249, 18) Me.VerticalDilutionOfPrecision.Text = "(Unknown)" ' 'VerticalDilutionOfPrecisionLabel ' Me.VerticalDilutionOfPrecisionLabel.Location = New System.Drawing.Point(9, 327) Me.VerticalDilutionOfPrecisionLabel.Size = New System.Drawing.Size(108, 18) Me.VerticalDilutionOfPrecisionLabel.Text = "VDOP:" ' 'HorizontalDilutionOfPrecision ' Me.HorizontalDilutionOfPrecision.Location = New System.Drawing.Point(123, 309) Me.HorizontalDilutionOfPrecision.Size = New System.Drawing.Size(249, 18) Me.HorizontalDilutionOfPrecision.Text = "(Unknown)" ' 'HorizontalDilutionOfPrecisionLabel ' Me.HorizontalDilutionOfPrecisionLabel.Location = New System.Drawing.Point(9, 309) Me.HorizontalDilutionOfPrecisionLabel.Size = New System.Drawing.Size(108, 18) Me.HorizontalDilutionOfPrecisionLabel.Text = "HDOP:" ' 'FixQuality ' Me.FixQuality.Location = New System.Drawing.Point(123, 129) Me.FixQuality.Size = New System.Drawing.Size(249, 18) Me.FixQuality.Text = "(Unknown)" ' 'FixQualityLabel ' Me.FixQualityLabel.Location = New System.Drawing.Point(9, 129) Me.FixQualityLabel.Size = New System.Drawing.Size(108, 18) Me.FixQualityLabel.Text = "Fix Quality:" ' 'FixObtained ' Me.FixObtained.Location = New System.Drawing.Point(123, 147) Me.FixObtained.Size = New System.Drawing.Size(249, 18) Me.FixObtained.Text = "(Unknown)" ' 'FixObtainedLabel ' Me.FixObtainedLabel.Location = New System.Drawing.Point(9, 147) Me.FixObtainedLabel.Size = New System.Drawing.Size(108, 18) Me.FixObtainedLabel.Text = "Fix Obtained:" ' 'FixMode ' Me.FixMode.Location = New System.Drawing.Point(123, 93) Me.FixMode.Size = New System.Drawing.Size(249, 18) Me.FixMode.Text = "(Unknown)" ' 'FixModeLabel ' Me.FixModeLabel.Location = New System.Drawing.Point(9, 93) Me.FixModeLabel.Size = New System.Drawing.Size(108, 18) Me.FixModeLabel.Text = "Fix Mode:" ' 'LocalTime ' Me.LocalTime.Location = New System.Drawing.Point(123, 75) Me.LocalTime.Size = New System.Drawing.Size(249, 18) Me.LocalTime.Text = "(Unknown)" ' 'LocalTimeLabel ' Me.LocalTimeLabel.Location = New System.Drawing.Point(9, 75) Me.LocalTimeLabel.Size = New System.Drawing.Size(108, 18) Me.LocalTimeLabel.Text = "Local Time:" ' 'Speed ' Me.Speed.Location = New System.Drawing.Point(123, 237) Me.Speed.Size = New System.Drawing.Size(249, 18) Me.Speed.Text = "(Unknown)" ' 'SpeedLabel ' Me.SpeedLabel.Location = New System.Drawing.Point(9, 237) Me.SpeedLabel.Size = New System.Drawing.Size(108, 18) Me.SpeedLabel.Text = "Speed:" ' 'ActiveSatellites ' Me.ActiveSatellites.Location = New System.Drawing.Point(123, 3) Me.ActiveSatellites.Size = New System.Drawing.Size(249, 18) Me.ActiveSatellites.Text = "(Unknown)" ' 'FixedSatellitesLabel ' Me.FixedSatellitesLabel.Location = New System.Drawing.Point(9, 21) Me.FixedSatellitesLabel.Size = New System.Drawing.Size(108, 18) Me.FixedSatellitesLabel.Text = "Fixed Satellites:" ' 'UTCDateTime ' Me.UTCDateTime.Location = New System.Drawing.Point(123, 57) Me.UTCDateTime.Size = New System.Drawing.Size(249, 18) Me.UTCDateTime.Text = "(Unknown)" ' 'UTCDateTimeLabel ' Me.UTCDateTimeLabel.Location = New System.Drawing.Point(9, 57) Me.UTCDateTimeLabel.Size = New System.Drawing.Size(108, 18) Me.UTCDateTimeLabel.Text = "GPS Time:" ' 'Direction ' Me.Direction.Location = New System.Drawing.Point(123, 273) Me.Direction.Size = New System.Drawing.Size(249, 18) Me.Direction.Text = "(Unknown)" ' 'DirectionLabel ' Me.DirectionLabel.Location = New System.Drawing.Point(9, 273) Me.DirectionLabel.Size = New System.Drawing.Size(108, 18) Me.DirectionLabel.Text = "Direction:" ' 'Bearing ' Me.Bearing.Location = New System.Drawing.Point(123, 255) Me.Bearing.Size = New System.Drawing.Size(249, 18) Me.Bearing.Text = "(Unknown)" ' 'Altitude ' Me.Altitude.Location = New System.Drawing.Point(123, 219) Me.Altitude.Size = New System.Drawing.Size(249, 18) Me.Altitude.Text = "(Unknown)" ' 'Longitude ' Me.Longitude.Location = New System.Drawing.Point(123, 183) Me.Longitude.Size = New System.Drawing.Size(249, 18) Me.Longitude.Text = "(Unknown)" ' 'Latitude ' Me.Latitude.Location = New System.Drawing.Point(123, 165) Me.Latitude.Size = New System.Drawing.Size(249, 18) Me.Latitude.Text = "(Unknown)" ' 'BearingLabel ' Me.BearingLabel.Location = New System.Drawing.Point(9, 255) Me.BearingLabel.Size = New System.Drawing.Size(108, 18) Me.BearingLabel.Text = "Bearing:" ' 'LongitudeLabel ' Me.LongitudeLabel.Location = New System.Drawing.Point(9, 183) Me.LongitudeLabel.Size = New System.Drawing.Size(108, 18) Me.LongitudeLabel.Text = "Longitude:" ' 'AltitudeLabel ' Me.AltitudeLabel.Location = New System.Drawing.Point(9, 219) Me.AltitudeLabel.Size = New System.Drawing.Size(108, 18) Me.AltitudeLabel.Text = "Altitude:" ' 'LatitudeLabel ' Me.LatitudeLabel.Location = New System.Drawing.Point(9, 165) Me.LatitudeLabel.Size = New System.Drawing.Size(108, 18) Me.LatitudeLabel.Text = "Latitude:" ' 'SatelliteTabPage ' Me.SatelliteTabPage.BackColor = System.Drawing.SystemColors.Window Me.SatelliteTabPage.Controls.Add(Me.SatelliteList) Me.SatelliteTabPage.Location = New System.Drawing.Point(4, 22) Me.SatelliteTabPage.Size = New System.Drawing.Size(535, 355) Me.SatelliteTabPage.Text = "Satellites" ' 'SatelliteList ' Me.SatelliteList.CheckBoxes = True Me.SatelliteList.Columns.Add(Me.SatelliteID) Me.SatelliteList.Columns.Add(Me.SatelliteElevation) Me.SatelliteList.Columns.Add(Me.SatelliteAzimuth) Me.SatelliteList.Columns.Add(Me.SatelliteSignalStrength) ListViewSubItem1.Text = "" ListViewSubItem2.Text = "" ListViewSubItem3.Text = "" ListViewSubItem4.Text = "" ListViewItem1.SubItems.Add(ListViewSubItem1) ListViewItem1.SubItems.Add(ListViewSubItem2) ListViewItem1.SubItems.Add(ListViewSubItem3) ListViewItem1.SubItems.Add(ListViewSubItem4) ListViewItem1.Text = "" ListViewSubItem5.Text = "" ListViewSubItem6.Text = "" ListViewSubItem7.Text = "" ListViewSubItem8.Text = "" ListViewItem2.SubItems.Add(ListViewSubItem5) ListViewItem2.SubItems.Add(ListViewSubItem6) ListViewItem2.SubItems.Add(ListViewSubItem7) ListViewItem2.SubItems.Add(ListViewSubItem8) ListViewItem2.Text = "" ListViewSubItem9.Text = "" ListViewSubItem10.Text = "" ListViewSubItem11.Text = "" ListViewSubItem12.Text = "" ListViewItem3.SubItems.Add(ListViewSubItem9) ListViewItem3.SubItems.Add(ListViewSubItem10) ListViewItem3.SubItems.Add(ListViewSubItem11) ListViewItem3.SubItems.Add(ListViewSubItem12) ListViewItem3.Text = "" ListViewSubItem13.Text = "" ListViewSubItem14.Text = "" ListViewSubItem15.Text = "" ListViewSubItem16.Text = "" ListViewItem4.SubItems.Add(ListViewSubItem13) ListViewItem4.SubItems.Add(ListViewSubItem14) ListViewItem4.SubItems.Add(ListViewSubItem15) ListViewItem4.SubItems.Add(ListViewSubItem16) ListViewItem4.Text = "" ListViewSubItem17.Text = "" ListViewSubItem18.Text = "" ListViewSubItem19.Text = "" ListViewSubItem20.Text = "" ListViewItem5.SubItems.Add(ListViewSubItem17) ListViewItem5.SubItems.Add(ListViewSubItem18) ListViewItem5.SubItems.Add(ListViewSubItem19) ListViewItem5.SubItems.Add(ListViewSubItem20) ListViewItem5.Text = "" ListViewSubItem21.Text = "" ListViewSubItem22.Text = "" ListViewSubItem23.Text = "" ListViewSubItem24.Text = "" ListViewItem6.SubItems.Add(ListViewSubItem21) ListViewItem6.SubItems.Add(ListViewSubItem22) ListViewItem6.SubItems.Add(ListViewSubItem23) ListViewItem6.SubItems.Add(ListViewSubItem24) ListViewItem6.Text = "" ListViewSubItem25.Text = "" ListViewSubItem26.Text = "" ListViewSubItem27.Text = "" ListViewSubItem28.Text = "" ListViewItem7.SubItems.Add(ListViewSubItem25) ListViewItem7.SubItems.Add(ListViewSubItem26) ListViewItem7.SubItems.Add(ListViewSubItem27) ListViewItem7.SubItems.Add(ListViewSubItem28) ListViewItem7.Text = "" ListViewSubItem29.Text = "" ListViewSubItem30.Text = "" ListViewSubItem31.Text = "" ListViewSubItem32.Text = "" ListViewItem8.SubItems.Add(ListViewSubItem29) ListViewItem8.SubItems.Add(ListViewSubItem30) ListViewItem8.SubItems.Add(ListViewSubItem31) ListViewItem8.SubItems.Add(ListViewSubItem32) ListViewItem8.Text = "" ListViewSubItem33.Text = "" ListViewSubItem34.Text = "" ListViewSubItem35.Text = "" ListViewSubItem36.Text = "" ListViewItem9.SubItems.Add(ListViewSubItem33) ListViewItem9.SubItems.Add(ListViewSubItem34) ListViewItem9.SubItems.Add(ListViewSubItem35) ListViewItem9.SubItems.Add(ListViewSubItem36) ListViewItem9.Text = "" ListViewSubItem37.Text = "" ListViewSubItem38.Text = "" ListViewSubItem39.Text = "" ListViewSubItem40.Text = "" ListViewItem10.SubItems.Add(ListViewSubItem37) ListViewItem10.SubItems.Add(ListViewSubItem38) ListViewItem10.SubItems.Add(ListViewSubItem39) ListViewItem10.SubItems.Add(ListViewSubItem40) ListViewItem10.Text = "" ListViewSubItem41.Text = "" ListViewSubItem42.Text = "" ListViewSubItem43.Text = "" ListViewSubItem44.Text = "" ListViewItem11.SubItems.Add(ListViewSubItem41) ListViewItem11.SubItems.Add(ListViewSubItem42) ListViewItem11.SubItems.Add(ListViewSubItem43) ListViewItem11.SubItems.Add(ListViewSubItem44) ListViewItem11.Text = "" ListViewSubItem45.Text = "" ListViewSubItem46.Text = "" ListViewSubItem47.Text = "" ListViewSubItem48.Text = "" ListViewItem12.SubItems.Add(ListViewSubItem45) ListViewItem12.SubItems.Add(ListViewSubItem46) ListViewItem12.SubItems.Add(ListViewSubItem47) ListViewItem12.SubItems.Add(ListViewSubItem48) ListViewItem12.Text = "" ListViewSubItem49.Text = "" ListViewSubItem50.Text = "" ListViewSubItem51.Text = "" ListViewSubItem52.Text = "" ListViewItem13.SubItems.Add(ListViewSubItem49) ListViewItem13.SubItems.Add(ListViewSubItem50) ListViewItem13.SubItems.Add(ListViewSubItem51) ListViewItem13.SubItems.Add(ListViewSubItem52) ListViewItem13.Text = "" ListViewSubItem53.Text = "" ListViewSubItem54.Text = "" ListViewSubItem55.Text = "" ListViewSubItem56.Text = "" ListViewItem14.SubItems.Add(ListViewSubItem53) ListViewItem14.SubItems.Add(ListViewSubItem54) ListViewItem14.SubItems.Add(ListViewSubItem55) ListViewItem14.SubItems.Add(ListViewSubItem56) ListViewItem14.Text = "" ListViewSubItem57.Text = "" ListViewSubItem58.Text = "" ListViewSubItem59.Text = "" ListViewSubItem60.Text = "" ListViewItem15.SubItems.Add(ListViewSubItem57) ListViewItem15.SubItems.Add(ListViewSubItem58) ListViewItem15.SubItems.Add(ListViewSubItem59) ListViewItem15.SubItems.Add(ListViewSubItem60) ListViewItem15.Text = "" ListViewSubItem61.Text = "" ListViewSubItem62.Text = "" ListViewSubItem63.Text = "" ListViewSubItem64.Text = "" ListViewItem16.SubItems.Add(ListViewSubItem61) ListViewItem16.SubItems.Add(ListViewSubItem62) ListViewItem16.SubItems.Add(ListViewSubItem63) ListViewItem16.SubItems.Add(ListViewSubItem64) ListViewItem16.Text = "" Me.SatelliteList.Items.Add(ListViewItem1) Me.SatelliteList.Items.Add(ListViewItem2) Me.SatelliteList.Items.Add(ListViewItem3) Me.SatelliteList.Items.Add(ListViewItem4) Me.SatelliteList.Items.Add(ListViewItem5) Me.SatelliteList.Items.Add(ListViewItem6) Me.SatelliteList.Items.Add(ListViewItem7) Me.SatelliteList.Items.Add(ListViewItem8) Me.SatelliteList.Items.Add(ListViewItem9) Me.SatelliteList.Items.Add(ListViewItem10) Me.SatelliteList.Items.Add(ListViewItem11) Me.SatelliteList.Items.Add(ListViewItem12) Me.SatelliteList.Items.Add(ListViewItem13) Me.SatelliteList.Items.Add(ListViewItem14) Me.SatelliteList.Items.Add(ListViewItem15) Me.SatelliteList.Items.Add(ListViewItem16) Me.SatelliteList.Location = New System.Drawing.Point(6, 6) Me.SatelliteList.Size = New System.Drawing.Size(525, 336) Me.SatelliteList.View = System.Windows.Forms.View.Details ' 'SatelliteID ' Me.SatelliteID.Text = "Prc" Me.SatelliteID.Width = 73 ' 'SatelliteElevation ' Me.SatelliteElevation.Text = "Elevation" Me.SatelliteElevation.Width = 104 ' 'SatelliteAzimuth ' Me.SatelliteAzimuth.Text = "Azimuth" Me.SatelliteAzimuth.Width = 131 ' 'SatelliteSignalStrength ' Me.SatelliteSignalStrength.Text = "Signal Strength" Me.SatelliteSignalStrength.Width = 106 ' 'ErrorTabPage ' Me.ErrorTabPage.BackColor = System.Drawing.SystemColors.Window Me.ErrorTabPage.Controls.Add(Me.GpsExceptionTextBox) Me.ErrorTabPage.Controls.Add(Me.Label3) Me.ErrorTabPage.Controls.Add(Me.ParsingExceptionTextBox) Me.ErrorTabPage.Controls.Add(Me.Label2) Me.ErrorTabPage.Location = New System.Drawing.Point(4, 22) Me.ErrorTabPage.Size = New System.Drawing.Size(535, 355) Me.ErrorTabPage.Text = "Errors" ' 'GpsExceptionTextBox ' Me.GpsExceptionTextBox.Location = New System.Drawing.Point(7, 27) Me.GpsExceptionTextBox.Multiline = True Me.GpsExceptionTextBox.ReadOnly = True Me.GpsExceptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical Me.GpsExceptionTextBox.Size = New System.Drawing.Size(521, 171) Me.GpsExceptionTextBox.Text = "" ' 'Label3 ' Me.Label3.Location = New System.Drawing.Point(7, 9) Me.Label3.Size = New System.Drawing.Size(188, 15) Me.Label3.Text = "Unexpected exceptions:" ' 'ParsingExceptionTextBox ' Me.ParsingExceptionTextBox.Location = New System.Drawing.Point(6, 222) Me.ParsingExceptionTextBox.Multiline = True Me.ParsingExceptionTextBox.ReadOnly = True Me.ParsingExceptionTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical Me.ParsingExceptionTextBox.Size = New System.Drawing.Size(519, 123) Me.ParsingExceptionTextBox.Text = "" ' 'Label2 ' Me.Label2.Location = New System.Drawing.Point(9, 204) Me.Label2.Size = New System.Drawing.Size(171, 15) Me.Label2.Text = "Recoverable parsing warnings:" ' 'WaypointDisplayModeComboBox ' Me.WaypointDisplayModeComboBox.Enabled = False Me.WaypointDisplayModeComboBox.Location = New System.Drawing.Point(33, 180) Me.WaypointDisplayModeComboBox.Size = New System.Drawing.Size(141, 22) ' 'WaypointColorComboBox ' Me.WaypointColorComboBox.Enabled = False Me.WaypointColorComboBox.Location = New System.Drawing.Point(33, 129) Me.WaypointColorComboBox.Size = New System.Drawing.Size(141, 22) ' 'WaypointSymbolComboBox ' Me.WaypointSymbolComboBox.Enabled = False Me.WaypointSymbolComboBox.Location = New System.Drawing.Point(33, 78) Me.WaypointSymbolComboBox.Size = New System.Drawing.Size(141, 22) ' 'WaypointIntersectingRoadCheckbox ' Me.WaypointIntersectingRoadCheckbox.AutoCheck = False Me.WaypointIntersectingRoadCheckbox.Enabled = False Me.WaypointIntersectingRoadCheckbox.Location = New System.Drawing.Point(201, 198) Me.WaypointIntersectingRoadCheckbox.Size = New System.Drawing.Size(147, 21) Me.WaypointIntersectingRoadCheckbox.Text = "Intersecting Road" ' 'WaypointCountryCheckbox ' Me.WaypointCountryCheckbox.AutoCheck = False Me.WaypointCountryCheckbox.Enabled = False Me.WaypointCountryCheckbox.Location = New System.Drawing.Point(201, 174) Me.WaypointCountryCheckbox.Size = New System.Drawing.Size(147, 21) Me.WaypointCountryCheckbox.Text = "Country" ' 'WaypointDepthCheckbox ' Me.WaypointDepthCheckbox.AutoCheck = False Me.WaypointDepthCheckbox.Enabled = False Me.WaypointDepthCheckbox.Location = New System.Drawing.Point(201, 54) Me.WaypointDepthCheckbox.Size = New System.Drawing.Size(147, 21) Me.WaypointDepthCheckbox.Text = "Depth" ' 'WaypointFacilityNameCheckbox ' Me.WaypointFacilityNameCheckbox.AutoCheck = False Me.WaypointFacilityNameCheckbox.Enabled = False Me.WaypointFacilityNameCheckbox.Location = New System.Drawing.Point(201, 102) Me.WaypointFacilityNameCheckbox.Size = New System.Drawing.Size(147, 21) Me.WaypointFacilityNameCheckbox.Text = "Facility name" ' 'WaypointCityCheckbox ' Me.WaypointCityCheckbox.AutoCheck = False Me.WaypointCityCheckbox.Enabled = False Me.WaypointCityCheckbox.Location = New System.Drawing.Point(201, 126) Me.WaypointCityCheckbox.Size = New System.Drawing.Size(147, 21) Me.WaypointCityCheckbox.Text = "City" ' 'WaypointStateCheckbox ' Me.WaypointStateCheckbox.AutoCheck = False Me.WaypointStateCheckbox.Enabled = False Me.WaypointStateCheckbox.Location = New System.Drawing.Point(201, 150) Me.WaypointStateCheckbox.Size = New System.Drawing.Size(147, 21) Me.WaypointStateCheckbox.Text = "State" ' 'WaypointAddressCheckbox ' Me.WaypointAddressCheckbox.AutoCheck = False Me.WaypointAddressCheckbox.Enabled = False Me.WaypointAddressCheckbox.Location = New System.Drawing.Point(201, 78) Me.WaypointAddressCheckbox.Size = New System.Drawing.Size(147, 21) Me.WaypointAddressCheckbox.Text = "Address" ' 'WaypointAltitudeCheckbox ' Me.WaypointAltitudeCheckbox.AutoCheck = False Me.WaypointAltitudeCheckbox.Enabled = False Me.WaypointAltitudeCheckbox.Location = New System.Drawing.Point(201, 30) Me.WaypointAltitudeCheckbox.Size = New System.Drawing.Size(147, 21) Me.WaypointAltitudeCheckbox.Text = "Altitude" ' 'WaypointDisplayModeCheckbox ' Me.WaypointDisplayModeCheckbox.AutoCheck = False Me.WaypointDisplayModeCheckbox.Enabled = False Me.WaypointDisplayModeCheckbox.Location = New System.Drawing.Point(15, 159) Me.WaypointDisplayModeCheckbox.Size = New System.Drawing.Size(150, 21) Me.WaypointDisplayModeCheckbox.Text = "Display Modes (See list):" ' 'WaypointSymbolCheckbox ' Me.WaypointSymbolCheckbox.AutoCheck = False Me.WaypointSymbolCheckbox.Enabled = False Me.WaypointSymbolCheckbox.Location = New System.Drawing.Point(15, 54) Me.WaypointSymbolCheckbox.Size = New System.Drawing.Size(126, 21) Me.WaypointSymbolCheckbox.Text = "Symbols (See list):" ' 'WaypointColorCheckbox ' Me.WaypointColorCheckbox.AutoCheck = False Me.WaypointColorCheckbox.Enabled = False Me.WaypointColorCheckbox.Location = New System.Drawing.Point(15, 108) Me.WaypointColorCheckbox.Size = New System.Drawing.Size(126, 21) Me.WaypointColorCheckbox.Text = "Colors (See list):" ' 'WaypointCommentCheckbox ' Me.WaypointCommentCheckbox.AutoCheck = False Me.WaypointCommentCheckbox.Enabled = False Me.WaypointCommentCheckbox.Location = New System.Drawing.Point(15, 30) Me.WaypointCommentCheckbox.Size = New System.Drawing.Size(126, 21) Me.WaypointCommentCheckbox.Text = "Comment" ' 'SupportsRoutes ' Me.SupportsRoutes.Location = New System.Drawing.Point(135, 195) Me.SupportsRoutes.Size = New System.Drawing.Size(159, 18) Me.SupportsRoutes.Text = "(Unknown)" ' 'SupportsTracks ' Me.SupportsTracks.Location = New System.Drawing.Point(135, 171) Me.SupportsTracks.Size = New System.Drawing.Size(159, 18) Me.SupportsTracks.Text = "(Unknown)" ' 'SupportsWaypoints ' Me.SupportsWaypoints.Location = New System.Drawing.Point(135, 147) Me.SupportsWaypoints.Size = New System.Drawing.Size(159, 18) Me.SupportsWaypoints.Text = "(Unknown)" ' 'SupportsRoutesLabel ' Me.SupportsRoutesLabel.Location = New System.Drawing.Point(15, 195) Me.SupportsRoutesLabel.Size = New System.Drawing.Size(114, 18) Me.SupportsRoutesLabel.Text = "Supports Routes?" ' 'SupportsTracksLabel ' Me.SupportsTracksLabel.Location = New System.Drawing.Point(15, 171) Me.SupportsTracksLabel.Size = New System.Drawing.Size(114, 18) Me.SupportsTracksLabel.Text = "Supports Tracks?" ' 'SupportsWaypointsLabel ' Me.SupportsWaypointsLabel.Location = New System.Drawing.Point(15, 147) Me.SupportsWaypointsLabel.Size = New System.Drawing.Size(114, 18) Me.SupportsWaypointsLabel.Text = "Supports Waypoints?" ' 'BatteryLifeLabel ' Me.BatteryLifeLabel.Location = New System.Drawing.Point(15, 123) Me.BatteryLifeLabel.Size = New System.Drawing.Size(114, 18) Me.BatteryLifeLabel.Text = "Battery Life:" ' 'BatteryLife ' Me.BatteryLife.Location = New System.Drawing.Point(135, 123) Me.BatteryLife.Size = New System.Drawing.Size(159, 18) Me.BatteryLife.Text = "(Unknown)" ' 'ProtocolLabel ' Me.ProtocolLabel.Location = New System.Drawing.Point(15, 99) Me.ProtocolLabel.Size = New System.Drawing.Size(114, 18) Me.ProtocolLabel.Text = "Protocol:" ' 'Protocol ' Me.Protocol.Location = New System.Drawing.Point(135, 99) Me.Protocol.Size = New System.Drawing.Size(237, 18) Me.Protocol.Text = "(Unknown)" ' 'SoftwareVersion ' Me.SoftwareVersion.Location = New System.Drawing.Point(135, 75) Me.SoftwareVersion.Size = New System.Drawing.Size(237, 18) Me.SoftwareVersion.Text = "(Unknown)" ' 'SoftwareVersionLabel ' Me.SoftwareVersionLabel.Location = New System.Drawing.Point(15, 75) Me.SoftwareVersionLabel.Size = New System.Drawing.Size(114, 18) Me.SoftwareVersionLabel.Text = "Software Version:" ' 'DeviceName ' Me.DeviceName.Location = New System.Drawing.Point(135, 27) Me.DeviceName.Size = New System.Drawing.Size(237, 18) Me.DeviceName.Text = "(Unknown)" ' 'ManufacturerLabel ' Me.ManufacturerLabel.Location = New System.Drawing.Point(15, 51) Me.ManufacturerLabel.Size = New System.Drawing.Size(114, 18) Me.ManufacturerLabel.Text = "Manufacturer:" ' 'Manufacturer ' Me.Manufacturer.Location = New System.Drawing.Point(135, 51) Me.Manufacturer.Size = New System.Drawing.Size(237, 18) Me.Manufacturer.Text = "(Unknown)" ' 'DeviceNameLabel ' Me.DeviceNameLabel.Location = New System.Drawing.Point(15, 27) Me.DeviceNameLabel.Size = New System.Drawing.Size(114, 18) Me.DeviceNameLabel.Text = "Device Name:" ' 'PowerOffButton ' Me.PowerOffButton.Enabled = False Me.PowerOffButton.Location = New System.Drawing.Point(300, 189) Me.PowerOffButton.Size = New System.Drawing.Size(72, 24) Me.PowerOffButton.Text = "Power Off" ' 'ColumnHeader1 ' Me.ColumnHeader1.Text = "Name" Me.ColumnHeader1.Width = 77 ' 'ColumnHeader2 ' Me.ColumnHeader2.Text = "Latitude" Me.ColumnHeader2.Width = 80 ' 'ColumnHeader3 ' Me.ColumnHeader3.Text = "Longitude" Me.ColumnHeader3.Width = 81 ' 'ColumnHeader5 ' Me.ColumnHeader5.Text = "Symbol" Me.ColumnHeader5.Width = 60 ' 'ColumnHeader4 ' Me.ColumnHeader4.Text = "Comment" Me.ColumnHeader4.Width = 60 ' 'BaudRateComboBox ' Me.BaudRateComboBox.Items.Add("Automatic") Me.BaudRateComboBox.Items.Add("4800") Me.BaudRateComboBox.Items.Add("9600") Me.BaudRateComboBox.Location = New System.Drawing.Point(552, 27) Me.BaudRateComboBox.Size = New System.Drawing.Size(75, 22) ' 'BaudRateLabel ' Me.BaudRateLabel.Location = New System.Drawing.Point(555, 9) Me.BaudRateLabel.Size = New System.Drawing.Size(69, 15) Me.BaudRateLabel.Text = "Baud Rate:" ' 'ComPortLabel ' Me.ComPortLabel.Location = New System.Drawing.Point(555, 57) Me.ComPortLabel.Size = New System.Drawing.Size(69, 15) Me.ComPortLabel.Text = "COM Port:" ' 'COMPortComboBox ' Me.COMPortComboBox.Items.Add("Automatic") Me.COMPortComboBox.Items.Add("COM1") Me.COMPortComboBox.Items.Add("COM2") Me.COMPortComboBox.Items.Add("COM3") Me.COMPortComboBox.Items.Add("COM4") Me.COMPortComboBox.Items.Add("COM5") Me.COMPortComboBox.Items.Add("COM6") Me.COMPortComboBox.Items.Add("COM7") Me.COMPortComboBox.Items.Add("COM8") Me.COMPortComboBox.Items.Add("COM9") Me.COMPortComboBox.Items.Add("COM10") Me.COMPortComboBox.Items.Add("COM11") Me.COMPortComboBox.Items.Add("COM12") Me.COMPortComboBox.Items.Add("COM13") Me.COMPortComboBox.Items.Add("COM14") Me.COMPortComboBox.Items.Add("COM15") Me.COMPortComboBox.Items.Add("COM16") Me.COMPortComboBox.Items.Add("COM17") Me.COMPortComboBox.Items.Add("COM18") Me.COMPortComboBox.Items.Add("COM19") Me.COMPortComboBox.Items.Add("COM20") Me.COMPortComboBox.Location = New System.Drawing.Point(552, 75) Me.COMPortComboBox.Size = New System.Drawing.Size(75, 22) ' 'StopButton ' Me.StopButton.Enabled = False Me.StopButton.Location = New System.Drawing.Point(555, 135) Me.StopButton.Size = New System.Drawing.Size(72, 24) Me.StopButton.Text = "Stop" ' 'StartButton ' Me.StartButton.Location = New System.Drawing.Point(555, 105) Me.StartButton.Size = New System.Drawing.Size(72, 24) Me.StartButton.Text = "Start" ' 'StatusBar ' Me.StatusBar.Location = New System.Drawing.Point(0, 398) Me.StatusBar.Size = New System.Drawing.Size(634, 20) Me.StatusBar.Text = "StatusBar1" ' 'LocalTimeTimer ' Me.LocalTimeTimer.Interval = 250 Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog ' 'Form1 ' Me.Controls.Add(Me.StatusBar) Me.Controls.Add(Me.BaudRateComboBox) Me.Controls.Add(Me.BaudRateLabel) Me.Controls.Add(Me.ComPortLabel) Me.Controls.Add(Me.COMPortComboBox) Me.Controls.Add(Me.StopButton) Me.Controls.Add(Me.StartButton) Me.Controls.Add(Me.TabControl1) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Text = "GPS.NET Complete Demonstration" End Sub #End Region ' Create a new GPS receiver and enable events Private WithEvents GPS As New Receiver #Region " Demonstration of Automatic Device Detection " ' GPS.NET is able to search for and detect GPS devices connected to the device. ' This feature is recommended because it virtually removes the need to train your ' users on what serial ports are, and also removes the need to troubleshoot customers ' which do not know their correct serial port settings. ' ' To use device detection, set the Receiver.Device.Settings.ComPort property to ' ComPort.Automatic. You can also use the DeviceSettingsDetector class to make your ' own device detection features. Private Sub GPS_DeviceDetectionStarted(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.DeviceDetectionStarted ' Update the status to show that the azimuth has changed CurrentStatus = "Please wait, detecting GPS devices..." Invoke(New EventHandler(AddressOf UpdateStatusBar)) End Sub Private Sub GPS_DeviceDetectionCompleted(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.DeviceDetectionCompleted ' Update the status to show that the azimuth has changed CurrentStatus = "GPS device detection has completed." Invoke(New EventHandler(AddressOf UpdateStatusBar)) End Sub Private Sub GPS_DeviceDetected(ByVal sender As Object, ByVal e As StormSource.Gps.DeviceSettingsEventArgs) Handles GPS.DeviceDetected ' Update the status to show that the azimuth has changed CurrentStatus = "A GPS device was found on " & e.DeviceSettings.ComPort.ToString & "!" Invoke(New EventHandler(AddressOf UpdateStatusBar)) End Sub #End Region #Region " Starting the GPS Receiver " Private Sub StartButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartButton.Click ' Configure the baud rate and serial port If COMPortComboBox.Text = "Automatic" Then ' Yes. Set the receiver to detect the device automatically GPS.Device.Settings.ComPort = ComPort.Automatic Else ' No. Use a manual selection GPS.Device.Settings.ComPort = COMPortComboBox.Text.Substring(3) End If If BaudRateComboBox.Text = "Automatic" Then ' Use automatic baud rate GPS.Device.Settings.BaudRate = BaudRate.Automatic Else ' Usa a manual baud rate GPS.Device.Settings.BaudRate = BaudRateComboBox.Text End If ' NOTE: It's important to add error checking around the Start() method and Enabled property Try ' Set the license key (to disable the trial window) ' GPS.SetLicenseKey("[your license goes here]") ' To maximize performance of Automatic Device Discovery, tell it to use ' previously-discovered devices to connect. GPS.Device.DetectionMode = DeviceDetectionMode.UsePreviouslyDetectedDevices ' Uncomment the following line to detect devices once per session (slower, but recommended) 'GPS.Device.DetectionMode = DeviceDetectionMode.DetectOncePerSession ' Start receiving messages GPS.Start() Catch ex As UnauthorizedAccessException ' The trial screen was cancelled MessageBox.Show(ex.ToString, "Cannot Continue Trial", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) Catch ex As GpsException ' Notify of the error MessageBox.Show(ex.ToString, "Unable to Begin GPS Communications", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) End Try End Sub ' Raised just before a connection attempt is made Private Sub GPS_Connecting(ByVal sender As Object, ByVal e As DeviceSettingsEventArgs) Handles GPS.Connecting CurrentStatus = "Connecting to GPS device..." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Enable the Stop button, disable the Start button Me.Invoke(New EventHandler(AddressOf DisableStartButton)) End Sub Private Sub GPS_Connected(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.Connected CurrentStatus = "Connected to GPS device, please wait..." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Enable the Stop button, disable the Start button Me.Invoke(New EventHandler(AddressOf EnableStopButton)) End Sub ' Invoked upon a connection attempt to disable the Start button Private Sub DisableStartButton(ByVal sender As Object, ByVal e As System.EventArgs) StartButton.Enabled = False BaudRateComboBox.Enabled = False COMPortComboBox.Enabled = False End Sub ' Invoked from the GPS.NET thread to enable the stop button Private Sub EnableStopButton(ByVal sender As Object, ByVal e As System.EventArgs) StopButton.Enabled = True End Sub Private Sub GPS_Acquiring(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.Acquiring CurrentStatus = "Please wait while satellite information is gathered..." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) End Sub ' Raised when the receiver has adjusted the baud rate in an attempt to receive GPS information Private Sub GPS_BaudRateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.BaudRateChanged Select Case GPS.Device.Settings.BaudRate Case StormSource.Gps.BaudRate.Baud4800 Me.BaudRateComboBox.SelectedIndex = 0 Case StormSource.Gps.BaudRate.Baud9600 Me.BaudRateComboBox.SelectedIndex = 1 End Select End Sub Private Sub GPS_Timeout(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.Timeout MessageBox.Show("The GPS device did not respond to commands, even after attempts to detect the correct connection settings. The device may be powered off. Try restarting the Receiver.", "GPS Device Timeout", MessageBoxButtons.OK, MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1) End Sub #End Region #Region " Stopping the GPS Receiver " Private Sub StopButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StopButton.Click GPS.Stop() End Sub ' Raised just before an attempt is made to disconnect from the GPS device Private Sub GPS_Disconnecting(ByVal sender As Object, ByVal e As DeviceSettingsEventArgs) Handles GPS.Disconnecting CurrentStatus = "Disconnecting from GPS device..." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) End Sub ' Raised when the connection with the device is now closed Private Sub GPS_Disconnected(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.Disconnected CurrentStatus = "Disconnected from GPS device." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Reset start & stop buttons Me.Invoke(New EventHandler(AddressOf EnableStartButton)) End Sub ' Invoked from the GPS.NET thread to enable the stop button Private Sub EnableStartButton(ByVal sender As Object, ByVal e As System.EventArgs) StartButton.Enabled = True PowerOffButton.Enabled = False StopButton.Enabled = False BaudRateComboBox.Enabled = True COMPortComboBox.Enabled = True End Sub #End Region #Region " Demonstration of Motion-Related GPS Events " ' Updates the current speed Private Sub UpdateSpeed(ByVal sender As Object, ByVal e As EventArgs) ' Are we using the Imperial or Metric system? If System.Globalization.RegionInfo.CurrentRegion.IsMetric Then ' Use the Metric system Speed.Text = GPS.Speed.ToKilometersPerHour.ToString Else ' Use the Imperial system Speed.Text = GPS.Speed.ToStatuteMilesPerHour.ToString End If End Sub ' Updates the current altitude Private Sub UpdateAltitude(ByVal sender As Object, ByVal e As EventArgs) ' Are we using the Imperial or Metric system? If System.Globalization.RegionInfo.CurrentRegion.IsMetric Then ' Use the metric system Altitude.Text = GPS.Altitude.ToMeters.ToString Else ' Use the Imperial system Altitude.Text = GPS.Altitude.ToFeet.ToString End If End Sub ' Updates the current bearing Private Sub UpdateBearing(ByVal sender As Object, ByVal e As EventArgs) ' Update the bearing Bearing.Text = GPS.Bearing.ToString ' And show the current bearing represented as a cardinal (compass) direction Direction.Text = GPS.Bearing.CardinalDirection.ToString End Sub ' Updates the currentposition (in UTM) Private Sub UpdateUtmPosition(ByVal sender As Object, ByVal e As EventArgs) ' Update the current position (in UTM) UtmPosition.Text = GPS.UtmPosition.ToString End Sub ' Updates the current location Private Sub UpdatePosition(ByVal sender As Object, ByVal e As EventArgs) ' Update the current latitude Latitude.Text = GPS.Position.Latitude.ToString ' Update the longitude Longitude.Text = GPS.Position.Longitude.ToString End Sub Private Sub GPS_AltitudeChanged(ByVal sender As Object, ByVal e As DistanceEventArgs) Handles GPS.AltitudeChanged CurrentStatus = "Altitude has changed." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the current altitude Me.Invoke(New EventHandler(AddressOf UpdateAltitude)) End Sub Private Sub GPS_BearingChanged(ByVal sender As Object, ByVal e As AzimuthEventArgs) Handles GPS.BearingChanged CurrentStatus = "Bearing has changed." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the bearing and compass direction Me.Invoke(New EventHandler(AddressOf UpdateBearing)) End Sub Private Sub GPS_SpeedChanged(ByVal sender As Object, ByVal e As SpeedEventArgs) Handles GPS.SpeedChanged CurrentStatus = "Speed has changed." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the speed Me.Invoke(New EventHandler(AddressOf UpdateSpeed)) End Sub Private Sub GPS_PositionChanged(ByVal sender As Object, ByVal e As PositionEventArgs) Handles GPS.PositionChanged CurrentStatus = "Position has changed." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the labels with the new position Me.Invoke(New EventHandler(AddressOf UpdatePosition)) End Sub ' Raised when UTM coordinates have been reported from the GPS device Private Sub GPS_UtmPositionChanged(ByVal sender As Object, ByVal e As StormSource.Gps.UtmPositionEventArgs) Handles GPS.UtmPositionChanged CurrentStatus = "UTM position has changed." Me.Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the UTM position Me.Invoke(New EventHandler(AddressOf UpdateUtmPosition)) End Sub #End Region #Region " Demonstration of Precision-Related Events " ' Updates the form with dilution of precision (accuracy) information Private Sub UpdateMeanDilutionOfPrecision(ByVal sender As Object, ByVal e As EventArgs) ' Update the overall (mean) accuracy MeanDilutionOfPrecision.Text = GPS.MeanDilutionOfPrecision.ToString End Sub ' Updates the form with dilution of precision (accuracy) information Private Sub UpdateHorizontalDilutionOfPrecision(ByVal sender As Object, ByVal e As EventArgs) ' Update the accuract of latitude/longitude measurements HorizontalDilutionOfPrecision.Text = GPS.HorizontalDilutionOfPrecision.ToString End Sub ' Updates the form with dilution of precision (accuracy) information Private Sub UpdateVerticalDilutionOfPrecision(ByVal sender As Object, ByVal e As EventArgs) ' Update the accuracy of altitude measurements VerticalDilutionOfPrecision.Text = GPS.VerticalDilutionOfPrecision.ToString End Sub ' Raised when the accuracy of latitude/longitude measurements has changed Private Sub GPS_HorizontalDilutionOfPrecisionChanged(ByVal sender As Object, ByVal e As DilutionOfPrecisionEventArgs) Handles GPS.HorizontalDilutionOfPrecisionChanged CurrentStatus = "Lat/long accuracy has changed to " & e.DilutionOfPrecision.ToString Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the accuracy information Invoke(New EventHandler(AddressOf UpdateHorizontalDilutionOfPrecision)) End Sub ' Raised when the mean accuracy in the current latitude/longitude has changed Private Sub GPS_MeanDilutionOfPrecisionChanged(ByVal sender As Object, ByVal e As DilutionOfPrecisionEventArgs) Handles GPS.MeanDilutionOfPrecisionChanged CurrentStatus = "General accuracy has changed to " & e.DilutionOfPrecision.ToString Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the accuracy information Invoke(New EventHandler(AddressOf UpdateMeanDilutionOfPrecision)) End Sub ' Raised when the confidence level of altitude measurements has changed Private Sub GPS_VerticalDilutionOfPrecisionChanged(ByVal sender As Object, ByVal e As DilutionOfPrecisionEventArgs) Handles GPS.VerticalDilutionOfPrecisionChanged CurrentStatus = "Altitude accuracy has changed to " & e.DilutionOfPrecision.ToString Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the accuracy information Invoke(New EventHandler(AddressOf UpdateVerticalDilutionOfPrecision)) End Sub #End Region #Region " Demonstration of Exception Handling " ' NOTE: This event is raised for errors which occur on separate threads within the GPS.NET engine. ' Use Try..Catch blocks to handle typical GPS errors via the GPSException class. Private Sub GPS_ErrorOccurred(ByVal sender As Object, ByVal e As ErrorEventArgs) Handles GPS.ErrorOccurred ' Add the error to the top of the list GpsExceptionTextBox.Text = e.Exception.ToString & vbCrLf & GpsExceptionTextBox.Text End Sub ' This event is raised when invalid or corrupt data is received by the device. This event only ' serves as a warning that some data was not 100% understood. These ' errors are not typically forwarded to the user. Private Sub GPS_ParsingErrorOccurred(ByVal sender As Object, ByVal e As StormSource.Gps.ParsingErrorEventArgs) Handles GPS.ParsingErrorOccurred ' Add the error to the top of the list ParsingExceptionTextBox.Text = e.ParsingException.ToString & vbCrLf & ParsingExceptionTextBox.Text End Sub #End Region #Region " Demonstration of Fix-Related Events " Public Sub UpdateFixInformation(ByVal sender As Object, ByVal e As System.EventArgs) If GPS.IsFixObtained Then FixObtained.Text = "Fix Obtained" Else FixObtained.Text = "No Fix Available" End If FixMethod.Text = GPS.FixMethod.ToString FixMode.Text = GPS.FixMode.ToString FixQuality.Text = GPS.FixQuality.ToString End Sub Private Sub GPS_FixLost(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.FixLost CurrentStatus = "Satellite fix has been lost." Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the magnetic variation Invoke(New EventHandler(AddressOf UpdateFixInformation)) End Sub Private Sub GPS_FixMethodChanged(ByVal sender As Object, ByVal e As FixMethodEventArgs) Handles GPS.FixMethodChanged CurrentStatus = "Satellite fix method has changed." Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the magnetic variation Invoke(New EventHandler(AddressOf UpdateFixInformation)) End Sub Private Sub GPS_FixModeChanged(ByVal sender As Object, ByVal e As FixModeEventArgs) Handles GPS.FixModeChanged CurrentStatus = "Satellite fix mode has changed." Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the magnetic variation Invoke(New EventHandler(AddressOf UpdateFixInformation)) End Sub Private Sub GPS_FixObtained(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.FixObtained CurrentStatus = "Satellite fix has been obtained!" Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the magnetic variation Invoke(New EventHandler(AddressOf UpdateFixInformation)) End Sub Private Sub GPS_FixQualityChanged(ByVal sender As Object, ByVal e As FixQualityEventArgs) Handles GPS.FixQualityChanged CurrentStatus = "Satellite fix quality has changed" Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the magnetic variation Invoke(New EventHandler(AddressOf UpdateFixInformation)) End Sub #End Region #Region " Demonstration of Satellite-Related GPS Events " Private Sub GPS_SatelliteAzimuthChanged(ByVal sender As Object, ByVal e As SatelliteEventArgs) Handles GPS.SatelliteAzimuthChanged ' Update the list view associated with the specified satellite with the new azimuth SatelliteList.Items(e.Satellite.Index).SubItems(2).Text = e.Satellite.Azimuth.ToString End Sub Private Sub GPS_SatelliteElevationChanged(ByVal sender As Object, ByVal e As SatelliteEventArgs) Handles GPS.SatelliteElevationChanged ' Update the list view associated with the specified satellite with the new elevation SatelliteList.Items(e.Satellite.Index).SubItems(1).Text = e.Satellite.Elevation.ToString End Sub Private Sub GPS_SatelliteFixLost(ByVal sender As Object, ByVal e As SatelliteEventArgs) Handles GPS.SatelliteFixLost SatelliteList.Items(e.Satellite.Index).Checked = False End Sub Private Sub GPS_SatelliteFixObtained(ByVal sender As Object, ByVal e As SatelliteEventArgs) Handles GPS.SatelliteFixObtained SatelliteList.Items(e.Satellite.Index).Checked = True End Sub Private Sub GPS_SatellitePRCChanged(ByVal sender As Object, ByVal e As SatelliteEventArgs) Handles GPS.SatellitePseudoRandomCodeChanged SatelliteList.Items(e.Satellite.Index).Text = e.Satellite.PseudoRandomCode End Sub Private Sub GPS_SatelliteSignalToNoiseRatioChanged(ByVal sender As Object, ByVal e As SatelliteEventArgs) Handles GPS.SatelliteSignalToNoiseRatioChanged SatelliteList.Items(e.Satellite.Index).SubItems(3).Text = e.Satellite.SignalToNoiseRatio.ToString & " (" & e.Satellite.SignalToNoiseRatio.Rating.ToString & ")" End Sub ' Handles three events: SatelliteActiveCountChanged, SatelliteFixCountChanged, SatelliteTrackedCountChanged Private Sub GPS_SatelliteCountChanged(ByVal sender As Object, ByVal e As SatelliteCountEventArgs) Handles GPS.SatelliteActiveCountChanged, GPS.SatelliteFixedCountChanged, GPS.SatelliteTrackedCountChanged Select Case e.Type Case SatelliteCountType.ActiveCount ActiveSatellites.Text = e.Count Case SatelliteCountType.FixedCount FixedSatellites.Text = e.Count Case SatelliteCountType.TrackedCount TrackedSatellites.Text = e.Count End Select End Sub #End Region #Region " Demonstration of Raw Sentence Processing " ' Stores information about the current sentence Private CurrentSentence As String ' Returns True if the sentence was fully understood Private CurrentSentenceType As SentenceType ' Adds the specified sentence to the list Private Sub AddSentence(ByVal sender As Object, ByVal e As EventArgs) Select Case CurrentSentenceType Case SentenceType.Recognized ' The sentence was processed successfully RecognizedSentences.Items.Add(CurrentSentence) RecognizedSentences.SelectedIndex = RecognizedSentences.Items.Count - 1 ' Prevent too many lines from being in the list box If RecognizedSentences.Items.Count > 50 Then RecognizedSentences.Items.RemoveAt(0) Case SentenceType.Unrecognized ' The sentence contained some corrupt data, or was proprietary to a specific device UnrecognizedSentences.Items.Add(CurrentSentence) UnrecognizedSentences.SelectedIndex = UnrecognizedSentences.Items.Count - 1 ' Prevent too many lines from being in the list box If UnrecognizedSentences.Items.Count > 50 Then UnrecognizedSentences.Items.RemoveAt(0) End Select End Sub ' Handles two events: SentenceReceived and UnrecognizedSentenceReceived Private Sub GPS_SentenceReceived(ByVal sender As Object, ByVal e As SentenceEventArgs) Handles GPS.SentenceReceived, GPS.UnrecognizedSentenceReceived CurrentSentence = e.Sentence CurrentSentenceType = e.Type ' Now add the sentence Invoke(New EventHandler(AddressOf AddSentence)) End Sub ' Raised when someone clicks on the "Parse" button. Private Sub ParseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ParseButton.Click ' Parse the data which was entered into the text box GPS.Parse(ParsingText.Text) End Sub #End Region #Region " Demonstration of GPS device date/time information " ' Updates the form with local date/time information Public Sub UpdateLocalTime(ByVal sender As Object, ByVal e As EventArgs) LocalTime.Text = Now.ToString End Sub ' Updates the form with GPS device's date/time information Public Sub UpdateGpsTime(ByVal sender As Object, ByVal e As EventArgs) ' NOTE: GPS devices send time in UTC. We must convert it to local time UTCDateTime.Text = GPS.UtcDateTime.ToLocalTime.ToString End Sub ' Update the local time to show the comparison between local time and the time obtained from the GPS receiver Private Sub LocalTimeTimer_Elapsed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LocalTimeTimer.Tick Invoke(New EventHandler(AddressOf UpdateLocalTime)) End Sub ' Raised whenever the GPS device reports a new date/time ' NOTE: Several devices stop sending this information as soon as a fix is obtained! Private Sub GPS_UTCDateTimeChanged(ByVal sender As Object, ByVal e As DateTimeEventArgs) Handles GPS.UtcDateTimeChanged CurrentStatus = "GPS date/time has changed." Invoke(New EventHandler(AddressOf UpdateStatusBar)) ' Update the magnetic variation Invoke(New EventHandler(AddressOf UpdateGpsTime)) End Sub #End Region #Region " Demonstration of GPS Device Identification " ' Raised when GPS.NET is able to identify this device uniquely from any other device Private Sub GPS_DeviceIdentified(ByVal sender As Object, ByVal e As StormSource.Gps.DeviceEventArgs) Handles GPS.DeviceIdentified Invoke(New EventHandler(AddressOf UpdateDeviceInformation)) End Sub Private Sub GPS_ProtocolChanged(ByVal sender As Object, ByVal e As StormSource.Gps.DeviceEventArgs) Handles GPS.ProtocolChanged Invoke(New EventHandler(AddressOf UpdateDeviceInformation)) End Sub Private Sub GPS_ManufacturerChanged(ByVal sender As Object, ByVal e As StormSource.Gps.DeviceEventArgs) Handles GPS.ManufacturerChanged Invoke(New EventHandler(AddressOf UpdateDeviceInformation)) End Sub Private Sub GPS_ProductNameChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GPS.ProductNameChanged Invoke(New EventHandler(AddressOf UpdateDeviceInformation)) End Sub Private Sub GPS_BatteryLifeChanged(ByVal sender As Object, ByVal e As StormSource.Gps.TimeSpanEventArgs) Handles GPS.BatteryLifeChanged Invoke(New EventHandler(AddressOf UpdateDeviceInformation)) End Sub ' Updates the form on the form's thread Private Sub UpdateDeviceInformation(ByVal sender As Object, ByVal e As EventArgs) Try ' Update device indentification information Me.Manufacturer.Text = GPS.Device.Manufacturer.ToString Me.DeviceName.Text = GPS.Device.Name Me.SoftwareVersion.Text = GPS.Device.SoftwareVersion Me.Protocol.Text = GPS.Device.Protocol.ToString Me.BatteryLife.Text = GPS.Device.BatteryLife.ToString ' Update waypoint capabilities Me.WaypointAddressCheckbox.Checked = GPS.Device.SupportsWaypointAddress Me.WaypointAltitudeCheckbox.Checked = GPS.Device.SupportsWaypointAltitude Me.WaypointCityCheckbox.Checked = GPS.Device.SupportsWaypointCity Me.WaypointColorCheckbox.Checked = GPS.Device.SupportsWaypointColor Me.WaypointCommentCheckbox.Checked = GPS.Device.SupportsWaypointComment Me.WaypointCountryCheckbox.Checked = GPS.Device.SupportsWaypointCountry Me.WaypointIntersectingRoadCheckbox.Checked = GPS.Device.SupportsWaypointIntersectingRoad Me.WaypointDepthCheckbox.Checked = GPS.Device.SupportsWaypointDepth Me.WaypointDisplayModeCheckbox.Checked = GPS.Device.SupportsWaypointDisplayMode Me.WaypointFacilityNameCheckbox.Checked = GPS.Device.SupportsWaypointFacility Me.WaypointStateCheckbox.Checked = GPS.Device.SupportsWaypointState Me.WaypointSymbolCheckbox.Checked = GPS.Device.SupportsWaypointSymbol ' To make features stand out more, enable/disable the checkbox Me.WaypointAddressCheckbox.Enabled = Me.WaypointAddressCheckbox.Checked Me.WaypointAltitudeCheckbox.Enabled = Me.WaypointAltitudeCheckbox.Checked Me.WaypointCityCheckbox.Enabled = Me.WaypointCityCheckbox.Checked Me.WaypointColorCheckbox.Enabled = Me.WaypointColorCheckbox.Checked Me.WaypointColorComboBox.Enabled = Me.WaypointColorCheckbox.Checked Me.WaypointCommentCheckbox.Enabled = Me.WaypointCommentCheckbox.Checked Me.WaypointCountryCheckbox.Enabled = Me.WaypointCountryCheckbox.Checked Me.WaypointIntersectingRoadCheckbox.Enabled = Me.WaypointIntersectingRoadCheckbox.Checked Me.WaypointDepthCheckbox.Enabled = Me.WaypointDepthCheckbox.Checked Me.WaypointDisplayModeCheckbox.Enabled = Me.WaypointDisplayModeCheckbox.Checked Me.WaypointDisplayModeComboBox.Enabled = Me.WaypointDisplayModeCheckbox.Checked Me.WaypointFacilityNameCheckbox.Enabled = Me.WaypointFacilityNameCheckbox.Checked Me.WaypointStateCheckbox.Enabled = Me.WaypointStateCheckbox.Checked Me.WaypointSymbolCheckbox.Enabled = Me.WaypointSymbolCheckbox.Checked Me.WaypointSymbolComboBox.Enabled = Me.WaypointSymbolCheckbox.Checked ' Update available waypoint symbols WaypointSymbolComboBox.Items.Clear() 'WaypointSymbolComboBox.Items.AddRange(GPS.Device.GetSymbols) WaypointSymbolComboBox.SelectedIndex = 0 ' Update available waypoint colors WaypointColorComboBox.Items.Clear() 'WaypointColorComboBox.Items.AddRange(GPS.Device.GetColors) WaypointColorComboBox.SelectedIndex = 0 ' Update available waypoint display modes WaypointDisplayModeComboBox.Items.Clear() 'WaypointDisplayModeComboBox.Items.AddRange(GPS.Device.GetDisplayModes) WaypointDisplayModeComboBox.SelectedIndex = 0 ' Enable/disable features based on the protocol Me.PowerOffButton.Enabled = (GPS.Device.Protocol = StormSource.Gps.Protocol.GarminBinary) Catch ex As Exception End Try End Sub #End Region #Region " Demonstration of powering off a GPS device " ' NOTE: Currently, the PowerOff() method is only supported when using the Garmin« ' binary protocol. Set your device to use the Garmin protocol before using this method. Private Sub PowerOffButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PowerOffButton.Click ' Confirm that the device should be powered off Select Case MessageBox.Show("When you turn off the GPS device, you will need to turn it back on manually. Do you still want to power off the device?", "GPS Device Power-Off", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) Case DialogResult.Yes Try ' Try to power off the device. If the device is not using the Garmin« protocol, this will fail GPS.Device.PowerOff() Catch ex As GpsException ' The power-off failed MessageBox.Show("The device must be set to the Garmin« protocol in order for it to be shut off. Please change the protocol and try again.", "Unable to Power Off", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1) End Try End Select End Sub #End Region #Region " Miscellaneous Form Events " ' Stores information about current activity going on with the GPS device Public CurrentStatus As String ' Used to update the status bar Public Sub UpdateStatusBar(ByVal sender As Object, ByVal e As EventArgs) StatusBar.Text = CurrentStatus End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Set the drop-down boxes to "Automatic" COMPortComboBox.SelectedIndex = 0 BaudRateComboBox.SelectedIndex = 0 End Sub Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed ' We're finished with the GPS completely. Shut it down GPS.Stop() GPS.Dispose() End Sub #End Region End Class