Beispiel #1
0
        public Form1()
        {
            InitializeComponent();


            doubleBuffer1.MouseWheel += DoubleBuffer1_MouseWheel;

            _lastInstalledVersion = GhostscriptVersionInfo.GetLastInstalledVersion();


            BaseForm.ApplicationIcon = this.Icon;
            fileFieldAndBrowser1.RecentFileRegistry = "RecentInput";

            toolStripTextBoxWithLabelDPI.LabelText = "DPI";
            int dpi = RegistryAccess.Int_FromRegistry(_regDPI);

            if (dpi == 0)
            {
                dpi = 100;
            }
            if (dpi < 10)
            {
                dpi = 10;
            }
            toolStripTextBoxWithLabelDPI.TextBoxText = dpi.ToString();
            overwriteToolStripMenuItem.Checked       = RegistryAccess.Boolean_FromRegistry(_regOVW);
            oneFilePerPageToolStripMenuItem.Checked  = RegistryAccess.Boolean_FromRegistry(_regMulti);
            checkBoxPAGES.Checked = RegistryAccess.Boolean_FromRegistry(_regAllPage);
            textBoxPAGES.Text     = RegistryAccess.LoadEntryValue_FromRegistry(_regRangePage);
            checkBoxPAGES_CheckStateChanged(null, null);

            string tmpSiz = RegistryAccess.LoadEntryValue_FromRegistry(_regPreviewSize);

            smallToolStripMenuItem.Checked = true;// default
            if (tmpSiz == "medium")
            {
                mediumToolStripMenuItem.Checked = true;
            }
            if (tmpSiz == "large")
            {
                largeToolStripMenuItem.Checked = true;
            }

            string tmpExt = RegistryAccess.LoadEntryValue_FromRegistry(_regFormat);

            pNGToolStripMenuItem.Checked = true;//default
            if (tmpExt != null)
            {
                switch (tmpExt)
                {
                case ".tif":
                    tIFFToolStripMenuItem.Checked = true;
                    break;

                case ".jpg":
                    jPGToolStripMenuItem.Checked = true;
                    break;

                case ".bmp":
                    bMPToolStripMenuItem.Checked = true;
                    break;

                case ".png":
                    pNGToolStripMenuItem.Checked = true;
                    break;

                case ".gif":
                    gIFToolStripMenuItem.Checked = true;
                    break;
                }
            }

            //  this.Text = ApplicationSetup.GetFormattedTitleText(null);
        }