Ejemplo n.º 1
0
        private void VerifyOptions()
        {
            // extensoes
            string extFile = chkFilterJPG.Checked ? chkFilterJPG.Tag.ToString() : string.Empty;

            extFile += chkFilterPNG.Checked ? (!extFile.Equals(string.Empty) ? ";" : "") + chkFilterPNG.Tag.ToString() : string.Empty;

            // diretorio output
            string dirOutput = "%DIR_ORIGEM%";

            if (chkOutputFolder.Checked)
            {
                dirOutput = txtOutputFolder.Text;
            }
            else if (File.Exists(txtInputPath.Text))
            {
                dirOutput = Path.GetDirectoryName(txtInputPath.Text + @"\");
            }


            _userOp = new UserOptions
            {
                SeekRecursively     = chkSeekRecursively.Checked,
                SeekImageExtensions = extFile,
                InputFullPath       = txtInputPath.Text,
                OutputDirectory     = dirOutput,
                OutputType          = true switch
                {
                    true when rdbOutputCbz.Checked => GenerateImages.EOutputType.Cbz,
                                           true when rdbOutputPdf.Checked => GenerateImages.EOutputType.Pdf,
                                           true when rdbOutputCopy.Checked => GenerateImages.EOutputType.Copy,
                                           true when rdbOutputReplace.Checked&& chkSaveBackup.Checked => GenerateImages.EOutputType.ReplaceWithBackup,
                                           true when rdbOutputReplace.Checked => GenerateImages.EOutputType.Replace,
                                           _ => GenerateImages.EOutputType.None,
                },
Ejemplo n.º 2
0
 public Form1()
 {
     InitializeComponent();
     _userOp = new();
 }