home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 October / CMCD1004.ISO / Software / Shareware / Programare / gpssdk / GPS.NET Global Positioning SDK 1.4.6.msi / Data1.cab / EditWaypointForm.vb2 < prev    next >
Encoding:
Text File  |  2004-08-24  |  24.2 KB  |  584 lines

  1. Imports StormSource.Gps
  2.  
  3. Public Class EditWaypointForm
  4.     Inherits System.Windows.Forms.Form
  5.  
  6. #Region " Windows Form Designer generated code "
  7.  
  8.     Public Sub New()
  9.         MyBase.New()
  10.  
  11.         'This call is required by the Windows Form Designer.
  12.         InitializeComponent()
  13.  
  14.         'Add any initialization after the InitializeComponent() call
  15.  
  16.     End Sub
  17.  
  18.     'Form overrides dispose to clean up the component list.
  19.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  20.         If disposing Then
  21.             If Not (components Is Nothing) Then
  22.                 components.Dispose()
  23.             End If
  24.         End If
  25.         MyBase.Dispose(disposing)
  26.     End Sub
  27.  
  28.     'Required by the Windows Form Designer
  29.     Private components As System.ComponentModel.IContainer
  30.  
  31.     'NOTE: The following procedure is required by the Windows Form Designer
  32.     'It can be modified using the Windows Form Designer.  
  33.     'Do not modify it using the code editor.
  34.     Friend WithEvents btnCancelButton As System.Windows.Forms.Button
  35.     Friend WithEvents WaypointNameLabel As System.Windows.Forms.Label
  36.     Friend WithEvents WaypointName As System.Windows.Forms.TextBox
  37.     Friend WithEvents SymbolLabel As System.Windows.Forms.Label
  38.     Friend WithEvents TabControl As System.Windows.Forms.TabControl
  39.     Friend WithEvents GeneralTab As System.Windows.Forms.TabPage
  40.     Friend WithEvents Position As System.Windows.Forms.TextBox
  41.     Friend WithEvents WaypointDisplayModeComboBox As System.Windows.Forms.ComboBox
  42.     Friend WithEvents WaypointSymbolComboBox As System.Windows.Forms.ComboBox
  43.     Friend WithEvents WaypointColorComboBox As System.Windows.Forms.ComboBox
  44.     Friend WithEvents ColorLabel As System.Windows.Forms.Label
  45.     Friend WithEvents DisplayModeLabel As System.Windows.Forms.Label
  46.     Friend WithEvents Depth As System.Windows.Forms.TextBox
  47.     Friend WithEvents DepthLabel As System.Windows.Forms.Label
  48.     Friend WithEvents Altitude As System.Windows.Forms.TextBox
  49.     Friend WithEvents AltitudeLabel As System.Windows.Forms.Label
  50.     Friend WithEvents City As System.Windows.Forms.TextBox
  51.     Friend WithEvents CityLabel As System.Windows.Forms.Label
  52.     Friend WithEvents Address As System.Windows.Forms.TextBox
  53.     Friend WithEvents AddressLabel As System.Windows.Forms.Label
  54.     Friend WithEvents Country As System.Windows.Forms.TextBox
  55.     Friend WithEvents CountryLabel As System.Windows.Forms.Label
  56.     Friend WithEvents State As System.Windows.Forms.TextBox
  57.     Friend WithEvents StateLabel As System.Windows.Forms.Label
  58.     Friend WithEvents IntersectingRoad As System.Windows.Forms.TextBox
  59.     Friend WithEvents IntersectingRoadLabel As System.Windows.Forms.Label
  60.     Friend WithEvents FacilityLabel As System.Windows.Forms.Label
  61.     Friend WithEvents Facility As System.Windows.Forms.TextBox
  62.     Friend WithEvents SaveButton As System.Windows.Forms.Button
  63.     Friend WithEvents PositionLabel As System.Windows.Forms.Label
  64.     Friend WithEvents DescriptionLabel As System.Windows.Forms.Label
  65.     Friend WithEvents Description As System.Windows.Forms.TextBox
  66.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  67.         Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(EditWaypointForm))
  68.         Me.WaypointDisplayModeComboBox = New System.Windows.Forms.ComboBox
  69.         Me.WaypointSymbolComboBox = New System.Windows.Forms.ComboBox
  70.         Me.WaypointNameLabel = New System.Windows.Forms.Label
  71.         Me.WaypointName = New System.Windows.Forms.TextBox
  72.         Me.btnCancelButton = New System.Windows.Forms.Button
  73.         Me.SaveButton = New System.Windows.Forms.Button
  74.         Me.Position = New System.Windows.Forms.TextBox
  75.         Me.PositionLabel = New System.Windows.Forms.Label
  76.         Me.Description = New System.Windows.Forms.TextBox
  77.         Me.DescriptionLabel = New System.Windows.Forms.Label
  78.         Me.SymbolLabel = New System.Windows.Forms.Label
  79.         Me.ColorLabel = New System.Windows.Forms.Label
  80.         Me.WaypointColorComboBox = New System.Windows.Forms.ComboBox
  81.         Me.DisplayModeLabel = New System.Windows.Forms.Label
  82.         Me.Depth = New System.Windows.Forms.TextBox
  83.         Me.DepthLabel = New System.Windows.Forms.Label
  84.         Me.Altitude = New System.Windows.Forms.TextBox
  85.         Me.AltitudeLabel = New System.Windows.Forms.Label
  86.         Me.City = New System.Windows.Forms.TextBox
  87.         Me.CityLabel = New System.Windows.Forms.Label
  88.         Me.Address = New System.Windows.Forms.TextBox
  89.         Me.AddressLabel = New System.Windows.Forms.Label
  90.         Me.Country = New System.Windows.Forms.TextBox
  91.         Me.CountryLabel = New System.Windows.Forms.Label
  92.         Me.State = New System.Windows.Forms.TextBox
  93.         Me.StateLabel = New System.Windows.Forms.Label
  94.         Me.IntersectingRoad = New System.Windows.Forms.TextBox
  95.         Me.IntersectingRoadLabel = New System.Windows.Forms.Label
  96.         Me.TabControl = New System.Windows.Forms.TabControl
  97.         Me.GeneralTab = New System.Windows.Forms.TabPage
  98.         Me.FacilityLabel = New System.Windows.Forms.Label
  99.         Me.Facility = New System.Windows.Forms.TextBox
  100.         Me.TabControl.SuspendLayout()
  101.         Me.GeneralTab.SuspendLayout()
  102.         Me.SuspendLayout()
  103.         '
  104.         'WaypointDisplayModeComboBox
  105.         '
  106.         Me.WaypointDisplayModeComboBox.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  107.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  108.         Me.WaypointDisplayModeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
  109.         Me.WaypointDisplayModeComboBox.Location = New System.Drawing.Point(120, 126)
  110.         Me.WaypointDisplayModeComboBox.Name = "WaypointDisplayModeComboBox"
  111.         Me.WaypointDisplayModeComboBox.Size = New System.Drawing.Size(264, 21)
  112.         Me.WaypointDisplayModeComboBox.Sorted = True
  113.         Me.WaypointDisplayModeComboBox.TabIndex = 11
  114.         '
  115.         'WaypointSymbolComboBox
  116.         '
  117.         Me.WaypointSymbolComboBox.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  118.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  119.         Me.WaypointSymbolComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
  120.         Me.WaypointSymbolComboBox.Location = New System.Drawing.Point(120, 78)
  121.         Me.WaypointSymbolComboBox.Name = "WaypointSymbolComboBox"
  122.         Me.WaypointSymbolComboBox.Size = New System.Drawing.Size(264, 21)
  123.         Me.WaypointSymbolComboBox.Sorted = True
  124.         Me.WaypointSymbolComboBox.TabIndex = 7
  125.         '
  126.         'WaypointNameLabel
  127.         '
  128.         Me.WaypointNameLabel.Location = New System.Drawing.Point(9, 9)
  129.         Me.WaypointNameLabel.Name = "WaypointNameLabel"
  130.         Me.WaypointNameLabel.Size = New System.Drawing.Size(99, 15)
  131.         Me.WaypointNameLabel.TabIndex = 0
  132.         Me.WaypointNameLabel.Text = "Name:"
  133.         '
  134.         'WaypointName
  135.         '
  136.         Me.WaypointName.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  137.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  138.         Me.WaypointName.Location = New System.Drawing.Point(120, 6)
  139.         Me.WaypointName.Name = "WaypointName"
  140.         Me.WaypointName.Size = New System.Drawing.Size(264, 20)
  141.         Me.WaypointName.TabIndex = 1
  142.         Me.WaypointName.Text = ""
  143.         '
  144.         'btnCancelButton
  145.         '
  146.         Me.btnCancelButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  147.         Me.btnCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel
  148.         Me.btnCancelButton.Location = New System.Drawing.Point(339, 396)
  149.         Me.btnCancelButton.Name = "btnCancelButton"
  150.         Me.btnCancelButton.Size = New System.Drawing.Size(72, 24)
  151.         Me.btnCancelButton.TabIndex = 2
  152.         Me.btnCancelButton.Text = "Cancel"
  153.         '
  154.         'SaveButton
  155.         '
  156.         Me.SaveButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  157.         Me.SaveButton.DialogResult = System.Windows.Forms.DialogResult.OK
  158.         Me.SaveButton.Location = New System.Drawing.Point(261, 396)
  159.         Me.SaveButton.Name = "SaveButton"
  160.         Me.SaveButton.Size = New System.Drawing.Size(72, 24)
  161.         Me.SaveButton.TabIndex = 1
  162.         Me.SaveButton.Text = "Save"
  163.         '
  164.         'Position
  165.         '
  166.         Me.Position.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  167.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  168.         Me.Position.Location = New System.Drawing.Point(120, 30)
  169.         Me.Position.Name = "Position"
  170.         Me.Position.Size = New System.Drawing.Size(264, 20)
  171.         Me.Position.TabIndex = 3
  172.         Me.Position.Text = ""
  173.         '
  174.         'PositionLabel
  175.         '
  176.         Me.PositionLabel.Location = New System.Drawing.Point(9, 33)
  177.         Me.PositionLabel.Name = "PositionLabel"
  178.         Me.PositionLabel.Size = New System.Drawing.Size(99, 15)
  179.         Me.PositionLabel.TabIndex = 2
  180.         Me.PositionLabel.Text = "Position:"
  181.         '
  182.         'Description
  183.         '
  184.         Me.Description.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  185.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  186.         Me.Description.Location = New System.Drawing.Point(120, 54)
  187.         Me.Description.Name = "Description"
  188.         Me.Description.Size = New System.Drawing.Size(264, 20)
  189.         Me.Description.TabIndex = 5
  190.         Me.Description.Text = ""
  191.         '
  192.         'DescriptionLabel
  193.         '
  194.         Me.DescriptionLabel.Location = New System.Drawing.Point(9, 57)
  195.         Me.DescriptionLabel.Name = "DescriptionLabel"
  196.         Me.DescriptionLabel.Size = New System.Drawing.Size(99, 15)
  197.         Me.DescriptionLabel.TabIndex = 4
  198.         Me.DescriptionLabel.Text = "Description:"
  199.         '
  200.         'SymbolLabel
  201.         '
  202.         Me.SymbolLabel.Location = New System.Drawing.Point(9, 81)
  203.         Me.SymbolLabel.Name = "SymbolLabel"
  204.         Me.SymbolLabel.Size = New System.Drawing.Size(99, 15)
  205.         Me.SymbolLabel.TabIndex = 6
  206.         Me.SymbolLabel.Text = "Symbol:"
  207.         '
  208.         'ColorLabel
  209.         '
  210.         Me.ColorLabel.Location = New System.Drawing.Point(9, 105)
  211.         Me.ColorLabel.Name = "ColorLabel"
  212.         Me.ColorLabel.Size = New System.Drawing.Size(99, 15)
  213.         Me.ColorLabel.TabIndex = 8
  214.         Me.ColorLabel.Text = "Color:"
  215.         '
  216.         'WaypointColorComboBox
  217.         '
  218.         Me.WaypointColorComboBox.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  219.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  220.         Me.WaypointColorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
  221.         Me.WaypointColorComboBox.Location = New System.Drawing.Point(120, 102)
  222.         Me.WaypointColorComboBox.Name = "WaypointColorComboBox"
  223.         Me.WaypointColorComboBox.Size = New System.Drawing.Size(264, 21)
  224.         Me.WaypointColorComboBox.Sorted = True
  225.         Me.WaypointColorComboBox.TabIndex = 9
  226.         '
  227.         'DisplayModeLabel
  228.         '
  229.         Me.DisplayModeLabel.Location = New System.Drawing.Point(9, 129)
  230.         Me.DisplayModeLabel.Name = "DisplayModeLabel"
  231.         Me.DisplayModeLabel.Size = New System.Drawing.Size(99, 15)
  232.         Me.DisplayModeLabel.TabIndex = 10
  233.         Me.DisplayModeLabel.Text = "Display Mode:"
  234.         '
  235.         'Depth
  236.         '
  237.         Me.Depth.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  238.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  239.         Me.Depth.Location = New System.Drawing.Point(120, 174)
  240.         Me.Depth.Name = "Depth"
  241.         Me.Depth.Size = New System.Drawing.Size(264, 20)
  242.         Me.Depth.TabIndex = 15
  243.         Me.Depth.Text = ""
  244.         '
  245.         'DepthLabel
  246.         '
  247.         Me.DepthLabel.Location = New System.Drawing.Point(9, 177)
  248.         Me.DepthLabel.Name = "DepthLabel"
  249.         Me.DepthLabel.Size = New System.Drawing.Size(99, 15)
  250.         Me.DepthLabel.TabIndex = 14
  251.         Me.DepthLabel.Text = "Depth:"
  252.         '
  253.         'Altitude
  254.         '
  255.         Me.Altitude.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  256.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  257.         Me.Altitude.Location = New System.Drawing.Point(120, 150)
  258.         Me.Altitude.Name = "Altitude"
  259.         Me.Altitude.Size = New System.Drawing.Size(264, 20)
  260.         Me.Altitude.TabIndex = 13
  261.         Me.Altitude.Text = ""
  262.         '
  263.         'AltitudeLabel
  264.         '
  265.         Me.AltitudeLabel.Location = New System.Drawing.Point(9, 153)
  266.         Me.AltitudeLabel.Name = "AltitudeLabel"
  267.         Me.AltitudeLabel.Size = New System.Drawing.Size(99, 15)
  268.         Me.AltitudeLabel.TabIndex = 12
  269.         Me.AltitudeLabel.Text = "Altitude:"
  270.         '
  271.         'City
  272.         '
  273.         Me.City.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  274.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  275.         Me.City.Location = New System.Drawing.Point(120, 246)
  276.         Me.City.Name = "City"
  277.         Me.City.Size = New System.Drawing.Size(264, 20)
  278.         Me.City.TabIndex = 21
  279.         Me.City.Text = ""
  280.         '
  281.         'CityLabel
  282.         '
  283.         Me.CityLabel.Location = New System.Drawing.Point(9, 249)
  284.         Me.CityLabel.Name = "CityLabel"
  285.         Me.CityLabel.Size = New System.Drawing.Size(99, 15)
  286.         Me.CityLabel.TabIndex = 20
  287.         Me.CityLabel.Text = "City:"
  288.         '
  289.         'Address
  290.         '
  291.         Me.Address.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  292.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  293.         Me.Address.Location = New System.Drawing.Point(120, 222)
  294.         Me.Address.Name = "Address"
  295.         Me.Address.Size = New System.Drawing.Size(264, 20)
  296.         Me.Address.TabIndex = 19
  297.         Me.Address.Text = ""
  298.         '
  299.         'AddressLabel
  300.         '
  301.         Me.AddressLabel.Location = New System.Drawing.Point(9, 225)
  302.         Me.AddressLabel.Name = "AddressLabel"
  303.         Me.AddressLabel.Size = New System.Drawing.Size(99, 15)
  304.         Me.AddressLabel.TabIndex = 18
  305.         Me.AddressLabel.Text = "Address:"
  306.         '
  307.         'Country
  308.         '
  309.         Me.Country.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  310.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  311.         Me.Country.Location = New System.Drawing.Point(120, 294)
  312.         Me.Country.MaxLength = 2
  313.         Me.Country.Name = "Country"
  314.         Me.Country.Size = New System.Drawing.Size(264, 20)
  315.         Me.Country.TabIndex = 25
  316.         Me.Country.Text = ""
  317.         '
  318.         'CountryLabel
  319.         '
  320.         Me.CountryLabel.Location = New System.Drawing.Point(9, 297)
  321.         Me.CountryLabel.Name = "CountryLabel"
  322.         Me.CountryLabel.Size = New System.Drawing.Size(99, 15)
  323.         Me.CountryLabel.TabIndex = 24
  324.         Me.CountryLabel.Text = "Country:"
  325.         '
  326.         'State
  327.         '
  328.         Me.State.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  329.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  330.         Me.State.Location = New System.Drawing.Point(120, 270)
  331.         Me.State.MaxLength = 2
  332.         Me.State.Name = "State"
  333.         Me.State.Size = New System.Drawing.Size(264, 20)
  334.         Me.State.TabIndex = 23
  335.         Me.State.Text = ""
  336.         '
  337.         'StateLabel
  338.         '
  339.         Me.StateLabel.Location = New System.Drawing.Point(9, 273)
  340.         Me.StateLabel.Name = "StateLabel"
  341.         Me.StateLabel.Size = New System.Drawing.Size(99, 15)
  342.         Me.StateLabel.TabIndex = 22
  343.         Me.StateLabel.Text = "State:"
  344.         '
  345.         'IntersectingRoad
  346.         '
  347.         Me.IntersectingRoad.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  348.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  349.         Me.IntersectingRoad.Location = New System.Drawing.Point(120, 318)
  350.         Me.IntersectingRoad.Name = "IntersectingRoad"
  351.         Me.IntersectingRoad.Size = New System.Drawing.Size(264, 20)
  352.         Me.IntersectingRoad.TabIndex = 27
  353.         Me.IntersectingRoad.Text = ""
  354.         '
  355.         'IntersectingRoadLabel
  356.         '
  357.         Me.IntersectingRoadLabel.Location = New System.Drawing.Point(9, 321)
  358.         Me.IntersectingRoadLabel.Name = "IntersectingRoadLabel"
  359.         Me.IntersectingRoadLabel.Size = New System.Drawing.Size(99, 15)
  360.         Me.IntersectingRoadLabel.TabIndex = 26
  361.         Me.IntersectingRoadLabel.Text = "Intersecting Road:"
  362.         '
  363.         'TabControl
  364.         '
  365.         Me.TabControl.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
  366.                     Or System.Windows.Forms.AnchorStyles.Left) _
  367.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  368.         Me.TabControl.Controls.Add(Me.GeneralTab)
  369.         Me.TabControl.Location = New System.Drawing.Point(9, 9)
  370.         Me.TabControl.Name = "TabControl"
  371.         Me.TabControl.SelectedIndex = 0
  372.         Me.TabControl.Size = New System.Drawing.Size(405, 375)
  373.         Me.TabControl.TabIndex = 0
  374.         '
  375.         'GeneralTab
  376.         '
  377.         Me.GeneralTab.Controls.Add(Me.FacilityLabel)
  378.         Me.GeneralTab.Controls.Add(Me.Facility)
  379.         Me.GeneralTab.Controls.Add(Me.CountryLabel)
  380.         Me.GeneralTab.Controls.Add(Me.State)
  381.         Me.GeneralTab.Controls.Add(Me.StateLabel)
  382.         Me.GeneralTab.Controls.Add(Me.AddressLabel)
  383.         Me.GeneralTab.Controls.Add(Me.Address)
  384.         Me.GeneralTab.Controls.Add(Me.CityLabel)
  385.         Me.GeneralTab.Controls.Add(Me.City)
  386.         Me.GeneralTab.Controls.Add(Me.Country)
  387.         Me.GeneralTab.Controls.Add(Me.IntersectingRoad)
  388.         Me.GeneralTab.Controls.Add(Me.WaypointColorComboBox)
  389.         Me.GeneralTab.Controls.Add(Me.WaypointDisplayModeComboBox)
  390.         Me.GeneralTab.Controls.Add(Me.DisplayModeLabel)
  391.         Me.GeneralTab.Controls.Add(Me.WaypointNameLabel)
  392.         Me.GeneralTab.Controls.Add(Me.IntersectingRoadLabel)
  393.         Me.GeneralTab.Controls.Add(Me.PositionLabel)
  394.         Me.GeneralTab.Controls.Add(Me.Depth)
  395.         Me.GeneralTab.Controls.Add(Me.WaypointSymbolComboBox)
  396.         Me.GeneralTab.Controls.Add(Me.WaypointName)
  397.         Me.GeneralTab.Controls.Add(Me.Position)
  398.         Me.GeneralTab.Controls.Add(Me.Description)
  399.         Me.GeneralTab.Controls.Add(Me.AltitudeLabel)
  400.         Me.GeneralTab.Controls.Add(Me.DepthLabel)
  401.         Me.GeneralTab.Controls.Add(Me.SymbolLabel)
  402.         Me.GeneralTab.Controls.Add(Me.Altitude)
  403.         Me.GeneralTab.Controls.Add(Me.ColorLabel)
  404.         Me.GeneralTab.Controls.Add(Me.DescriptionLabel)
  405.         Me.GeneralTab.Location = New System.Drawing.Point(4, 22)
  406.         Me.GeneralTab.Name = "GeneralTab"
  407.         Me.GeneralTab.Size = New System.Drawing.Size(397, 349)
  408.         Me.GeneralTab.TabIndex = 0
  409.         Me.GeneralTab.Text = "General"
  410.         '
  411.         'FacilityLabel
  412.         '
  413.         Me.FacilityLabel.Location = New System.Drawing.Point(9, 201)
  414.         Me.FacilityLabel.Name = "FacilityLabel"
  415.         Me.FacilityLabel.Size = New System.Drawing.Size(99, 15)
  416.         Me.FacilityLabel.TabIndex = 16
  417.         Me.FacilityLabel.Text = "Facility Name:"
  418.         '
  419.         'Facility
  420.         '
  421.         Me.Facility.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
  422.                     Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
  423.         Me.Facility.Location = New System.Drawing.Point(120, 198)
  424.         Me.Facility.Name = "Facility"
  425.         Me.Facility.Size = New System.Drawing.Size(264, 20)
  426.         Me.Facility.TabIndex = 17
  427.         Me.Facility.Text = ""
  428.         '
  429.         'EditWaypointForm
  430.         '
  431.         Me.AcceptButton = Me.SaveButton
  432.         Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
  433.         Me.CancelButton = Me.btnCancelButton
  434.         Me.ClientSize = New System.Drawing.Size(423, 433)
  435.         Me.Controls.Add(Me.TabControl)
  436.         Me.Controls.Add(Me.btnCancelButton)
  437.         Me.Controls.Add(Me.SaveButton)
  438.         Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
  439.         Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
  440.         Me.MaximizeBox = False
  441.         Me.MinimizeBox = False
  442.         Me.Name = "EditWaypointForm"
  443.         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
  444.         Me.Text = "Edit Waypoint"
  445.         Me.TabControl.ResumeLayout(False)
  446.         Me.GeneralTab.ResumeLayout(False)
  447.         Me.ResumeLayout(False)
  448.  
  449.     End Sub
  450.  
  451. #End Region
  452.  
  453.     Private pWaypoint As Waypoint
  454.  
  455.     ' Returns/sets the waypoint being edited by this form
  456.     Public Property Waypoint() As Waypoint
  457.         Get
  458.             Return pWaypoint
  459.         End Get
  460.         Set(ByVal Value As Waypoint)
  461.             ' Remember the waypoint for editing later on
  462.             pWaypoint = Value
  463.  
  464.             ' Update the form with the values
  465.             WaypointName.Text = pWaypoint.Name
  466.             Position.Text = pWaypoint.ToString
  467.             Description.Text = pWaypoint.Description
  468.             Facility.Text = pWaypoint.Facility
  469.             Address.Text = pWaypoint.Address
  470.             City.Text = pWaypoint.City
  471.             State.Text = pWaypoint.State
  472.             Country.Text = pWaypoint.Country
  473.             IntersectingRoad.Text = pWaypoint.IntersectingRoad
  474.  
  475.             ' Update the altitude depth. Are we using the Imperial or Metric system?
  476.             If System.Globalization.RegionInfo.CurrentRegion.IsMetric Then
  477.                 ' Yes. Use meters
  478.                 Altitude.Text = pWaypoint.Altitude.ToMeters.ToString
  479.             Else
  480.                 ' No. Use feet
  481.                 Altitude.Text = pWaypoint.Altitude.ToFeet.ToString
  482.             End If
  483.  
  484.             ' Update the waypoint depth.  Are we using the Imperial or Metric system?
  485.             If System.Globalization.RegionInfo.CurrentRegion.IsMetric Then
  486.                 ' Yes. Use meters
  487.                 Depth.Text = pWaypoint.Depth.ToMeters.ToString
  488.             Else
  489.                 ' No. Use feet
  490.                 Depth.Text = pWaypoint.Depth.ToFeet.ToString
  491.             End If
  492.  
  493.             ' Populate the combo box with the list of available waypoint symbols
  494.             WaypointSymbolComboBox.Items.Clear()
  495.             WaypointSymbolComboBox.Items.AddRange(pWaypoint.Device.GetSymbols)
  496.  
  497.             ' Set the selected item to that of the waypoint
  498.             WaypointSymbolComboBox.SelectedIndex = WaypointSymbolComboBox.FindString(pWaypoint.Symbol.ToString)
  499.  
  500.             ' Populate the color combo box with the list of available waypoint symbols
  501.             WaypointColorComboBox.Items.Clear()
  502.             WaypointColorComboBox.Items.AddRange(pWaypoint.Device.GetColors)
  503.  
  504.             ' Set the selected item to that of the waypoint
  505.             WaypointColorComboBox.SelectedIndex = WaypointColorComboBox.FindString(pWaypoint.Color.ToString)
  506.  
  507.             ' Populate the display mode box with the list of available waypoint symbols
  508.             WaypointDisplayModeComboBox.Items.Clear()
  509.             WaypointDisplayModeComboBox.Items.AddRange(pWaypoint.Device.GetDisplayModes)
  510.  
  511.             ' Set the selected item to that of the waypoint
  512.             WaypointDisplayModeComboBox.SelectedIndex = WaypointDisplayModeComboBox.FindString(pWaypoint.DisplayMode.ToString)
  513.  
  514.             ' Now, enable/disable features based on the capabilities of the device
  515.             Description.Enabled = pWaypoint.Device.SupportsWaypointComment
  516.             Address.Enabled = pWaypoint.Device.SupportsWaypointAddress
  517.             WaypointSymbolComboBox.Enabled = pWaypoint.Device.SupportsWaypointSymbol
  518.             WaypointColorComboBox.Enabled = pWaypoint.Device.SupportsWaypointColor
  519.             WaypointDisplayModeComboBox.Enabled = pWaypoint.Device.SupportsWaypointDisplayMode
  520.             Facility.Enabled = pWaypoint.Device.SupportsWaypointFacility
  521.             Address.Enabled = pWaypoint.Device.SupportsWaypointAddress
  522.             City.Enabled = pWaypoint.Device.SupportsWaypointCity
  523.             State.Enabled = pWaypoint.Device.SupportsWaypointState
  524.             Country.Enabled = pWaypoint.Device.SupportsWaypointCountry
  525.             IntersectingRoad.Enabled = pWaypoint.Device.SupportsWaypointIntersectingRoad
  526.         End Set
  527.     End Property
  528.  
  529.     Private Sub SaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click
  530.         Try
  531.             ' Update the waypoint with values from the form
  532.             Waypoint.Name = Me.WaypointName.Text
  533.             ' Update the position
  534.             Dim NewPosition As Position = StormSource.Gps.Position.Parse(Position.Text)
  535.             Waypoint.Latitude = NewPosition.Latitude
  536.             Waypoint.Longitude = NewPosition.Longitude
  537.             ' Update the comment
  538.             Waypoint.Description = Me.Description.Text
  539.             ' Update the symbol
  540.             Waypoint.Symbol = System.Enum.Parse(GetType(WaypointSymbol), WaypointSymbolComboBox.Text)
  541.             ' Update the color
  542.             Waypoint.Color = System.Enum.Parse(GetType(WaypointColor), WaypointColorComboBox.Text)
  543.             ' Update the symbol
  544.             Waypoint.DisplayMode = System.Enum.Parse(GetType(WaypointDisplayMode), WaypointDisplayModeComboBox.Text)
  545.             ' Update the altitude
  546.             Dim NewAltitude As Distance = Distance.Parse(Me.Altitude.Text)
  547.             Waypoint.Altitude = NewAltitude
  548.             ' Update the depth
  549.             Dim NewDepth As Distance = Distance.Parse(Me.Depth.Text)
  550.             Waypoint.Depth = NewDepth
  551.             ' Update the facility
  552.             Waypoint.Facility = Me.Facility.Text
  553.             ' Update the address
  554.             Waypoint.Address = Me.Address.Text
  555.             Waypoint.City = Me.City.Text
  556.             Waypoint.State = Me.State.Text
  557.             Waypoint.Country = Me.Country.Text
  558.             ' Update the intersecting road/intersection
  559.             Waypoint.IntersectingRoad = Me.IntersectingRoad.Text
  560.         Catch ex As Exception
  561.             ' Some error occurred while try to update waypoint information
  562.             MessageBox.Show(ex.Message, "Form Information is Invalid", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
  563.             Exit Sub
  564.         End Try
  565.         Try
  566.             ' Save changes to this waypoint
  567.             Waypoint.Save()
  568.             ' Refresh the waypoints collection
  569.             Waypoint.Device.Receiver.Waypoints.Refresh()
  570.             ' Unload this form
  571.             Close()
  572.         Catch ex As Exception
  573.             ' Notify of the problem saving the waypoint
  574.             MessageBox.Show(ex.Message, "Unable to Save Waypoint", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
  575.             Exit Sub
  576.         End Try
  577.     End Sub
  578.  
  579.     ' Raised when editing of a waypoint has been cancelled
  580.     Private Sub CancelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancelButton.Click
  581.         Close()
  582.     End Sub
  583. End Class
  584.