'
' Copyright (c) 2016, MindFusion LLC - Bulgaria.
'


Public Class MainForm

    Public Sub New()

        InitializeComponent()

        Dim report As New CatalogReport()
        reportViewer.Report = report

    End Sub

    ' <summary>
    ' Handles the Click event of the Preview menu.
    ' </summary>
    Private Sub menuItemPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuItemPreview.Click

        Dim printer As New ReportPrinter()
        printer.Report = reportViewer.Report

        Dim options As New PreviewOptions()
        options.TitleBarIcon = Me.Icon

        Dim preview As New PrintPreviewForm()
        preview.Text = "Catalog Report (Preview)"
        preview.Document = printer
        preview.ShowDialog()

    End Sub

    ' <summary>
    ' Handles the Click event of the Exit menu.
    ' </summary>
    Private Sub menuItemExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menuItemExit.Click

        Me.Close()

    End Sub


End Class
