Example #1
0
        public void Init(ScreenShotImageConverter cf, string inputfolder, ScreenShotConverter.InputTypes it, string outputfolder)
        {
            comboBoxOutputAs.Items.AddRange(Enum.GetNames(typeof(ScreenShotImageConverter.OutputTypes)));
            comboBoxOutputAs.SelectedIndex = (int)cf.OutputFileExtension;
            comboBoxScanFor.Items.AddRange(Enum.GetNames(typeof(ScreenShotConverter.InputTypes)));
            comboBoxScanFor.SelectedIndex = (int)it;
            initialssfolder       = textBoxScreenshotsDir.Text = inputfolder;
            textBoxOutputDir.Text = outputfolder;
            comboBoxSubFolder.Items.AddRange(ScreenShotImageConverter.SubFolderSelections);
            comboBoxSubFolder.SelectedIndex = cf.FolderNameFormat;
            comboBoxFileNameFormat.Items.AddRange(ScreenShotImageConverter.FileNameFormats);
            comboBoxFileNameFormat.SelectedIndex = cf.FileNameFormat;
            string[] opt = new string[] { "Off", "Crop", "Resize" };
            extComboBoxConvert1.Items.AddRange(opt);
            extComboBoxConvert2.Items.AddRange(opt);

            extCheckBoxHiRes.Checked    = cf.HighRes;
            extCheckBoxCopyClip.Checked = cf.CopyToClipboard;

            extComboBoxConvert1.SelectedIndex = (int)cf.CropResizeImage1;
            extComboBoxConvert2.SelectedIndex = (int)cf.CropResizeImage2;

            extCheckBoxRemoveOriginal.Checked           = cf.RemoveOriginal;
            extCheckBoxKeepMasterConvertedImage.Checked = cf.KeepMasterConvertedImage;

            numericUpDownTop1.Value    = cf.CropResizeArea1.Top;
            numericUpDownLeft1.Value   = cf.CropResizeArea1.Left;
            numericUpDownWidth1.Value  = cf.CropResizeArea1.Width;
            numericUpDownHeight1.Value = cf.CropResizeArea1.Height;

            extNumericUpDownTop2.Value    = cf.CropResizeArea2.Top;
            extNumericUpDownLeft2.Value   = cf.CropResizeArea2.Left;
            extNumericUpDownWidth2.Value  = cf.CropResizeArea2.Width;
            extNumericUpDownHeight2.Value = cf.CropResizeArea2.Height;

            SetNumEnabled();

            extComboBoxConvert1.SelectedIndexChanged += (s, e) => { SetNumEnabled(); };
            extComboBoxConvert2.SelectedIndexChanged += (s, e) => { SetNumEnabled(); };

            textBoxFileNameExample.Text = ScreenShotImageConverter.CreateFileName("Sol", "Earth", "HighResScreenshot_0000.bmp", comboBoxFileNameFormat.SelectedIndex, extCheckBoxHiRes.Checked, DateTime.Now);

            BaseUtils.Translator.Instance.Translate(this);

            label_index.Text = this.Text;
        }
 private void UpdateExample()
 {
     textBoxFileNameExample.Text = Path.Combine(ScreenShotImageConverter.SubFolder(comboBoxSubFolder.SelectedIndex, OutputFolder, "Sol", "Jameson", DateTime.Now),
                                                ScreenShotImageConverter.CreateFileName("Sol", "Earth", "HighResScreenshot_0000.bmp", comboBoxFileNameFormat.SelectedIndex, extCheckBoxHiRes.Checked, DateTime.Now) + "." + comboBoxOutputAs.Text);
 }
Example #3
0
 private void extCheckBoxHiRes_CheckedChanged(object sender, EventArgs e)
 {
     textBoxFileNameExample.Text = ScreenShotImageConverter.CreateFileName("Sol", "Earth", "HighResScreenshot_0000.bmp", comboBoxFileNameFormat.SelectedIndex, extCheckBoxHiRes.Checked, DateTime.Now);
 }