Option Explicit On
Imports System.Linq
Imports System.Collections.Generic
Namespace VBSCAN
   Public Class frmOptions : Inherits System.Windows.Forms.Form
      Private Dim _disposed As Boolean = False
      <System.Diagnostics.DebuggerNonUserCode()> _
      Public Sub New()
         MyBase.New()
         'This call is required by the Windows Form Designer.
         InitializeComponent()
         'Add any initialization after the InitializeComponent() call
         If m_vb6FormDefInstance Is Nothing Then
            If m_InitializingDefInstance Then
               m_vb6FormDefInstance = Me
            Else
               Try
                  'For the start-up form, the first instance created is the default instance.
                  If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
                     m_vb6FormDefInstance = Me
                  End If
               Catch
               End Try
            End If
         End If
         If (DesignMode) Then Exit Sub
         Form_Load(Nothing, Nothing)

      End Sub
      'Form overrides dispose to clean up the component list.
      <System.Diagnostics.DebuggerNonUserCode()> _
      Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
         If _disposed Then
            Return
         End If
         If Disposing Then
            If Not components Is Nothing Then
               components.Dispose()
            End If
         End If
         _disposed = True
         MyBase.Dispose(Disposing)
      End Sub
      Private Sub cmdCancel_Click(ByVal sender As Object, ByVal e As EventArgs)
         Me.Close()
      End Sub
      Private Sub cmdDocFile_Click(ByVal sender As Object, ByVal e As EventArgs)

         CMD1.Filter = "Output Files|*.htm"
         CMD1.DialogTitle = "Select Output File"
         CMD1.FilterIndex = 1
         CMD1.FileName = txtDocFile.Text
         CMD1.CancelError = False
         CMD1.ShowSave()
         If (CMD1.FileName <> "") Then
            txtDocFile.Text = CMD1.FileName
         End If

      End Sub
      Private Sub cmdOK_Click(ByVal sender As Object, ByVal e As EventArgs)
         modVBSCAN.gsDocComment = txtDocComment.Text
         modVBSCAN.gsDocFile = txtDocFile.Text
         modVBSCAN.gsDocType = "HTML"
         Me.Close()
      End Sub
      Private Sub Form_Load(ByVal sender As Object, ByVal e As EventArgs)

         txtDocComment.Text = modVBSCAN.gsDocComment
         txtDocFile.Text = modVBSCAN.gsDocFile

         Me.SetBounds((System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2,(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - Me.Height) / 2,0,0,BoundsSpecified.X Or BoundsSpecified.Y)
      End Sub
   End Class
End Namespace
