Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Globalization
Imports System.Windows.Forms


Namespace Bookmarks
 _
    Public Class BookmarksForm
        Inherits Form

        Public Sub New()
            InitializeComponent()
        End Sub 'New


        Private Sub MainForm_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
            pdfDocument.FilePath = "..\SupportFiles\Bookmarks.pdf"
        End Sub 'MainForm_Load


        Private Sub btnBrowse_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnBrowse.Click
            If ofd.ShowDialog() = DialogResult.OK Then
                txtPDFFile.Text = ofd.FileName
                pdfDocument.FilePath = ofd.FileName
            End If
        End Sub 'btnBrowse_Click


        Private Sub btnFirst_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnFirst.Click
            pdfPageView.GoToFirstPage()
        End Sub 'btnFirst_Click


        Private Sub btnPrev_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnPrev.Click
            pdfPageView.GoToPrevPage()
        End Sub 'btnPrev_Click


        Private Sub btnNext_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnNext.Click
            pdfPageView.GoToNextPage()
        End Sub 'btnNext_Click


        Private Sub btnLast_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnLast.Click
            pdfPageView.GoToLastPage()
        End Sub 'btnLast_Click


        Private Sub cbxZoom_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles cbxZoom.SelectedIndexChanged
            pdfPageView.Zoom = Single.Parse(cbxZoom.Text, CultureInfo.InvariantCulture)
        End Sub 'cbxZoom_SelectedIndexChanged
    End Class 'MainForm
End Namespace 'O2S.Samples.PDFView4NET.Bookmarks
