Imports Stax

Public Class GoToFrameForm
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "
    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

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

    '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 Label1 As System.Windows.Forms.Label
    Friend WithEvents bCancel As System.Windows.Forms.Button
    Friend WithEvents bOK As System.Windows.Forms.Button
    Friend WithEvents SmartTagProvider As Stax.UI.Design.SmartTagProvider
    Friend WithEvents cbValue As System.Windows.Forms.ComboBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.Label1 = New System.Windows.Forms.Label
        Me.cbValue = New System.Windows.Forms.ComboBox
        Me.bCancel = New System.Windows.Forms.Button
        Me.bOK = New System.Windows.Forms.Button
        Me.SmartTagProvider = New Stax.UI.Design.SmartTagProvider
        Me.SuspendLayout()
        '
        'Label1
        '
        Me.Label1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.Label1.Location = New System.Drawing.Point(10, 8)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(244, 16)
        Me.Label1.TabIndex = 0
        Me.Label1.Text = "Frame number or time:"
        Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'cbValue
        '
        Me.cbValue.FormattingEnabled = True
        Me.cbValue.Location = New System.Drawing.Point(12, 24)
        Me.cbValue.Name = "cbValue"
        Me.cbValue.Size = New System.Drawing.Size(242, 21)
        Me.cbValue.TabIndex = 1
        '
        'bCancel
        '
        Me.bCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.bCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.bCancel.Location = New System.Drawing.Point(179, 52)
        Me.bCancel.Name = "bCancel"
        Me.bCancel.Size = New System.Drawing.Size(75, 24)
        Me.bCancel.TabIndex = 2
        Me.bCancel.Text = "Cancel"
        '
        'bOK
        '
        Me.bOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.bOK.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.bOK.Location = New System.Drawing.Point(98, 52)
        Me.bOK.Name = "bOK"
        Me.bOK.Size = New System.Drawing.Size(75, 24)
        Me.bOK.TabIndex = 3
        Me.bOK.Text = "OK"
        '
        'GoToFrameForm
        '
        Me.AcceptButton = Me.bOK
        Me.CancelButton = Me.bCancel
        Me.ClientSize = New System.Drawing.Size(266, 88)
        Me.Controls.Add(Me.bOK)
        Me.Controls.Add(Me.bCancel)
        Me.Controls.Add(Me.cbValue)
        Me.Controls.Add(Me.Label1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "GoToFrameForm"
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
        Me.Text = "Go To Frame"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Public Sub New()
        MyBase.New()
        InitializeComponent()
        cbValue.Items.AddRange(s.RecentFramePositions.ToArray)
    End Sub

    Private Sub bCancel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bCancel.Click
        Close()
    End Sub

    Private Sub bOK_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bOK.Click
        Misc.UpdateMostRecentList(s.RecentFramePositions, cbValue.Text, 9)
    End Sub
End Class