Option Explicit On 
Option Strict On

Public Class frmPlanner
  Inherits System.Windows.Forms.Form


#Region " Windows Form Designer generated code "

  Public Sub New()
    MyBase.New()

    'This call is required by the Windows Form Designer.
    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)
    If disposing Then
      If Not (components Is Nothing) Then
        components.Dispose()
      End If
    End If
    MyBase.Dispose(disposing)
  End Sub
  Friend WithEvents lstCities As System.Windows.Forms.ListBox
  Friend WithEvents cboSeat As System.Windows.Forms.ComboBox
  Friend WithEvents cboMeal As System.Windows.Forms.ComboBox
  Friend WithEvents btnAssign As System.Windows.Forms.Button
  Friend WithEvents btnExit As System.Windows.Forms.Button
  Friend WithEvents Label1 As System.Windows.Forms.Label
  Friend WithEvents Label2 As System.Windows.Forms.Label
  Friend WithEvents Label3 As System.Windows.Forms.Label

  'Required by the Windows Form Designer
  Private components As System.ComponentModel.Container

  '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.
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    Me.btnExit = New System.Windows.Forms.Button()
    Me.btnAssign = New System.Windows.Forms.Button()
    Me.Label1 = New System.Windows.Forms.Label()
    Me.Label2 = New System.Windows.Forms.Label()
    Me.Label3 = New System.Windows.Forms.Label()
    Me.cboMeal = New System.Windows.Forms.ComboBox()
    Me.cboSeat = New System.Windows.Forms.ComboBox()
    Me.lstCities = New System.Windows.Forms.ListBox()
    Me.SuspendLayout()
    '
    'btnExit
    '
    Me.btnExit.Location = New System.Drawing.Point(232, 224)
    Me.btnExit.Name = "btnExit"
    Me.btnExit.TabIndex = 4
    Me.btnExit.Text = "E&xit"
    '
    'btnAssign
    '
    Me.btnAssign.Location = New System.Drawing.Point(136, 224)
    Me.btnAssign.Name = "btnAssign"
    Me.btnAssign.TabIndex = 3
    Me.btnAssign.Text = "&Assign"
    '
    'Label1
    '
    Me.Label1.Location = New System.Drawing.Point(8, 8)
    Me.Label1.Name = "Label1"
    Me.Label1.Size = New System.Drawing.Size(144, 16)
    Me.Label1.TabIndex = 5
    Me.Label1.Text = "Destination Cities"
    '
    'Label2
    '
    Me.Label2.Location = New System.Drawing.Point(160, 8)
    Me.Label2.Name = "Label2"
    Me.Label2.Size = New System.Drawing.Size(120, 16)
    Me.Label2.TabIndex = 5
    Me.Label2.Text = "Seat Location"
    '
    'Label3
    '
    Me.Label3.Location = New System.Drawing.Point(296, 8)
    Me.Label3.Name = "Label3"
    Me.Label3.Size = New System.Drawing.Size(120, 16)
    Me.Label3.TabIndex = 5
    Me.Label3.Text = "Meal Preference"
    '
    'cboMeal
    '
    Me.cboMeal.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple
    Me.cboMeal.DropDownWidth = 121
    Me.cboMeal.Location = New System.Drawing.Point(296, 32)
    Me.cboMeal.Name = "cboMeal"
    Me.cboMeal.Size = New System.Drawing.Size(121, 150)
    Me.cboMeal.TabIndex = 2
    '
    'cboSeat
    '
    Me.cboSeat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
    Me.cboSeat.DropDownWidth = 121
    Me.cboSeat.Location = New System.Drawing.Point(160, 32)
    Me.cboSeat.Name = "cboSeat"
    Me.cboSeat.Size = New System.Drawing.Size(121, 21)
    Me.cboSeat.TabIndex = 6
    '
    'lstCities
    '
    Me.lstCities.Items.AddRange(New Object() {"ListBox1"})
    Me.lstCities.Location = New System.Drawing.Point(8, 32)
    Me.lstCities.Name = "lstCities"
    Me.lstCities.Size = New System.Drawing.Size(144, 173)
    Me.lstCities.Sorted = True
    Me.lstCities.TabIndex = 0
    '
    'frmPlanner
    '
    Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    Me.ClientSize = New System.Drawing.Size(430, 283)
    Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cboSeat, Me.Label3, Me.Label2, Me.Label1, Me.btnExit, Me.btnAssign, Me.cboMeal, Me.lstCities})
    Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
    Me.Name = "frmPlanner"
    Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
    Me.Text = "Flight Planner"
    Me.ResumeLayout(False)

  End Sub

#End Region

  

  Private Sub btnAssign_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAssign.Click
    'Build message box that gives your assignment
    Dim Message As String
    Message = "Destination: " + lstCities.Text + ControlChars.Cr
        Message += "Seat Location: " + cboSeat.Text + ControlChars.Cr
    Message += "Meal: " + cboMeal.Text + ControlChars.Cr
    MessageBox.Show(Message, "Your Assignment", MessageBoxButtons.OK, MessageBoxIcon.Information)
  End Sub

  Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    Me.Close()
  End Sub

  Private Sub frmPlanner_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    'Add city names to list box
    lstCities.Items.Clear()
    lstCities.Items.Add("San Diego")
    lstCities.Items.Add("Los Angeles")
    lstCities.Items.Add("Orange County")
    lstCities.Items.Add("Ontario")
    lstCities.Items.Add("Bakersfield")
    lstCities.Items.Add("Oakland")
    lstCities.Items.Add("Sacramento")
    lstCities.Items.Add("San Jose")
    lstCities.Items.Add("San Francisco")
    lstCities.Items.Add("Eureka")
    lstCities.Items.Add("Eugene")
    lstCities.Items.Add("Portland")
    lstCities.Items.Add("Spokane")
    lstCities.Items.Add("Seattle")
    lstCities.SelectedIndex = 0
    'Add seat types to first combo box
    cboSeat.Items.Add("Aisle")
    cboSeat.Items.Add("Middle")
    cboSeat.Items.Add("Window")
    cboSeat.SelectedIndex = 0
    'Add meal types to second combo box
    cboMeal.Items.Add("Chicken")
    cboMeal.Items.Add("Mystery Meat")
    cboMeal.Items.Add("Kosher")
    cboMeal.Items.Add("Vegetarian")
    cboMeal.Items.Add("Fruit Plate")
    cboMeal.Text = "No Preference"
  End Sub
End Class
