using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Data;
using VBNET = Microsoft.VisualBasic;
using Microsoft.VisualBasic.CompilerServices;
using System.Linq;
using System.Collections.Generic;

namespace VBSCAN
{
   public partial class frmOptions : System.Windows.Forms.Form
   {
      private bool _disposed = false;
      public frmOptions()
      {
         if(m_vb6FormDefInstance == null)
         {
            m_vb6FormDefInstance = this;
         }
         //
         // Required for Windows Form Designer support
         //
         InitializeComponent();

         //
         // TODO: Add any constructor code after InitializeComponent call
         //
         if (DesignMode) return;
         Form_Load(null, null);
      }

      /// <summary>
      /// Clean up any resources being used.
      /// </summary>
      /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
      protected override void Dispose(bool disposing)
      {
         if (_disposed)
         {
            return;
         }
         if (disposing)
         {
            if (components != null)
            {
               components.Dispose();
            }
         }
         _disposed = true;
         base.Dispose(disposing);
      }

      private void cmdCancel_Click(object sender, EventArgs e)
      {
         this.Close();
      }
      private void cmdDocFile_Click(object sender, EventArgs e)
      {

         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 != "")
         {
            txtDocFile.Text = CMD1.FileName;
         }

      }
      private void cmdOK_Click(object sender, EventArgs e)
      {
         modVBSCAN.gsDocComment = txtDocComment.Text;
         modVBSCAN.gsDocFile = txtDocFile.Text;
         modVBSCAN.gsDocType = "HTML";
         this.Close();
      }
      private void Form_Load(object sender, EventArgs e)
      {

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

         this.SetBounds((System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - this.Width) / 2,(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - this.Height) / 2,0,0,BoundsSpecified.X | BoundsSpecified.Y);
      }
   }
}
