diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs index 9f4c025..1d16419 100644 --- a/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -42,6 +42,8 @@ private void InitializeComponent() this.progressFiltered_label = new System.Windows.Forms.Label(); this.progress_label = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); + this.button1 = new System.Windows.Forms.Button(); + this.profilesMainTab_listBox = new System.Windows.Forms.ListBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.overwriteMode_comboBox = new System.Windows.Forms.ComboBox(); this.runAll_button = new System.Windows.Forms.Button(); @@ -55,13 +57,13 @@ private void InitializeComponent() this.zoomImageBox = new Cyotek.Windows.Forms.ImageBox(); this.previewImageBox = new Cyotek.Windows.Forms.ImageBox(); this.previewModels_comboBox = new System.Windows.Forms.ComboBox(); - this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.previewUpdate_button = new System.Windows.Forms.Button(); - this.previewSave_button = new System.Windows.Forms.Button(); this.preview_progressBar = new System.Windows.Forms.ProgressBar(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.miniMapImageBox = new Cyotek.Windows.Forms.ImageBox(); this.imageSizeToolStripStatusLabel = new System.Windows.Forms.Label(); + this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel(); + this.previewUpdate_button = new System.Windows.Forms.Button(); + this.previewSave_button = new System.Windows.Forms.Button(); this.toolStrip = new System.Windows.Forms.ToolStrip(); this.openFromFileToolStripButton = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); @@ -71,32 +73,69 @@ private void InitializeComponent() this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.zoomLevelsToolStripComboBox = new System.Windows.Forms.ToolStripComboBox(); this.settings_tabPage = new System.Windows.Forms.TabPage(); - this.useBasicSR_checkBox = new System.Windows.Forms.CheckBox(); + this.deleteProfile_button = new System.Windows.Forms.Button(); + this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.ignoreAlpha_checkBox = new System.Windows.Forms.CheckBox(); + this.imagePostprocess_groupBox = new System.Windows.Forms.GroupBox(); + this.label22 = new System.Windows.Forms.Label(); + this.threshold_groupBox = new System.Windows.Forms.GroupBox(); + this.thresholdBlack_numericUpDown = new System.Windows.Forms.NumericUpDown(); + this.label13 = new System.Windows.Forms.Label(); + this.thresholdEnabled_checkBox = new System.Windows.Forms.CheckBox(); + this.label12 = new System.Windows.Forms.Label(); + this.thresholdWhite_numericUpDown = new System.Windows.Forms.NumericUpDown(); + this.label21 = new System.Windows.Forms.Label(); + this.resizeImageAfterFilterType_comboBox = new System.Windows.Forms.ComboBox(); + this.resizeImageAfterScaleFactor_comboBox = new System.Windows.Forms.ComboBox(); + this.imagePreprocess_groupBox = new System.Windows.Forms.GroupBox(); + this.label20 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.resizeImageBeforeScaleFactor_comboBox = new System.Windows.Forms.ComboBox(); + this.resizeImageBeforeFilterType_comboBox = new System.Windows.Forms.ComboBox(); + this.noiseReductionType_comboBox = new System.Windows.Forms.ComboBox(); this.outputFormat_comboBox = new System.Windows.Forms.ComboBox(); + this.ignoreSingleColorAlpha_checkBox = new System.Windows.Forms.CheckBox(); + this.balanceAlphas_checkBox = new System.Windows.Forms.CheckBox(); + this.splitRGB_checkBox = new System.Windows.Forms.CheckBox(); + this.profileModel_comboBox = new System.Windows.Forms.ComboBox(); + this.useProfileModel_checkBox = new System.Windows.Forms.CheckBox(); this.modelForAlpha_comboBox = new System.Windows.Forms.ComboBox(); + this.useDifferentModelForAlpha_checkBox = new System.Windows.Forms.CheckBox(); + this.seamlessTextures_checkBox = new System.Windows.Forms.CheckBox(); + this.preserveFormat_checkBox = new System.Windows.Forms.CheckBox(); + this.label23 = new System.Windows.Forms.Label(); + this.saveProfileName_textBox = new System.Windows.Forms.TextBox(); + this.useBasicSR_checkBox = new System.Windows.Forms.CheckBox(); + this.modelsPath_textBox = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.saveProfile_button = new System.Windows.Forms.Button(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.appCoreVersion_linkLabel = new System.Windows.Forms.LinkLabel(); this.appVersion_label = new System.Windows.Forms.LinkLabel(); this.checkForUpdates_checkBox = new System.Windows.Forms.CheckBox(); + this.profiles_listBox = new System.Windows.Forms.ListBox(); + this.label7 = new System.Windows.Forms.Label(); + this.loadProfile_button = new System.Windows.Forms.Button(); + this.topMost_checkBox = new System.Windows.Forms.CheckBox(); this.deleteResults_checkBox = new System.Windows.Forms.CheckBox(); + this.outputPath_textBox = new System.Windows.Forms.TextBox(); this.label9 = new System.Windows.Forms.Label(); + this.inputPath_textBox = new System.Windows.Forms.TextBox(); this.maxTileHeight_numericUpDown = new System.Windows.Forms.NumericUpDown(); + this.changeModelsPath_button = new System.Windows.Forms.Button(); this.maxTileWidth_numericUpDown = new System.Windows.Forms.NumericUpDown(); + this.advancedUseSuffix_checkBox = new System.Windows.Forms.CheckBox(); this.createMemoryImage_checkBox = new System.Windows.Forms.CheckBox(); + this.changeInputPath_button = new System.Windows.Forms.Button(); this.useCPU_checkBox = new System.Windows.Forms.CheckBox(); - this.seamlessTextures_checkBox = new System.Windows.Forms.CheckBox(); - this.preserveFormat_checkBox = new System.Windows.Forms.CheckBox(); + this.changeOutputPath_button = new System.Windows.Forms.Button(); + this.advancedSuffix_textBox = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); this.changeInputImgPath_button = new System.Windows.Forms.Button(); this.changeMergedResultsPath_button = new System.Windows.Forms.Button(); this.changeEsrganPath_button = new System.Windows.Forms.Button(); - this.debugUpscale_checkBox = new System.Windows.Forms.CheckBox(); - this.useDifferentModelForAlpha_checkBox = new System.Windows.Forms.CheckBox(); - this.splitRGB_checkBox = new System.Windows.Forms.CheckBox(); this.preciseTile_checkBox = new System.Windows.Forms.CheckBox(); - this.balanceAlphas_checkBox = new System.Windows.Forms.CheckBox(); - this.ignoreSingleColorAlpha_checkBox = new System.Windows.Forms.CheckBox(); - this.ignoreAlpha_checkBox = new System.Windows.Forms.CheckBox(); - this.label23 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.overlapSize_numericUpDown = new System.Windows.Forms.NumericUpDown(); this.label5 = new System.Windows.Forms.Label(); @@ -106,6 +145,12 @@ private void InitializeComponent() this.label3 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.settingsOutputFormat_tabPage = new System.Windows.Forms.TabPage(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.button2 = new System.Windows.Forms.Button(); + this.label32 = new System.Windows.Forms.Label(); + this.label33 = new System.Windows.Forms.Label(); + this.button3 = new System.Windows.Forms.Button(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.webpLossless_checkBox = new System.Windows.Forms.CheckBox(); this.webpQuality_numericUpDown = new System.Windows.Forms.NumericUpDown(); @@ -129,32 +174,21 @@ private void InitializeComponent() this.ddsFileFormat_comboBox = new System.Windows.Forms.ComboBox(); this.ddsTextureType_comboBox = new System.Windows.Forms.ComboBox(); this.advanced_tabPage = new System.Windows.Forms.TabPage(); - this.imagePostprocess_groupBox = new System.Windows.Forms.GroupBox(); - this.label22 = new System.Windows.Forms.Label(); - this.threshold_groupBox = new System.Windows.Forms.GroupBox(); - this.thresholdBlack_numericUpDown = new System.Windows.Forms.NumericUpDown(); - this.label13 = new System.Windows.Forms.Label(); - this.thresholdEnabled_checkBox = new System.Windows.Forms.CheckBox(); - this.label12 = new System.Windows.Forms.Label(); - this.thresholdWhite_numericUpDown = new System.Windows.Forms.NumericUpDown(); - this.label21 = new System.Windows.Forms.Label(); - this.resizeImageAfterFilterType_comboBox = new System.Windows.Forms.ComboBox(); - this.resizeImageAfterScaleFactor_comboBox = new System.Windows.Forms.ComboBox(); - this.imagePreprocess_groupBox = new System.Windows.Forms.GroupBox(); - this.label20 = new System.Windows.Forms.Label(); - this.label19 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.resizeImageBeforeScaleFactor_comboBox = new System.Windows.Forms.ComboBox(); - this.resizeImageBeforeFilterType_comboBox = new System.Windows.Forms.ComboBox(); - this.noiseReductionType_comboBox = new System.Windows.Forms.ComboBox(); - this.changeModelsPath_button = new System.Windows.Forms.Button(); - this.upscaleSize_groupBox = new System.Windows.Forms.GroupBox(); - this.x1_radioButton = new System.Windows.Forms.RadioButton(); - this.x2_radioButton = new System.Windows.Forms.RadioButton(); - this.x4_radioButton = new System.Windows.Forms.RadioButton(); - this.changeOutputPath_button = new System.Windows.Forms.Button(); + this.disableRuleSystem_checkBox = new System.Windows.Forms.CheckBox(); + this.rules_groupBox = new System.Windows.Forms.GroupBox(); + this.rulePriority_numericUpDown = new System.Windows.Forms.NumericUpDown(); + this.deleteRule_button = new System.Windows.Forms.Button(); + this.rules_listBox = new System.Windows.Forms.ListBox(); + this.newRuleName_textBox = new System.Windows.Forms.TextBox(); + this.ruleProfiles_comboBox = new System.Windows.Forms.ComboBox(); + this.ruleFilters_comboBox = new System.Windows.Forms.ComboBox(); + this.saveRuleFromCurrent_button = new System.Windows.Forms.Button(); + this.saveRule_button = new System.Windows.Forms.Button(); + this.loadRule_button = new System.Windows.Forms.Button(); this.filters_groupBox = new System.Windows.Forms.GroupBox(); + this.deleteFilter_button = new System.Windows.Forms.Button(); this.filterExtensions_checkedListBox = new System.Windows.Forms.CheckedListBox(); + this.newFilterName_textBox = new System.Windows.Forms.TextBox(); this.filtersSize_groupBox = new System.Windows.Forms.GroupBox(); this.filtersSizeOn_checkBox = new System.Windows.Forms.CheckBox(); this.filterSizeWidth_numericUpDown = new System.Windows.Forms.NumericUpDown(); @@ -162,24 +196,24 @@ private void InitializeComponent() this.label11 = new System.Windows.Forms.Label(); this.filterSizeOr_checkBox = new System.Windows.Forms.CheckBox(); this.label10 = new System.Windows.Forms.Label(); + this.saveFilter_button = new System.Windows.Forms.Button(); + this.groupBox10 = new System.Windows.Forms.GroupBox(); + this.filterFolderNameCaseSensitive_checkBox = new System.Windows.Forms.CheckBox(); + this.filterFolderNameContains_checkBox = new System.Windows.Forms.CheckBox(); + this.filterFolderNameContains_textBox = new System.Windows.Forms.TextBox(); + this.filterFolderNameNotContains_checkBox = new System.Windows.Forms.CheckBox(); + this.filterFolderNameNotContains_textBox = new System.Windows.Forms.TextBox(); this.filtersFilename_groupBox = new System.Windows.Forms.GroupBox(); this.filterFilenameCaseSensitive_checkBox = new System.Windows.Forms.CheckBox(); this.filterFilenameContains_checkBox = new System.Windows.Forms.CheckBox(); this.filterFilenameContains_textBox = new System.Windows.Forms.TextBox(); this.filterFilenameNotContains_checkBox = new System.Windows.Forms.CheckBox(); this.filterFilenameNotContains_textBox = new System.Windows.Forms.TextBox(); + this.loadFilter_button = new System.Windows.Forms.Button(); this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.filters_listBox = new System.Windows.Forms.ListBox(); this.filtersAlpha_groupBox = new System.Windows.Forms.GroupBox(); this.filterAlpha_comboBox = new System.Windows.Forms.ComboBox(); - this.label8 = new System.Windows.Forms.Label(); - this.advancedSuffix_textBox = new System.Windows.Forms.TextBox(); - this.changeInputPath_button = new System.Windows.Forms.Button(); - this.advancedUseSuffix_checkBox = new System.Windows.Forms.CheckBox(); - this.inputPath_textBox = new System.Windows.Forms.TextBox(); - this.outputPath_textBox = new System.Windows.Forms.TextBox(); - this.modelsPath_textBox = new System.Windows.Forms.TextBox(); - this.label7 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); this.interpolation_tabPage = new System.Windows.Forms.TabPage(); this.modelInterpolationAlpha_trackBar = new System.Windows.Forms.TrackBar(); this.interpolationOutputModelName_textBox = new System.Windows.Forms.TextBox(); @@ -193,9 +227,11 @@ private void InitializeComponent() this.groupBox4 = new System.Windows.Forms.GroupBox(); this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel(); this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.imageBName_label = new System.Windows.Forms.Label(); this.imageB_panel = new System.Windows.Forms.Panel(); this.imageB_pictureBox = new System.Windows.Forms.PictureBox(); this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.imageAName_label = new System.Windows.Forms.Label(); this.imageA_panel = new System.Windows.Forms.Panel(); this.imageA_pictureBox = new System.Windows.Forms.PictureBox(); this.overlayResultName_textBox = new System.Windows.Forms.TextBox(); @@ -231,16 +267,19 @@ private void InitializeComponent() this.splitContainer1.SuspendLayout(); this.previewResult_tabPage.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); - this.splitContainer2.Panel1.SuspendLayout(); - this.splitContainer2.Panel2.SuspendLayout(); - this.splitContainer2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); this.splitContainer3.Panel1.SuspendLayout(); this.splitContainer3.Panel2.SuspendLayout(); this.splitContainer3.SuspendLayout(); + this.tableLayoutPanel6.SuspendLayout(); this.toolStrip.SuspendLayout(); this.settings_tabPage.SuspendLayout(); + this.groupBox9.SuspendLayout(); + this.imagePostprocess_groupBox.SuspendLayout(); + this.threshold_groupBox.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.thresholdBlack_numericUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.thresholdWhite_numericUpDown)).BeginInit(); + this.imagePreprocess_groupBox.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.maxTileHeight_numericUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.maxTileWidth_numericUpDown)).BeginInit(); @@ -255,16 +294,13 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.tiffJpegQuality_numericUpDown)).BeginInit(); this.ddsOutputSettings_groupBox.SuspendLayout(); this.advanced_tabPage.SuspendLayout(); - this.imagePostprocess_groupBox.SuspendLayout(); - this.threshold_groupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.thresholdBlack_numericUpDown)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.thresholdWhite_numericUpDown)).BeginInit(); - this.imagePreprocess_groupBox.SuspendLayout(); - this.upscaleSize_groupBox.SuspendLayout(); + this.rules_groupBox.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.rulePriority_numericUpDown)).BeginInit(); this.filters_groupBox.SuspendLayout(); this.filtersSize_groupBox.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.filterSizeWidth_numericUpDown)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.filterSizeHeight_numericUpDown)).BeginInit(); + this.groupBox10.SuspendLayout(); this.filtersFilename_groupBox.SuspendLayout(); this.filtersAlpha_groupBox.SuspendLayout(); this.interpolation_tabPage.SuspendLayout(); @@ -288,9 +324,9 @@ private void InitializeComponent() // upscale_button // this.upscale_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.upscale_button.Location = new System.Drawing.Point(0, 332); + this.upscale_button.Location = new System.Drawing.Point(0, 196); this.upscale_button.Name = "upscale_button"; - this.upscale_button.Size = new System.Drawing.Size(149, 83); + this.upscale_button.Size = new System.Drawing.Size(149, 34); this.upscale_button.TabIndex = 1; this.upscale_button.Text = "RUN ESRGAN"; this.toolTip1.SetToolTip(this.upscale_button, "Process all files from ESRGAN input folder and save them in results folder or it " + @@ -300,7 +336,7 @@ private void InitializeComponent() // esrganPath_textBox // this.esrganPath_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.esrganPath_textBox.Location = new System.Drawing.Point(84, 18); + this.esrganPath_textBox.Location = new System.Drawing.Point(111, 19); this.esrganPath_textBox.Name = "esrganPath_textBox"; this.esrganPath_textBox.ReadOnly = true; this.esrganPath_textBox.Size = new System.Drawing.Size(502, 20); @@ -310,7 +346,7 @@ private void InitializeComponent() // resultsMergedPath_textBox // this.resultsMergedPath_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.resultsMergedPath_textBox.Location = new System.Drawing.Point(84, 44); + this.resultsMergedPath_textBox.Location = new System.Drawing.Point(111, 72); this.resultsMergedPath_textBox.Name = "resultsMergedPath_textBox"; this.resultsMergedPath_textBox.ReadOnly = true; this.resultsMergedPath_textBox.Size = new System.Drawing.Size(502, 20); @@ -320,9 +356,9 @@ private void InitializeComponent() // crop_button // this.crop_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.crop_button.Location = new System.Drawing.Point(0, 149); + this.crop_button.Location = new System.Drawing.Point(0, 59); this.crop_button.Name = "crop_button"; - this.crop_button.Size = new System.Drawing.Size(149, 83); + this.crop_button.Size = new System.Drawing.Size(149, 34); this.crop_button.TabIndex = 17; this.crop_button.Text = "SPLIT"; this.toolTip1.SetToolTip(this.crop_button, "Create tiles from original images and save them as png in ESRGAN input folder"); @@ -331,9 +367,9 @@ private void InitializeComponent() // merge_button // this.merge_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.merge_button.Location = new System.Drawing.Point(0, 421); + this.merge_button.Location = new System.Drawing.Point(0, 236); this.merge_button.Name = "merge_button"; - this.merge_button.Size = new System.Drawing.Size(149, 83); + this.merge_button.Size = new System.Drawing.Size(149, 34); this.merge_button.TabIndex = 18; this.merge_button.Text = "MERGE"; this.toolTip1.SetToolTip(this.merge_button, "Find all image tiles in results folder/subfolders, merge them in single image and" + @@ -356,7 +392,7 @@ private void InitializeComponent() this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(778, 642); + this.tabControl1.Size = new System.Drawing.Size(1271, 841); this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed; this.tabControl1.TabIndex = 19; this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); @@ -369,7 +405,7 @@ private void InitializeComponent() this.main_tabPage.Location = new System.Drawing.Point(4, 25); this.main_tabPage.Name = "main_tabPage"; this.main_tabPage.Padding = new System.Windows.Forms.Padding(3); - this.main_tabPage.Size = new System.Drawing.Size(770, 613); + this.main_tabPage.Size = new System.Drawing.Size(1263, 812); this.main_tabPage.TabIndex = 0; this.main_tabPage.Text = "Basic"; this.main_tabPage.UseVisualStyleBackColor = true; @@ -391,7 +427,7 @@ private void InitializeComponent() this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(764, 607); + this.tableLayoutPanel1.Size = new System.Drawing.Size(1257, 806); this.tableLayoutPanel1.TabIndex = 20; // // panel2 @@ -399,7 +435,7 @@ private void InitializeComponent() this.panel2.Controls.Add(this.progressFiltered_label); this.panel2.Controls.Add(this.progress_label); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(3, 580); + this.panel2.Location = new System.Drawing.Point(3, 779); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(149, 24); this.panel2.TabIndex = 37; @@ -433,6 +469,8 @@ private void InitializeComponent() // // panel1 // + this.panel1.Controls.Add(this.button1); + this.panel1.Controls.Add(this.profilesMainTab_listBox); this.panel1.Controls.Add(this.groupBox1); this.panel1.Controls.Add(this.runAll_button); this.panel1.Controls.Add(this.outputMode_groupBox); @@ -442,18 +480,38 @@ private void InitializeComponent() this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(3, 3); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(149, 571); + this.panel1.Size = new System.Drawing.Size(149, 770); this.panel1.TabIndex = 20; // + // button1 + // + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button1.Location = new System.Drawing.Point(0, 624); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(149, 31); + this.button1.TabIndex = 52; + this.button1.Text = "Load profile"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.LoadProfileMainTab_button_Click); + // + // profilesMainTab_listBox + // + this.profilesMainTab_listBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.profilesMainTab_listBox.FormattingEnabled = true; + this.profilesMainTab_listBox.Location = new System.Drawing.Point(0, 356); + this.profilesMainTab_listBox.Name = "profilesMainTab_listBox"; + this.profilesMainTab_listBox.Size = new System.Drawing.Size(149, 262); + this.profilesMainTab_listBox.TabIndex = 48; + // // groupBox1 // this.groupBox1.Controls.Add(this.overwriteMode_comboBox); - this.groupBox1.Location = new System.Drawing.Point(0, 274); + this.groupBox1.Location = new System.Drawing.Point(0, 140); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(149, 50); this.groupBox1.TabIndex = 36; this.groupBox1.TabStop = false; - this.groupBox1.Text = "Overwrite"; + this.groupBox1.Text = "Profile:Overwrite"; // // overwriteMode_comboBox // @@ -468,9 +526,9 @@ private void InitializeComponent() // runAll_button // this.runAll_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.runAll_button.Location = new System.Drawing.Point(0, 524); + this.runAll_button.Location = new System.Drawing.Point(0, 293); this.runAll_button.Name = "runAll_button"; - this.runAll_button.Size = new System.Drawing.Size(149, 32); + this.runAll_button.Size = new System.Drawing.Size(149, 44); this.runAll_button.TabIndex = 32; this.runAll_button.Text = "SPLIT-ESRGAN-MERGE"; this.runAll_button.UseVisualStyleBackColor = true; @@ -478,7 +536,7 @@ private void InitializeComponent() // outputMode_groupBox // this.outputMode_groupBox.Controls.Add(this.outputDestinationMode_comboBox); - this.outputMode_groupBox.Location = new System.Drawing.Point(0, 91); + this.outputMode_groupBox.Location = new System.Drawing.Point(0, 3); this.outputMode_groupBox.Name = "outputMode_groupBox"; this.outputMode_groupBox.Size = new System.Drawing.Size(149, 52); this.outputMode_groupBox.TabIndex = 31; @@ -506,8 +564,8 @@ private void InitializeComponent() // this.splitContainer1.Panel2.Controls.Add(this.richTextBox1); this.splitContainer1.Panel2MinSize = 100; - this.splitContainer1.Size = new System.Drawing.Size(603, 571); - this.splitContainer1.SplitterDistance = 400; + this.splitContainer1.Size = new System.Drawing.Size(1096, 770); + this.splitContainer1.SplitterDistance = 581; this.splitContainer1.TabIndex = 21; // // richTextBox1 @@ -519,7 +577,7 @@ private void InitializeComponent() this.richTextBox1.Location = new System.Drawing.Point(0, 0); this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.ReadOnly = true; - this.richTextBox1.Size = new System.Drawing.Size(199, 571); + this.richTextBox1.Size = new System.Drawing.Size(511, 770); this.richTextBox1.TabIndex = 0; this.richTextBox1.Text = ""; this.richTextBox1.TextChanged += new System.EventHandler(this.richTextBox1_TextChanged); @@ -527,9 +585,9 @@ private void InitializeComponent() // progressBar1 // this.progressBar1.Dock = System.Windows.Forms.DockStyle.Fill; - this.progressBar1.Location = new System.Drawing.Point(158, 580); + this.progressBar1.Location = new System.Drawing.Point(158, 779); this.progressBar1.Name = "progressBar1"; - this.progressBar1.Size = new System.Drawing.Size(603, 24); + this.progressBar1.Size = new System.Drawing.Size(1096, 24); this.progressBar1.TabIndex = 22; // // previewResult_tabPage @@ -538,7 +596,7 @@ private void InitializeComponent() this.previewResult_tabPage.Controls.Add(this.toolStrip); this.previewResult_tabPage.Location = new System.Drawing.Point(4, 25); this.previewResult_tabPage.Name = "previewResult_tabPage"; - this.previewResult_tabPage.Size = new System.Drawing.Size(770, 613); + this.previewResult_tabPage.Size = new System.Drawing.Size(1263, 812); this.previewResult_tabPage.TabIndex = 5; this.previewResult_tabPage.Text = "Preview result"; this.previewResult_tabPage.UseVisualStyleBackColor = true; @@ -551,9 +609,9 @@ private void InitializeComponent() this.tableLayoutPanel3.Controls.Add(this.zoomImageBox, 0, 0); this.tableLayoutPanel3.Controls.Add(this.previewImageBox, 1, 0); this.tableLayoutPanel3.Controls.Add(this.previewModels_comboBox, 1, 1); - this.tableLayoutPanel3.Controls.Add(this.splitContainer2, 1, 2); this.tableLayoutPanel3.Controls.Add(this.preview_progressBar, 0, 3); this.tableLayoutPanel3.Controls.Add(this.splitContainer3, 0, 1); + this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel6, 1, 2); this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 25); this.tableLayoutPanel3.Name = "tableLayoutPanel3"; @@ -562,7 +620,7 @@ private void InitializeComponent() this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 31F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 124F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tableLayoutPanel3.Size = new System.Drawing.Size(770, 588); + this.tableLayoutPanel3.Size = new System.Drawing.Size(1263, 787); this.tableLayoutPanel3.TabIndex = 5; // // zoomImageBox @@ -577,7 +635,7 @@ private void InitializeComponent() this.zoomImageBox.GridScale = Cyotek.Windows.Forms.ImageBoxGridScale.None; this.zoomImageBox.Location = new System.Drawing.Point(3, 3); this.zoomImageBox.Name = "zoomImageBox"; - this.zoomImageBox.Size = new System.Drawing.Size(379, 397); + this.zoomImageBox.Size = new System.Drawing.Size(625, 596); this.zoomImageBox.TabIndex = 0; this.zoomImageBox.TabStop = false; this.zoomImageBox.ImageChanged += new System.EventHandler(this.zoomImageBox_ImageChanged); @@ -596,9 +654,9 @@ private void InitializeComponent() this.previewImageBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.previewImageBox.GridColor = System.Drawing.SystemColors.ControlDarkDark; this.previewImageBox.GridScale = Cyotek.Windows.Forms.ImageBoxGridScale.None; - this.previewImageBox.Location = new System.Drawing.Point(388, 3); + this.previewImageBox.Location = new System.Drawing.Point(634, 3); this.previewImageBox.Name = "previewImageBox"; - this.previewImageBox.Size = new System.Drawing.Size(379, 397); + this.previewImageBox.Size = new System.Drawing.Size(626, 596); this.previewImageBox.SizeMode = Cyotek.Windows.Forms.ImageBoxSizeMode.Fit; this.previewImageBox.TabIndex = 4; this.previewImageBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.previewImageBox_MouseDown); @@ -611,64 +669,25 @@ private void InitializeComponent() this.previewModels_comboBox.Dock = System.Windows.Forms.DockStyle.Fill; this.previewModels_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.previewModels_comboBox.FormattingEnabled = true; - this.previewModels_comboBox.Location = new System.Drawing.Point(388, 406); + this.previewModels_comboBox.Location = new System.Drawing.Point(634, 605); this.previewModels_comboBox.Name = "previewModels_comboBox"; - this.previewModels_comboBox.Size = new System.Drawing.Size(379, 21); + this.previewModels_comboBox.Size = new System.Drawing.Size(626, 21); this.previewModels_comboBox.TabIndex = 6; // - // splitContainer2 - // - this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer2.Location = new System.Drawing.Point(388, 437); - this.splitContainer2.Name = "splitContainer2"; - // - // splitContainer2.Panel1 - // - this.splitContainer2.Panel1.Controls.Add(this.previewUpdate_button); - // - // splitContainer2.Panel2 - // - this.splitContainer2.Panel2.Controls.Add(this.previewSave_button); - this.splitContainer2.Size = new System.Drawing.Size(379, 118); - this.splitContainer2.SplitterDistance = 198; - this.splitContainer2.TabIndex = 7; - // - // previewUpdate_button - // - this.previewUpdate_button.Dock = System.Windows.Forms.DockStyle.Fill; - this.previewUpdate_button.Location = new System.Drawing.Point(0, 0); - this.previewUpdate_button.Name = "previewUpdate_button"; - this.previewUpdate_button.Size = new System.Drawing.Size(198, 118); - this.previewUpdate_button.TabIndex = 6; - this.previewUpdate_button.Text = "Update preview"; - this.previewUpdate_button.UseVisualStyleBackColor = true; - this.previewUpdate_button.Click += new System.EventHandler(this.previewUpdate_button_Click); - // - // previewSave_button - // - this.previewSave_button.Dock = System.Windows.Forms.DockStyle.Fill; - this.previewSave_button.Location = new System.Drawing.Point(0, 0); - this.previewSave_button.Name = "previewSave_button"; - this.previewSave_button.Size = new System.Drawing.Size(177, 118); - this.previewSave_button.TabIndex = 6; - this.previewSave_button.Text = "Enhance and save as png"; - this.previewSave_button.UseVisualStyleBackColor = true; - this.previewSave_button.Click += new System.EventHandler(this.previewSave_button_Click); - // // preview_progressBar // this.tableLayoutPanel3.SetColumnSpan(this.preview_progressBar, 2); this.preview_progressBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.preview_progressBar.Location = new System.Drawing.Point(3, 561); + this.preview_progressBar.Location = new System.Drawing.Point(3, 760); this.preview_progressBar.Name = "preview_progressBar"; - this.preview_progressBar.Size = new System.Drawing.Size(764, 24); + this.preview_progressBar.Size = new System.Drawing.Size(1257, 24); this.preview_progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.preview_progressBar.TabIndex = 8; // // splitContainer3 // this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer3.Location = new System.Drawing.Point(3, 406); + this.splitContainer3.Location = new System.Drawing.Point(3, 605); this.splitContainer3.Name = "splitContainer3"; // // splitContainer3.Panel1 @@ -679,8 +698,8 @@ private void InitializeComponent() // this.splitContainer3.Panel2.Controls.Add(this.imageSizeToolStripStatusLabel); this.tableLayoutPanel3.SetRowSpan(this.splitContainer3, 2); - this.splitContainer3.Size = new System.Drawing.Size(379, 149); - this.splitContainer3.SplitterDistance = 146; + this.splitContainer3.Size = new System.Drawing.Size(625, 149); + this.splitContainer3.SplitterDistance = 239; this.splitContainer3.TabIndex = 9; // // miniMapImageBox @@ -706,13 +725,52 @@ private void InitializeComponent() // this.imageSizeToolStripStatusLabel.AutoSize = true; this.imageSizeToolStripStatusLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.imageSizeToolStripStatusLabel.Location = new System.Drawing.Point(187, 0); + this.imageSizeToolStripStatusLabel.Location = new System.Drawing.Point(340, 0); this.imageSizeToolStripStatusLabel.Name = "imageSizeToolStripStatusLabel"; this.imageSizeToolStripStatusLabel.Size = new System.Drawing.Size(42, 13); this.imageSizeToolStripStatusLabel.TabIndex = 0; this.imageSizeToolStripStatusLabel.Text = "X:0 Y:0"; this.imageSizeToolStripStatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // + // tableLayoutPanel6 + // + this.tableLayoutPanel6.ColumnCount = 2; + this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel6.Controls.Add(this.previewUpdate_button, 0, 0); + this.tableLayoutPanel6.Controls.Add(this.previewSave_button, 1, 0); + this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel6.Location = new System.Drawing.Point(634, 636); + this.tableLayoutPanel6.Name = "tableLayoutPanel6"; + this.tableLayoutPanel6.RowCount = 1; + this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel6.Size = new System.Drawing.Size(626, 118); + this.tableLayoutPanel6.TabIndex = 10; + // + // previewUpdate_button + // + this.previewUpdate_button.Dock = System.Windows.Forms.DockStyle.Fill; + this.previewUpdate_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.previewUpdate_button.Location = new System.Drawing.Point(3, 3); + this.previewUpdate_button.Name = "previewUpdate_button"; + this.previewUpdate_button.Size = new System.Drawing.Size(307, 112); + this.previewUpdate_button.TabIndex = 6; + this.previewUpdate_button.Text = "Update preview"; + this.previewUpdate_button.UseVisualStyleBackColor = true; + this.previewUpdate_button.Click += new System.EventHandler(this.previewUpdate_button_Click); + // + // previewSave_button + // + this.previewSave_button.Dock = System.Windows.Forms.DockStyle.Fill; + this.previewSave_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.previewSave_button.Location = new System.Drawing.Point(316, 3); + this.previewSave_button.Name = "previewSave_button"; + this.previewSave_button.Size = new System.Drawing.Size(307, 112); + this.previewSave_button.TabIndex = 6; + this.previewSave_button.Text = "Enhance and save as png"; + this.previewSave_button.UseVisualStyleBackColor = true; + this.previewSave_button.Click += new System.EventHandler(this.previewSave_button_Click); + // // toolStrip // this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -725,7 +783,7 @@ private void InitializeComponent() this.zoomLevelsToolStripComboBox}); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip"; - this.toolStrip.Size = new System.Drawing.Size(770, 25); + this.toolStrip.Size = new System.Drawing.Size(1263, 25); this.toolStrip.TabIndex = 3; // // openFromFileToolStripButton @@ -787,29 +845,37 @@ private void InitializeComponent() // // settings_tabPage // + this.settings_tabPage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.settings_tabPage.Controls.Add(this.deleteProfile_button); + this.settings_tabPage.Controls.Add(this.groupBox9); + this.settings_tabPage.Controls.Add(this.saveProfileName_textBox); this.settings_tabPage.Controls.Add(this.useBasicSR_checkBox); - this.settings_tabPage.Controls.Add(this.outputFormat_comboBox); - this.settings_tabPage.Controls.Add(this.modelForAlpha_comboBox); + this.settings_tabPage.Controls.Add(this.modelsPath_textBox); + this.settings_tabPage.Controls.Add(this.label2); + this.settings_tabPage.Controls.Add(this.saveProfile_button); this.settings_tabPage.Controls.Add(this.tableLayoutPanel2); + this.settings_tabPage.Controls.Add(this.profiles_listBox); + this.settings_tabPage.Controls.Add(this.label7); + this.settings_tabPage.Controls.Add(this.loadProfile_button); + this.settings_tabPage.Controls.Add(this.topMost_checkBox); this.settings_tabPage.Controls.Add(this.deleteResults_checkBox); + this.settings_tabPage.Controls.Add(this.outputPath_textBox); this.settings_tabPage.Controls.Add(this.label9); + this.settings_tabPage.Controls.Add(this.inputPath_textBox); this.settings_tabPage.Controls.Add(this.maxTileHeight_numericUpDown); + this.settings_tabPage.Controls.Add(this.changeModelsPath_button); this.settings_tabPage.Controls.Add(this.maxTileWidth_numericUpDown); + this.settings_tabPage.Controls.Add(this.advancedUseSuffix_checkBox); this.settings_tabPage.Controls.Add(this.createMemoryImage_checkBox); + this.settings_tabPage.Controls.Add(this.changeInputPath_button); this.settings_tabPage.Controls.Add(this.useCPU_checkBox); - this.settings_tabPage.Controls.Add(this.seamlessTextures_checkBox); - this.settings_tabPage.Controls.Add(this.preserveFormat_checkBox); + this.settings_tabPage.Controls.Add(this.changeOutputPath_button); + this.settings_tabPage.Controls.Add(this.advancedSuffix_textBox); + this.settings_tabPage.Controls.Add(this.label8); this.settings_tabPage.Controls.Add(this.changeInputImgPath_button); this.settings_tabPage.Controls.Add(this.changeMergedResultsPath_button); this.settings_tabPage.Controls.Add(this.changeEsrganPath_button); - this.settings_tabPage.Controls.Add(this.debugUpscale_checkBox); - this.settings_tabPage.Controls.Add(this.useDifferentModelForAlpha_checkBox); - this.settings_tabPage.Controls.Add(this.splitRGB_checkBox); this.settings_tabPage.Controls.Add(this.preciseTile_checkBox); - this.settings_tabPage.Controls.Add(this.balanceAlphas_checkBox); - this.settings_tabPage.Controls.Add(this.ignoreSingleColorAlpha_checkBox); - this.settings_tabPage.Controls.Add(this.ignoreAlpha_checkBox); - this.settings_tabPage.Controls.Add(this.label23); this.settings_tabPage.Controls.Add(this.label6); this.settings_tabPage.Controls.Add(this.overlapSize_numericUpDown); this.settings_tabPage.Controls.Add(this.label5); @@ -823,110 +889,555 @@ private void InitializeComponent() this.settings_tabPage.Location = new System.Drawing.Point(4, 25); this.settings_tabPage.Name = "settings_tabPage"; this.settings_tabPage.Padding = new System.Windows.Forms.Padding(3); - this.settings_tabPage.Size = new System.Drawing.Size(770, 613); + this.settings_tabPage.Size = new System.Drawing.Size(1263, 812); this.settings_tabPage.TabIndex = 1; this.settings_tabPage.Text = "Settings"; this.settings_tabPage.UseVisualStyleBackColor = true; // - // useBasicSR_checkBox + // deleteProfile_button + // + this.deleteProfile_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.deleteProfile_button.Location = new System.Drawing.Point(825, 590); + this.deleteProfile_button.Name = "deleteProfile_button"; + this.deleteProfile_button.Size = new System.Drawing.Size(149, 31); + this.deleteProfile_button.TabIndex = 53; + this.deleteProfile_button.Text = "Delete profile"; + this.deleteProfile_button.UseVisualStyleBackColor = true; + this.deleteProfile_button.Click += new System.EventHandler(this.DeleteProfile_button_Click); + // + // groupBox9 + // + this.groupBox9.Controls.Add(this.ignoreAlpha_checkBox); + this.groupBox9.Controls.Add(this.imagePostprocess_groupBox); + this.groupBox9.Controls.Add(this.imagePreprocess_groupBox); + this.groupBox9.Controls.Add(this.outputFormat_comboBox); + this.groupBox9.Controls.Add(this.ignoreSingleColorAlpha_checkBox); + this.groupBox9.Controls.Add(this.balanceAlphas_checkBox); + this.groupBox9.Controls.Add(this.splitRGB_checkBox); + this.groupBox9.Controls.Add(this.profileModel_comboBox); + this.groupBox9.Controls.Add(this.useProfileModel_checkBox); + this.groupBox9.Controls.Add(this.modelForAlpha_comboBox); + this.groupBox9.Controls.Add(this.useDifferentModelForAlpha_checkBox); + this.groupBox9.Controls.Add(this.seamlessTextures_checkBox); + this.groupBox9.Controls.Add(this.preserveFormat_checkBox); + this.groupBox9.Controls.Add(this.label23); + this.groupBox9.Location = new System.Drawing.Point(94, 353); + this.groupBox9.Name = "groupBox9"; + this.groupBox9.Size = new System.Drawing.Size(570, 268); + this.groupBox9.TabIndex = 52; + this.groupBox9.TabStop = false; + this.groupBox9.Text = "Profile:Settings"; // - this.useBasicSR_checkBox.AutoSize = true; - this.useBasicSR_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.useBasicSR_checkBox.Location = new System.Drawing.Point(294, 289); - this.useBasicSR_checkBox.Name = "useBasicSR_checkBox"; - this.useBasicSR_checkBox.Size = new System.Drawing.Size(146, 17); - this.useBasicSR_checkBox.TabIndex = 51; - this.useBasicSR_checkBox.Text = "Use BasicSR architecture"; - this.useBasicSR_checkBox.UseVisualStyleBackColor = true; + // ignoreAlpha_checkBox // - // outputFormat_comboBox + this.ignoreAlpha_checkBox.AutoSize = true; + this.ignoreAlpha_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.ignoreAlpha_checkBox.Location = new System.Drawing.Point(17, 39); + this.ignoreAlpha_checkBox.Name = "ignoreAlpha_checkBox"; + this.ignoreAlpha_checkBox.Size = new System.Drawing.Size(124, 17); + this.ignoreAlpha_checkBox.TabIndex = 25; + this.ignoreAlpha_checkBox.Text = "Ignore alpha channel"; + this.ignoreAlpha_checkBox.ThreeState = true; + this.toolTip1.SetToolTip(this.ignoreAlpha_checkBox, "Don\'t create alpha tiles in LR, don\'t read alpha tiles from results"); + this.ignoreAlpha_checkBox.UseVisualStyleBackColor = true; // - this.outputFormat_comboBox.FormattingEnabled = true; - this.outputFormat_comboBox.Location = new System.Drawing.Point(84, 159); - this.outputFormat_comboBox.Name = "outputFormat_comboBox"; - this.outputFormat_comboBox.Size = new System.Drawing.Size(120, 21); - this.outputFormat_comboBox.TabIndex = 48; + // imagePostprocess_groupBox // - // modelForAlpha_comboBox + this.imagePostprocess_groupBox.Controls.Add(this.label22); + this.imagePostprocess_groupBox.Controls.Add(this.threshold_groupBox); + this.imagePostprocess_groupBox.Controls.Add(this.label21); + this.imagePostprocess_groupBox.Controls.Add(this.resizeImageAfterFilterType_comboBox); + this.imagePostprocess_groupBox.Controls.Add(this.resizeImageAfterScaleFactor_comboBox); + this.imagePostprocess_groupBox.Location = new System.Drawing.Point(303, 122); + this.imagePostprocess_groupBox.Name = "imagePostprocess_groupBox"; + this.imagePostprocess_groupBox.Size = new System.Drawing.Size(261, 126); + this.imagePostprocess_groupBox.TabIndex = 42; + this.imagePostprocess_groupBox.TabStop = false; + this.imagePostprocess_groupBox.Text = "Image postprocess"; // - this.modelForAlpha_comboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.modelForAlpha_comboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.modelForAlpha_comboBox.Enabled = false; - this.modelForAlpha_comboBox.FormattingEnabled = true; - this.modelForAlpha_comboBox.Location = new System.Drawing.Point(249, 216); - this.modelForAlpha_comboBox.Name = "modelForAlpha_comboBox"; - this.modelForAlpha_comboBox.Size = new System.Drawing.Size(381, 21); - this.modelForAlpha_comboBox.TabIndex = 47; - this.modelForAlpha_comboBox.SelectedIndexChanged += new System.EventHandler(this.modelForAlpha_comboBox_SelectedIndexChanged); + // label22 // - // tableLayoutPanel2 + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(173, 101); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(16, 13); + this.label22.TabIndex = 2; + this.label22.Text = "to"; // - this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel2.AutoSize = true; - this.tableLayoutPanel2.ColumnCount = 2; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel2.Controls.Add(this.appCoreVersion_linkLabel, 0, 0); - this.tableLayoutPanel2.Controls.Add(this.appVersion_label, 1, 1); - this.tableLayoutPanel2.Controls.Add(this.checkForUpdates_checkBox, 0, 1); - this.tableLayoutPanel2.Location = new System.Drawing.Point(520, 556); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 2; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(242, 57); - this.tableLayoutPanel2.TabIndex = 46; + // threshold_groupBox // - // appCoreVersion_linkLabel + this.threshold_groupBox.Controls.Add(this.thresholdBlack_numericUpDown); + this.threshold_groupBox.Controls.Add(this.label13); + this.threshold_groupBox.Controls.Add(this.thresholdEnabled_checkBox); + this.threshold_groupBox.Controls.Add(this.label12); + this.threshold_groupBox.Controls.Add(this.thresholdWhite_numericUpDown); + this.threshold_groupBox.Location = new System.Drawing.Point(10, 22); + this.threshold_groupBox.Name = "threshold_groupBox"; + this.threshold_groupBox.Size = new System.Drawing.Size(246, 70); + this.threshold_groupBox.TabIndex = 3; + this.threshold_groupBox.TabStop = false; + this.threshold_groupBox.Text = "Threshold"; // - this.appCoreVersion_linkLabel.AutoSize = true; - this.tableLayoutPanel2.SetColumnSpan(this.appCoreVersion_linkLabel, 2); - this.appCoreVersion_linkLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.appCoreVersion_linkLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.appCoreVersion_linkLabel.Location = new System.Drawing.Point(141, 3); - this.appCoreVersion_linkLabel.Margin = new System.Windows.Forms.Padding(3); - this.appCoreVersion_linkLabel.Name = "appCoreVersion_linkLabel"; - this.appCoreVersion_linkLabel.Size = new System.Drawing.Size(98, 14); - this.appCoreVersion_linkLabel.TabIndex = 45; - this.appCoreVersion_linkLabel.TabStop = true; - this.appCoreVersion_linkLabel.Text = "Core v0.0.00.00"; - this.appCoreVersion_linkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.appCoreVersion_linkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // thresholdBlack_numericUpDown // - // appVersion_label + this.thresholdBlack_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.thresholdBlack_numericUpDown.Enabled = false; + this.thresholdBlack_numericUpDown.Location = new System.Drawing.Point(63, 16); + this.thresholdBlack_numericUpDown.Name = "thresholdBlack_numericUpDown"; + this.thresholdBlack_numericUpDown.Size = new System.Drawing.Size(45, 20); + this.thresholdBlack_numericUpDown.TabIndex = 1; + this.toolTip1.SetToolTip(this.thresholdBlack_numericUpDown, "Make all pixels darker than percentage true black"); // - this.appVersion_label.AutoSize = true; - this.appVersion_label.Dock = System.Windows.Forms.DockStyle.Right; - this.appVersion_label.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.appVersion_label.Location = new System.Drawing.Point(145, 20); - this.appVersion_label.Name = "appVersion_label"; - this.appVersion_label.Size = new System.Drawing.Size(94, 37); - this.appVersion_label.TabIndex = 45; - this.appVersion_label.TabStop = true; - this.appVersion_label.Text = "GUI v0.0.00.00"; - this.appVersion_label.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.appVersion_label.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); + // label13 // - // checkForUpdates_checkBox + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label13.Location = new System.Drawing.Point(109, 46); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(46, 13); + this.label13.TabIndex = 2; + this.label13.Text = "% White"; // - this.checkForUpdates_checkBox.AutoSize = true; - this.checkForUpdates_checkBox.Checked = true; - this.checkForUpdates_checkBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkForUpdates_checkBox.Dock = System.Windows.Forms.DockStyle.Left; - this.checkForUpdates_checkBox.Location = new System.Drawing.Point(3, 23); - this.checkForUpdates_checkBox.Name = "checkForUpdates_checkBox"; - this.checkForUpdates_checkBox.Size = new System.Drawing.Size(113, 31); - this.checkForUpdates_checkBox.TabIndex = 39; + // thresholdEnabled_checkBox + // + this.thresholdEnabled_checkBox.AutoSize = true; + this.thresholdEnabled_checkBox.Location = new System.Drawing.Point(12, 31); + this.thresholdEnabled_checkBox.Name = "thresholdEnabled_checkBox"; + this.thresholdEnabled_checkBox.Size = new System.Drawing.Size(45, 17); + this.thresholdEnabled_checkBox.TabIndex = 0; + this.thresholdEnabled_checkBox.Text = "Use"; + this.thresholdEnabled_checkBox.UseVisualStyleBackColor = true; + this.thresholdEnabled_checkBox.CheckedChanged += new System.EventHandler(this.thresholdEnabled_checkBox_CheckedChanged); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.label12.Location = new System.Drawing.Point(109, 20); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(45, 13); + this.label12.TabIndex = 2; + this.label12.Text = "% Black"; + // + // thresholdWhite_numericUpDown + // + this.thresholdWhite_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.thresholdWhite_numericUpDown.Enabled = false; + this.thresholdWhite_numericUpDown.Increment = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.thresholdWhite_numericUpDown.Location = new System.Drawing.Point(63, 42); + this.thresholdWhite_numericUpDown.Name = "thresholdWhite_numericUpDown"; + this.thresholdWhite_numericUpDown.Size = new System.Drawing.Size(45, 20); + this.thresholdWhite_numericUpDown.TabIndex = 1; + this.toolTip1.SetToolTip(this.thresholdWhite_numericUpDown, "Make all pixels brighter than percentage true white"); + this.thresholdWhite_numericUpDown.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(9, 101); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(61, 13); + this.label21.TabIndex = 2; + this.label21.Text = "Resize with"; + // + // resizeImageAfterFilterType_comboBox + // + this.resizeImageAfterFilterType_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.resizeImageAfterFilterType_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.resizeImageAfterFilterType_comboBox.FormattingEnabled = true; + this.resizeImageAfterFilterType_comboBox.Location = new System.Drawing.Point(75, 98); + this.resizeImageAfterFilterType_comboBox.Name = "resizeImageAfterFilterType_comboBox"; + this.resizeImageAfterFilterType_comboBox.Size = new System.Drawing.Size(95, 21); + this.resizeImageAfterFilterType_comboBox.TabIndex = 0; + // + // resizeImageAfterScaleFactor_comboBox + // + this.resizeImageAfterScaleFactor_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.resizeImageAfterScaleFactor_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.resizeImageAfterScaleFactor_comboBox.FormattingEnabled = true; + this.resizeImageAfterScaleFactor_comboBox.Location = new System.Drawing.Point(196, 98); + this.resizeImageAfterScaleFactor_comboBox.Name = "resizeImageAfterScaleFactor_comboBox"; + this.resizeImageAfterScaleFactor_comboBox.Size = new System.Drawing.Size(60, 21); + this.resizeImageAfterScaleFactor_comboBox.TabIndex = 0; + // + // imagePreprocess_groupBox + // + this.imagePreprocess_groupBox.Controls.Add(this.label20); + this.imagePreprocess_groupBox.Controls.Add(this.label19); + this.imagePreprocess_groupBox.Controls.Add(this.label14); + this.imagePreprocess_groupBox.Controls.Add(this.resizeImageBeforeScaleFactor_comboBox); + this.imagePreprocess_groupBox.Controls.Add(this.resizeImageBeforeFilterType_comboBox); + this.imagePreprocess_groupBox.Controls.Add(this.noiseReductionType_comboBox); + this.imagePreprocess_groupBox.Location = new System.Drawing.Point(18, 157); + this.imagePreprocess_groupBox.Name = "imagePreprocess_groupBox"; + this.imagePreprocess_groupBox.Size = new System.Drawing.Size(279, 91); + this.imagePreprocess_groupBox.TabIndex = 41; + this.imagePreprocess_groupBox.TabStop = false; + this.imagePreprocess_groupBox.Text = "Image preprocess"; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(186, 62); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(16, 13); + this.label20.TabIndex = 2; + this.label20.Text = "to"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(20, 61); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(61, 13); + this.label19.TabIndex = 2; + this.label19.Text = "Resize with"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(8, 31); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(73, 13); + this.label14.TabIndex = 1; + this.label14.Text = "Reduce noise"; + // + // resizeImageBeforeScaleFactor_comboBox + // + this.resizeImageBeforeScaleFactor_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.resizeImageBeforeScaleFactor_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.resizeImageBeforeScaleFactor_comboBox.FormattingEnabled = true; + this.resizeImageBeforeScaleFactor_comboBox.Location = new System.Drawing.Point(208, 58); + this.resizeImageBeforeScaleFactor_comboBox.Name = "resizeImageBeforeScaleFactor_comboBox"; + this.resizeImageBeforeScaleFactor_comboBox.Size = new System.Drawing.Size(60, 21); + this.resizeImageBeforeScaleFactor_comboBox.TabIndex = 0; + // + // resizeImageBeforeFilterType_comboBox + // + this.resizeImageBeforeFilterType_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.resizeImageBeforeFilterType_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.resizeImageBeforeFilterType_comboBox.FormattingEnabled = true; + this.resizeImageBeforeFilterType_comboBox.Location = new System.Drawing.Point(87, 58); + this.resizeImageBeforeFilterType_comboBox.Name = "resizeImageBeforeFilterType_comboBox"; + this.resizeImageBeforeFilterType_comboBox.Size = new System.Drawing.Size(95, 21); + this.resizeImageBeforeFilterType_comboBox.TabIndex = 0; + // + // noiseReductionType_comboBox + // + this.noiseReductionType_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.noiseReductionType_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.noiseReductionType_comboBox.FormattingEnabled = true; + this.noiseReductionType_comboBox.Location = new System.Drawing.Point(87, 28); + this.noiseReductionType_comboBox.Name = "noiseReductionType_comboBox"; + this.noiseReductionType_comboBox.Size = new System.Drawing.Size(95, 21); + this.noiseReductionType_comboBox.TabIndex = 0; + this.toolTip1.SetToolTip(this.noiseReductionType_comboBox, "Try to remove image noise with specific ImageMagick method"); + // + // outputFormat_comboBox + // + this.outputFormat_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.outputFormat_comboBox.FormattingEnabled = true; + this.outputFormat_comboBox.Location = new System.Drawing.Point(174, 14); + this.outputFormat_comboBox.Name = "outputFormat_comboBox"; + this.outputFormat_comboBox.Size = new System.Drawing.Size(120, 21); + this.outputFormat_comboBox.TabIndex = 48; + // + // ignoreSingleColorAlpha_checkBox + // + this.ignoreSingleColorAlpha_checkBox.AutoSize = true; + this.ignoreSingleColorAlpha_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.ignoreSingleColorAlpha_checkBox.Location = new System.Drawing.Point(147, 39); + this.ignoreSingleColorAlpha_checkBox.Name = "ignoreSingleColorAlpha_checkBox"; + this.ignoreSingleColorAlpha_checkBox.Size = new System.Drawing.Size(144, 17); + this.ignoreSingleColorAlpha_checkBox.TabIndex = 25; + this.ignoreSingleColorAlpha_checkBox.Text = "Ignore single color alphas"; + this.toolTip1.SetToolTip(this.ignoreSingleColorAlpha_checkBox, "Solid alphas (pure white or black) will be always ignored on split"); + this.ignoreSingleColorAlpha_checkBox.UseVisualStyleBackColor = true; + // + // balanceAlphas_checkBox + // + this.balanceAlphas_checkBox.AutoSize = true; + this.balanceAlphas_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.balanceAlphas_checkBox.Location = new System.Drawing.Point(300, 39); + this.balanceAlphas_checkBox.Name = "balanceAlphas_checkBox"; + this.balanceAlphas_checkBox.Size = new System.Drawing.Size(161, 17); + this.balanceAlphas_checkBox.TabIndex = 25; + this.balanceAlphas_checkBox.Text = "Use globalbalance on alphas"; + this.toolTip1.SetToolTip(this.balanceAlphas_checkBox, "Disable if all image alphas that represents transparency mask"); + this.balanceAlphas_checkBox.UseVisualStyleBackColor = true; + // + // splitRGB_checkBox + // + this.splitRGB_checkBox.AutoSize = true; + this.splitRGB_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.splitRGB_checkBox.Location = new System.Drawing.Point(17, 111); + this.splitRGB_checkBox.Name = "splitRGB_checkBox"; + this.splitRGB_checkBox.Size = new System.Drawing.Size(116, 17); + this.splitRGB_checkBox.TabIndex = 25; + this.splitRGB_checkBox.Text = "Split RGB channels"; + this.splitRGB_checkBox.ThreeState = true; + this.splitRGB_checkBox.UseVisualStyleBackColor = true; + // + // profileModel_comboBox + // + this.profileModel_comboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; + this.profileModel_comboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.profileModel_comboBox.Enabled = false; + this.profileModel_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.profileModel_comboBox.FormattingEnabled = true; + this.profileModel_comboBox.Location = new System.Drawing.Point(182, 87); + this.profileModel_comboBox.Name = "profileModel_comboBox"; + this.profileModel_comboBox.Size = new System.Drawing.Size(382, 21); + this.profileModel_comboBox.TabIndex = 47; + // + // useProfileModel_checkBox + // + this.useProfileModel_checkBox.AutoSize = true; + this.useProfileModel_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.useProfileModel_checkBox.Location = new System.Drawing.Point(17, 88); + this.useProfileModel_checkBox.Name = "useProfileModel_checkBox"; + this.useProfileModel_checkBox.Size = new System.Drawing.Size(113, 17); + this.useProfileModel_checkBox.TabIndex = 25; + this.useProfileModel_checkBox.Text = "Use specific model"; + this.useProfileModel_checkBox.ThreeState = true; + this.useProfileModel_checkBox.UseVisualStyleBackColor = true; + this.useProfileModel_checkBox.CheckedChanged += new System.EventHandler(this.UseProfileModel_checkBox_CheckedChanged); + // + // modelForAlpha_comboBox + // + this.modelForAlpha_comboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; + this.modelForAlpha_comboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.modelForAlpha_comboBox.Enabled = false; + this.modelForAlpha_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.modelForAlpha_comboBox.FormattingEnabled = true; + this.modelForAlpha_comboBox.Location = new System.Drawing.Point(182, 60); + this.modelForAlpha_comboBox.Name = "modelForAlpha_comboBox"; + this.modelForAlpha_comboBox.Size = new System.Drawing.Size(382, 21); + this.modelForAlpha_comboBox.TabIndex = 47; + // + // useDifferentModelForAlpha_checkBox + // + this.useDifferentModelForAlpha_checkBox.AutoSize = true; + this.useDifferentModelForAlpha_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.useDifferentModelForAlpha_checkBox.Location = new System.Drawing.Point(17, 62); + this.useDifferentModelForAlpha_checkBox.Name = "useDifferentModelForAlpha_checkBox"; + this.useDifferentModelForAlpha_checkBox.Size = new System.Drawing.Size(159, 17); + this.useDifferentModelForAlpha_checkBox.TabIndex = 25; + this.useDifferentModelForAlpha_checkBox.Text = "Use different model for alpha"; + this.useDifferentModelForAlpha_checkBox.ThreeState = true; + this.toolTip1.SetToolTip(this.useDifferentModelForAlpha_checkBox, "Need to split images when changing this setting"); + this.useDifferentModelForAlpha_checkBox.UseVisualStyleBackColor = true; + this.useDifferentModelForAlpha_checkBox.CheckedChanged += new System.EventHandler(this.useDifferentModelForAlpha_checkBox_CheckedChanged); + // + // seamlessTextures_checkBox + // + this.seamlessTextures_checkBox.AutoSize = true; + this.seamlessTextures_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.seamlessTextures_checkBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); + this.seamlessTextures_checkBox.Location = new System.Drawing.Point(17, 133); + this.seamlessTextures_checkBox.Name = "seamlessTextures_checkBox"; + this.seamlessTextures_checkBox.Size = new System.Drawing.Size(137, 17); + this.seamlessTextures_checkBox.TabIndex = 30; + this.seamlessTextures_checkBox.Text = "Seamless (tiled) textures"; + this.seamlessTextures_checkBox.ThreeState = true; + this.toolTip1.SetToolTip(this.seamlessTextures_checkBox, "Use if original image is seamless texture"); + this.seamlessTextures_checkBox.UseVisualStyleBackColor = true; + // + // preserveFormat_checkBox + // + this.preserveFormat_checkBox.AutoSize = true; + this.preserveFormat_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.preserveFormat_checkBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); + this.preserveFormat_checkBox.Location = new System.Drawing.Point(300, 17); + this.preserveFormat_checkBox.Name = "preserveFormat_checkBox"; + this.preserveFormat_checkBox.Size = new System.Drawing.Size(142, 17); + this.preserveFormat_checkBox.TabIndex = 30; + this.preserveFormat_checkBox.Text = "Use original image format"; + this.toolTip1.SetToolTip(this.preserveFormat_checkBox, "Use original image extension with settings from Output fortmat tab"); + this.preserveFormat_checkBox.UseVisualStyleBackColor = true; + this.preserveFormat_checkBox.CheckedChanged += new System.EventHandler(this.preserveFormat_checkBox_CheckedChanged); + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(98, 17); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(71, 13); + this.label23.TabIndex = 24; + this.label23.Text = "Output format"; + // + // saveProfileName_textBox + // + this.saveProfileName_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.saveProfileName_textBox.Location = new System.Drawing.Point(825, 495); + this.saveProfileName_textBox.Name = "saveProfileName_textBox"; + this.saveProfileName_textBox.Size = new System.Drawing.Size(149, 20); + this.saveProfileName_textBox.TabIndex = 52; + // + // useBasicSR_checkBox + // + this.useBasicSR_checkBox.AutoSize = true; + this.useBasicSR_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.useBasicSR_checkBox.Location = new System.Drawing.Point(111, 284); + this.useBasicSR_checkBox.Name = "useBasicSR_checkBox"; + this.useBasicSR_checkBox.Size = new System.Drawing.Size(146, 17); + this.useBasicSR_checkBox.TabIndex = 51; + this.useBasicSR_checkBox.Text = "Use BasicSR architecture"; + this.useBasicSR_checkBox.UseVisualStyleBackColor = true; + // + // modelsPath_textBox + // + this.modelsPath_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.modelsPath_textBox.Location = new System.Drawing.Point(111, 151); + this.modelsPath_textBox.Name = "modelsPath_textBox"; + this.modelsPath_textBox.ReadOnly = true; + this.modelsPath_textBox.Size = new System.Drawing.Size(502, 20); + this.modelsPath_textBox.TabIndex = 19; + this.toolTip1.SetToolTip(this.modelsPath_textBox, "Folder with .pth files"); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(82, 102); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(21, 13); + this.label2.TabIndex = 20; + this.label2.Text = "LR"; + // + // saveProfile_button + // + this.saveProfile_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.saveProfile_button.Location = new System.Drawing.Point(825, 521); + this.saveProfile_button.Name = "saveProfile_button"; + this.saveProfile_button.Size = new System.Drawing.Size(149, 31); + this.saveProfile_button.TabIndex = 50; + this.saveProfile_button.Text = "Save profile"; + this.saveProfile_button.UseVisualStyleBackColor = true; + this.saveProfile_button.Click += new System.EventHandler(this.SaveProfile_button_Click); + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel2.AutoSize = true; + this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel2.Controls.Add(this.appCoreVersion_linkLabel, 0, 0); + this.tableLayoutPanel2.Controls.Add(this.appVersion_label, 1, 1); + this.tableLayoutPanel2.Controls.Add(this.checkForUpdates_checkBox, 0, 1); + this.tableLayoutPanel2.Location = new System.Drawing.Point(1019, 753); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 2; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(242, 57); + this.tableLayoutPanel2.TabIndex = 46; + // + // appCoreVersion_linkLabel + // + this.appCoreVersion_linkLabel.AutoSize = true; + this.tableLayoutPanel2.SetColumnSpan(this.appCoreVersion_linkLabel, 2); + this.appCoreVersion_linkLabel.Dock = System.Windows.Forms.DockStyle.Right; + this.appCoreVersion_linkLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.appCoreVersion_linkLabel.Location = new System.Drawing.Point(141, 3); + this.appCoreVersion_linkLabel.Margin = new System.Windows.Forms.Padding(3); + this.appCoreVersion_linkLabel.Name = "appCoreVersion_linkLabel"; + this.appCoreVersion_linkLabel.Size = new System.Drawing.Size(98, 14); + this.appCoreVersion_linkLabel.TabIndex = 45; + this.appCoreVersion_linkLabel.TabStop = true; + this.appCoreVersion_linkLabel.Text = "Core v0.0.00.00"; + this.appCoreVersion_linkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.appCoreVersion_linkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // appVersion_label + // + this.appVersion_label.AutoSize = true; + this.appVersion_label.Dock = System.Windows.Forms.DockStyle.Right; + this.appVersion_label.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.appVersion_label.Location = new System.Drawing.Point(145, 20); + this.appVersion_label.Name = "appVersion_label"; + this.appVersion_label.Size = new System.Drawing.Size(94, 37); + this.appVersion_label.TabIndex = 45; + this.appVersion_label.TabStop = true; + this.appVersion_label.Text = "GUI v0.0.00.00"; + this.appVersion_label.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.appVersion_label.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); + // + // checkForUpdates_checkBox + // + this.checkForUpdates_checkBox.AutoSize = true; + this.checkForUpdates_checkBox.Checked = true; + this.checkForUpdates_checkBox.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkForUpdates_checkBox.Dock = System.Windows.Forms.DockStyle.Left; + this.checkForUpdates_checkBox.Location = new System.Drawing.Point(3, 23); + this.checkForUpdates_checkBox.Name = "checkForUpdates_checkBox"; + this.checkForUpdates_checkBox.Size = new System.Drawing.Size(113, 31); + this.checkForUpdates_checkBox.TabIndex = 39; this.checkForUpdates_checkBox.Text = "Check for updates"; this.checkForUpdates_checkBox.UseVisualStyleBackColor = true; // + // profiles_listBox + // + this.profiles_listBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.profiles_listBox.FormattingEnabled = true; + this.profiles_listBox.Location = new System.Drawing.Point(670, 359); + this.profiles_listBox.Name = "profiles_listBox"; + this.profiles_listBox.Size = new System.Drawing.Size(149, 262); + this.profiles_listBox.TabIndex = 47; + this.profiles_listBox.SelectedIndexChanged += new System.EventHandler(this.configs_listBox_SelectedIndexChanged); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(61, 127); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(42, 13); + this.label7.TabIndex = 20; + this.label7.Text = "Results"; + // + // loadProfile_button + // + this.loadProfile_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.loadProfile_button.Location = new System.Drawing.Point(825, 555); + this.loadProfile_button.Name = "loadProfile_button"; + this.loadProfile_button.Size = new System.Drawing.Size(149, 31); + this.loadProfile_button.TabIndex = 51; + this.loadProfile_button.Text = "Load profile"; + this.loadProfile_button.UseVisualStyleBackColor = true; + this.loadProfile_button.Click += new System.EventHandler(this.LoadProfile_button_Click); + // + // topMost_checkBox + // + this.topMost_checkBox.AutoSize = true; + this.topMost_checkBox.Checked = true; + this.topMost_checkBox.CheckState = System.Windows.Forms.CheckState.Checked; + this.topMost_checkBox.Cursor = System.Windows.Forms.Cursors.Default; + this.topMost_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.topMost_checkBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.topMost_checkBox.Location = new System.Drawing.Point(319, 261); + this.topMost_checkBox.Name = "topMost_checkBox"; + this.topMost_checkBox.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.topMost_checkBox.Size = new System.Drawing.Size(78, 17); + this.topMost_checkBox.TabIndex = 38; + this.topMost_checkBox.Text = "Stay on top"; + this.topMost_checkBox.UseVisualStyleBackColor = true; + this.topMost_checkBox.CheckedChanged += new System.EventHandler(this.TopMost_checkBox_CheckedChanged); + // // deleteResults_checkBox // this.deleteResults_checkBox.AutoSize = true; this.deleteResults_checkBox.Cursor = System.Windows.Forms.Cursors.Default; this.deleteResults_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.deleteResults_checkBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.deleteResults_checkBox.Location = new System.Drawing.Point(84, 310); + this.deleteResults_checkBox.Location = new System.Drawing.Point(111, 261); this.deleteResults_checkBox.Name = "deleteResults_checkBox"; this.deleteResults_checkBox.RightToLeft = System.Windows.Forms.RightToLeft.No; this.deleteResults_checkBox.Size = new System.Drawing.Size(144, 17); @@ -934,18 +1445,39 @@ private void InitializeComponent() this.deleteResults_checkBox.Text = "Delete results after merge"; this.deleteResults_checkBox.UseVisualStyleBackColor = true; // + // outputPath_textBox + // + this.outputPath_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.outputPath_textBox.Location = new System.Drawing.Point(111, 125); + this.outputPath_textBox.Name = "outputPath_textBox"; + this.outputPath_textBox.ReadOnly = true; + this.outputPath_textBox.Size = new System.Drawing.Size(502, 20); + this.outputPath_textBox.TabIndex = 19; + this.toolTip1.SetToolTip(this.outputPath_textBox, "ESRGAN output folder"); + // // label9 // this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(279, 111); + this.label9.Location = new System.Drawing.Point(306, 210); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(14, 13); this.label9.TabIndex = 33; this.label9.Text = "X"; // + // inputPath_textBox + // + this.inputPath_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.inputPath_textBox.Location = new System.Drawing.Point(111, 99); + this.inputPath_textBox.Name = "inputPath_textBox"; + this.inputPath_textBox.ReadOnly = true; + this.inputPath_textBox.Size = new System.Drawing.Size(502, 20); + this.inputPath_textBox.TabIndex = 19; + this.toolTip1.SetToolTip(this.inputPath_textBox, "ESRGAN input folder"); + // // maxTileHeight_numericUpDown // - this.maxTileHeight_numericUpDown.Location = new System.Drawing.Point(294, 107); + this.maxTileHeight_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.maxTileHeight_numericUpDown.Location = new System.Drawing.Point(321, 206); this.maxTileHeight_numericUpDown.Maximum = new decimal(new int[] { 4096, 0, @@ -965,9 +1497,21 @@ private void InitializeComponent() 0, 0}); // + // changeModelsPath_button + // + this.changeModelsPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.changeModelsPath_button.Location = new System.Drawing.Point(618, 150); + this.changeModelsPath_button.Name = "changeModelsPath_button"; + this.changeModelsPath_button.Size = new System.Drawing.Size(46, 20); + this.changeModelsPath_button.TabIndex = 29; + this.changeModelsPath_button.Text = "..."; + this.changeModelsPath_button.UseVisualStyleBackColor = true; + this.changeModelsPath_button.Click += new System.EventHandler(this.changePath_button_Click); + // // maxTileWidth_numericUpDown // - this.maxTileWidth_numericUpDown.Location = new System.Drawing.Point(210, 107); + this.maxTileWidth_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.maxTileWidth_numericUpDown.Location = new System.Drawing.Point(237, 206); this.maxTileWidth_numericUpDown.Maximum = new decimal(new int[] { 4096, 0, @@ -987,11 +1531,23 @@ private void InitializeComponent() 0, 0}); // + // advancedUseSuffix_checkBox + // + this.advancedUseSuffix_checkBox.AutoSize = true; + this.advancedUseSuffix_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.advancedUseSuffix_checkBox.Location = new System.Drawing.Point(319, 177); + this.advancedUseSuffix_checkBox.Name = "advancedUseSuffix_checkBox"; + this.advancedUseSuffix_checkBox.Size = new System.Drawing.Size(117, 17); + this.advancedUseSuffix_checkBox.TabIndex = 0; + this.advancedUseSuffix_checkBox.Text = "Use suffix for results"; + this.advancedUseSuffix_checkBox.UseVisualStyleBackColor = true; + this.advancedUseSuffix_checkBox.CheckedChanged += new System.EventHandler(this.advancedUseSuffix_checkBox_CheckedChanged); + // // createMemoryImage_checkBox // this.createMemoryImage_checkBox.AutoSize = true; this.createMemoryImage_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.createMemoryImage_checkBox.Location = new System.Drawing.Point(84, 289); + this.createMemoryImage_checkBox.Location = new System.Drawing.Point(111, 307); this.createMemoryImage_checkBox.Name = "createMemoryImage_checkBox"; this.createMemoryImage_checkBox.Size = new System.Drawing.Size(169, 17); this.createMemoryImage_checkBox.TabIndex = 31; @@ -1000,12 +1556,23 @@ private void InitializeComponent() "ons in LR"); this.createMemoryImage_checkBox.UseVisualStyleBackColor = true; // + // changeInputPath_button + // + this.changeInputPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.changeInputPath_button.Location = new System.Drawing.Point(618, 98); + this.changeInputPath_button.Name = "changeInputPath_button"; + this.changeInputPath_button.Size = new System.Drawing.Size(46, 20); + this.changeInputPath_button.TabIndex = 29; + this.changeInputPath_button.Text = "..."; + this.changeInputPath_button.UseVisualStyleBackColor = true; + this.changeInputPath_button.Click += new System.EventHandler(this.changePath_button_Click); + // // useCPU_checkBox // this.useCPU_checkBox.AutoSize = true; this.useCPU_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.useCPU_checkBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); - this.useCPU_checkBox.Location = new System.Drawing.Point(84, 333); + this.useCPU_checkBox.Location = new System.Drawing.Point(111, 330); this.useCPU_checkBox.Name = "useCPU_checkBox"; this.useCPU_checkBox.Size = new System.Drawing.Size(68, 17); this.useCPU_checkBox.TabIndex = 30; @@ -1013,39 +1580,41 @@ private void InitializeComponent() this.toolTip1.SetToolTip(this.useCPU_checkBox, "Use CPU instead of GPU (very slow, especially on Windows)"); this.useCPU_checkBox.UseVisualStyleBackColor = true; // - // seamlessTextures_checkBox + // changeOutputPath_button // - this.seamlessTextures_checkBox.AutoSize = true; - this.seamlessTextures_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.seamlessTextures_checkBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); - this.seamlessTextures_checkBox.Location = new System.Drawing.Point(84, 260); - this.seamlessTextures_checkBox.Name = "seamlessTextures_checkBox"; - this.seamlessTextures_checkBox.Size = new System.Drawing.Size(137, 17); - this.seamlessTextures_checkBox.TabIndex = 30; - this.seamlessTextures_checkBox.Text = "Seamless (tiled) textures"; - this.toolTip1.SetToolTip(this.seamlessTextures_checkBox, "Use if original image is seamless texture"); - this.seamlessTextures_checkBox.UseVisualStyleBackColor = true; + this.changeOutputPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.changeOutputPath_button.Location = new System.Drawing.Point(618, 124); + this.changeOutputPath_button.Name = "changeOutputPath_button"; + this.changeOutputPath_button.Size = new System.Drawing.Size(46, 20); + this.changeOutputPath_button.TabIndex = 29; + this.changeOutputPath_button.Text = "..."; + this.changeOutputPath_button.UseVisualStyleBackColor = true; + this.changeOutputPath_button.Click += new System.EventHandler(this.changePath_button_Click); // - // preserveFormat_checkBox + // advancedSuffix_textBox // - this.preserveFormat_checkBox.AutoSize = true; - this.preserveFormat_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.preserveFormat_checkBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F); - this.preserveFormat_checkBox.Location = new System.Drawing.Point(210, 162); - this.preserveFormat_checkBox.Name = "preserveFormat_checkBox"; - this.preserveFormat_checkBox.Size = new System.Drawing.Size(142, 17); - this.preserveFormat_checkBox.TabIndex = 30; - this.preserveFormat_checkBox.Text = "Use original image format"; - this.toolTip1.SetToolTip(this.preserveFormat_checkBox, "Use original image extension with settings from Output fortmat tab"); - this.preserveFormat_checkBox.UseVisualStyleBackColor = true; - this.preserveFormat_checkBox.CheckedChanged += new System.EventHandler(this.preserveFormat_checkBox_CheckedChanged); + this.advancedSuffix_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.advancedSuffix_textBox.Location = new System.Drawing.Point(442, 177); + this.advancedSuffix_textBox.Name = "advancedSuffix_textBox"; + this.advancedSuffix_textBox.ReadOnly = true; + this.advancedSuffix_textBox.Size = new System.Drawing.Size(171, 20); + this.advancedSuffix_textBox.TabIndex = 1; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(62, 154); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(41, 13); + this.label8.TabIndex = 20; + this.label8.Text = "Models"; // // changeInputImgPath_button // this.changeInputImgPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.changeInputImgPath_button.Location = new System.Drawing.Point(591, 69); + this.changeInputImgPath_button.Location = new System.Drawing.Point(618, 45); this.changeInputImgPath_button.Name = "changeInputImgPath_button"; - this.changeInputImgPath_button.Size = new System.Drawing.Size(39, 20); + this.changeInputImgPath_button.Size = new System.Drawing.Size(46, 20); this.changeInputImgPath_button.TabIndex = 29; this.changeInputImgPath_button.Text = "..."; this.changeInputImgPath_button.UseVisualStyleBackColor = true; @@ -1054,67 +1623,30 @@ private void InitializeComponent() // changeMergedResultsPath_button // this.changeMergedResultsPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.changeMergedResultsPath_button.Location = new System.Drawing.Point(591, 44); + this.changeMergedResultsPath_button.Location = new System.Drawing.Point(618, 72); this.changeMergedResultsPath_button.Name = "changeMergedResultsPath_button"; - this.changeMergedResultsPath_button.Size = new System.Drawing.Size(39, 20); + this.changeMergedResultsPath_button.Size = new System.Drawing.Size(46, 20); this.changeMergedResultsPath_button.TabIndex = 29; this.changeMergedResultsPath_button.Text = "..."; this.changeMergedResultsPath_button.UseVisualStyleBackColor = true; - this.changeMergedResultsPath_button.Click += new System.EventHandler(this.changePath_button_Click); - // - // changeEsrganPath_button - // - this.changeEsrganPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.changeEsrganPath_button.Location = new System.Drawing.Point(591, 18); - this.changeEsrganPath_button.Name = "changeEsrganPath_button"; - this.changeEsrganPath_button.Size = new System.Drawing.Size(39, 20); - this.changeEsrganPath_button.TabIndex = 29; - this.changeEsrganPath_button.Text = "..."; - this.changeEsrganPath_button.UseVisualStyleBackColor = true; - this.changeEsrganPath_button.Click += new System.EventHandler(this.changePath_button_Click); - // - // debugUpscale_checkBox - // - this.debugUpscale_checkBox.AutoSize = true; - this.debugUpscale_checkBox.Checked = true; - this.debugUpscale_checkBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.debugUpscale_checkBox.Location = new System.Drawing.Point(734, 693); - this.debugUpscale_checkBox.Name = "debugUpscale_checkBox"; - this.debugUpscale_checkBox.Size = new System.Drawing.Size(166, 17); - this.debugUpscale_checkBox.TabIndex = 28; - this.debugUpscale_checkBox.Text = "Keep ESRGAN console open"; - this.debugUpscale_checkBox.UseVisualStyleBackColor = true; - this.debugUpscale_checkBox.Visible = false; - // - // useDifferentModelForAlpha_checkBox - // - this.useDifferentModelForAlpha_checkBox.AutoSize = true; - this.useDifferentModelForAlpha_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.useDifferentModelForAlpha_checkBox.Location = new System.Drawing.Point(84, 217); - this.useDifferentModelForAlpha_checkBox.Name = "useDifferentModelForAlpha_checkBox"; - this.useDifferentModelForAlpha_checkBox.Size = new System.Drawing.Size(159, 17); - this.useDifferentModelForAlpha_checkBox.TabIndex = 25; - this.useDifferentModelForAlpha_checkBox.Text = "Use different model for alpha"; - this.toolTip1.SetToolTip(this.useDifferentModelForAlpha_checkBox, "Need to split images when changing this setting"); - this.useDifferentModelForAlpha_checkBox.UseVisualStyleBackColor = true; - this.useDifferentModelForAlpha_checkBox.CheckedChanged += new System.EventHandler(this.useDifferentModelForAlpha_checkBox_CheckedChanged); - // - // splitRGB_checkBox - // - this.splitRGB_checkBox.AutoSize = true; - this.splitRGB_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.splitRGB_checkBox.Location = new System.Drawing.Point(84, 240); - this.splitRGB_checkBox.Name = "splitRGB_checkBox"; - this.splitRGB_checkBox.Size = new System.Drawing.Size(116, 17); - this.splitRGB_checkBox.TabIndex = 25; - this.splitRGB_checkBox.Text = "Split RGB channels"; - this.splitRGB_checkBox.UseVisualStyleBackColor = true; + this.changeMergedResultsPath_button.Click += new System.EventHandler(this.changePath_button_Click); + // + // changeEsrganPath_button + // + this.changeEsrganPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.changeEsrganPath_button.Location = new System.Drawing.Point(618, 19); + this.changeEsrganPath_button.Name = "changeEsrganPath_button"; + this.changeEsrganPath_button.Size = new System.Drawing.Size(46, 20); + this.changeEsrganPath_button.TabIndex = 29; + this.changeEsrganPath_button.Text = "..."; + this.changeEsrganPath_button.UseVisualStyleBackColor = true; + this.changeEsrganPath_button.Click += new System.EventHandler(this.changePath_button_Click); // // preciseTile_checkBox // this.preciseTile_checkBox.AutoSize = true; this.preciseTile_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.preciseTile_checkBox.Location = new System.Drawing.Point(369, 109); + this.preciseTile_checkBox.Location = new System.Drawing.Point(396, 208); this.preciseTile_checkBox.Name = "preciseTile_checkBox"; this.preciseTile_checkBox.Size = new System.Drawing.Size(130, 17); this.preciseTile_checkBox.TabIndex = 25; @@ -1123,55 +1655,10 @@ private void InitializeComponent() this.preciseTile_checkBox.UseVisualStyleBackColor = true; this.preciseTile_checkBox.CheckedChanged += new System.EventHandler(this.preciseTile_checkBox_CheckedChanged); // - // balanceAlphas_checkBox - // - this.balanceAlphas_checkBox.AutoSize = true; - this.balanceAlphas_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.balanceAlphas_checkBox.Location = new System.Drawing.Point(355, 194); - this.balanceAlphas_checkBox.Name = "balanceAlphas_checkBox"; - this.balanceAlphas_checkBox.Size = new System.Drawing.Size(161, 17); - this.balanceAlphas_checkBox.TabIndex = 25; - this.balanceAlphas_checkBox.Text = "Use globalbalance on alphas"; - this.toolTip1.SetToolTip(this.balanceAlphas_checkBox, "Disable if all image alphas that represents transparency mask"); - this.balanceAlphas_checkBox.UseVisualStyleBackColor = true; - // - // ignoreSingleColorAlpha_checkBox - // - this.ignoreSingleColorAlpha_checkBox.AutoSize = true; - this.ignoreSingleColorAlpha_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.ignoreSingleColorAlpha_checkBox.Location = new System.Drawing.Point(210, 194); - this.ignoreSingleColorAlpha_checkBox.Name = "ignoreSingleColorAlpha_checkBox"; - this.ignoreSingleColorAlpha_checkBox.Size = new System.Drawing.Size(144, 17); - this.ignoreSingleColorAlpha_checkBox.TabIndex = 25; - this.ignoreSingleColorAlpha_checkBox.Text = "Ignore single color alphas"; - this.toolTip1.SetToolTip(this.ignoreSingleColorAlpha_checkBox, "Solid alphas (pure white or black) will be always ignored on split"); - this.ignoreSingleColorAlpha_checkBox.UseVisualStyleBackColor = true; - // - // ignoreAlpha_checkBox - // - this.ignoreAlpha_checkBox.AutoSize = true; - this.ignoreAlpha_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.ignoreAlpha_checkBox.Location = new System.Drawing.Point(84, 194); - this.ignoreAlpha_checkBox.Name = "ignoreAlpha_checkBox"; - this.ignoreAlpha_checkBox.Size = new System.Drawing.Size(124, 17); - this.ignoreAlpha_checkBox.TabIndex = 25; - this.ignoreAlpha_checkBox.Text = "Ignore alpha channel"; - this.toolTip1.SetToolTip(this.ignoreAlpha_checkBox, "Don\'t create alpha tiles in LR, don\'t read alpha tiles from results"); - this.ignoreAlpha_checkBox.UseVisualStyleBackColor = true; - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(8, 162); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(71, 13); - this.label23.TabIndex = 24; - this.label23.Text = "Output format"; - // // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(12, 135); + this.label6.Location = new System.Drawing.Point(39, 234); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(67, 13); this.label6.TabIndex = 24; @@ -1179,12 +1666,13 @@ private void InitializeComponent() // // overlapSize_numericUpDown // + this.overlapSize_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.overlapSize_numericUpDown.Increment = new decimal(new int[] { 16, 0, 0, 0}); - this.overlapSize_numericUpDown.Location = new System.Drawing.Point(84, 133); + this.overlapSize_numericUpDown.Location = new System.Drawing.Point(111, 232); this.overlapSize_numericUpDown.Maximum = new decimal(new int[] { 128, 0, @@ -1202,7 +1690,7 @@ private void InitializeComponent() // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(9, 111); + this.label5.Location = new System.Drawing.Point(36, 210); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(70, 13); this.label5.TabIndex = 22; @@ -1210,8 +1698,9 @@ private void InitializeComponent() // // maxTileResolution_numericUpDown // + this.maxTileResolution_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.maxTileResolution_numericUpDown.Enabled = false; - this.maxTileResolution_numericUpDown.Location = new System.Drawing.Point(84, 107); + this.maxTileResolution_numericUpDown.Location = new System.Drawing.Point(111, 206); this.maxTileResolution_numericUpDown.Maximum = new decimal(new int[] { 16777216, 0, @@ -1230,16 +1719,16 @@ private void InitializeComponent() // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(37, 73); + this.label4.Location = new System.Drawing.Point(55, 48); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(41, 13); + this.label4.Size = new System.Drawing.Size(51, 13); this.label4.TabIndex = 20; - this.label4.Text = "Images"; + this.label4.Text = "IEU input"; // // imgPath_textBox // this.imgPath_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.imgPath_textBox.Location = new System.Drawing.Point(84, 70); + this.imgPath_textBox.Location = new System.Drawing.Point(111, 45); this.imgPath_textBox.Name = "imgPath_textBox"; this.imgPath_textBox.ReadOnly = true; this.imgPath_textBox.Size = new System.Drawing.Size(502, 20); @@ -1249,34 +1738,98 @@ private void InitializeComponent() // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 47); + this.label3.Location = new System.Drawing.Point(48, 76); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(76, 13); + this.label3.Size = new System.Drawing.Size(58, 13); this.label3.TabIndex = 18; - this.label3.Text = "Merged results"; + this.label3.Text = "IEU output"; // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(26, 21); + this.label1.Location = new System.Drawing.Point(5, 23); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(52, 13); + this.label1.Size = new System.Drawing.Size(98, 13); this.label1.TabIndex = 16; - this.label1.Text = "ESRGAN"; + this.label1.Text = "ESRGAN/BasicSR"; // // settingsOutputFormat_tabPage // + this.settingsOutputFormat_tabPage.Controls.Add(this.textBox1); + this.settingsOutputFormat_tabPage.Controls.Add(this.textBox2); + this.settingsOutputFormat_tabPage.Controls.Add(this.button2); + this.settingsOutputFormat_tabPage.Controls.Add(this.label32); + this.settingsOutputFormat_tabPage.Controls.Add(this.label33); + this.settingsOutputFormat_tabPage.Controls.Add(this.button3); this.settingsOutputFormat_tabPage.Controls.Add(this.groupBox2); this.settingsOutputFormat_tabPage.Controls.Add(this.groupBox3); this.settingsOutputFormat_tabPage.Controls.Add(this.tiffSetting_groupBox); this.settingsOutputFormat_tabPage.Controls.Add(this.ddsOutputSettings_groupBox); this.settingsOutputFormat_tabPage.Location = new System.Drawing.Point(4, 25); this.settingsOutputFormat_tabPage.Name = "settingsOutputFormat_tabPage"; - this.settingsOutputFormat_tabPage.Size = new System.Drawing.Size(770, 613); + this.settingsOutputFormat_tabPage.Size = new System.Drawing.Size(1263, 812); this.settingsOutputFormat_tabPage.TabIndex = 4; this.settingsOutputFormat_tabPage.Text = "Output formats"; this.settingsOutputFormat_tabPage.UseVisualStyleBackColor = true; // + // textBox1 + // + this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.textBox1.Location = new System.Drawing.Point(75, 409); + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(553, 20); + this.textBox1.TabIndex = 47; + this.toolTip1.SetToolTip(this.textBox1, "ESRGAN root folder"); + // + // textBox2 + // + this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.textBox2.Location = new System.Drawing.Point(75, 435); + this.textBox2.Name = "textBox2"; + this.textBox2.ReadOnly = true; + this.textBox2.Size = new System.Drawing.Size(553, 20); + this.textBox2.TabIndex = 48; + this.toolTip1.SetToolTip(this.textBox2, "IEU output folder"); + // + // button2 + // + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button2.Location = new System.Drawing.Point(634, 436); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(39, 20); + this.button2.TabIndex = 51; + this.button2.Text = "..."; + this.button2.UseVisualStyleBackColor = true; + // + // label32 + // + this.label32.AutoSize = true; + this.label32.Location = new System.Drawing.Point(31, 413); + this.label32.Name = "label32"; + this.label32.Size = new System.Drawing.Size(42, 13); + this.label32.TabIndex = 49; + this.label32.Text = "Original"; + // + // label33 + // + this.label33.AutoSize = true; + this.label33.Location = new System.Drawing.Point(36, 437); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(37, 13); + this.label33.TabIndex = 50; + this.label33.Text = "Result"; + // + // button3 + // + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button3.Location = new System.Drawing.Point(634, 410); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(39, 20); + this.button3.TabIndex = 52; + this.button3.Text = "..."; + this.button3.UseVisualStyleBackColor = true; + // // groupBox2 // this.groupBox2.Controls.Add(this.webpLossless_checkBox); @@ -1294,9 +1847,10 @@ private void InitializeComponent() // webpLossless_checkBox // this.webpLossless_checkBox.AutoSize = true; + this.webpLossless_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.webpLossless_checkBox.Location = new System.Drawing.Point(9, 24); this.webpLossless_checkBox.Name = "webpLossless_checkBox"; - this.webpLossless_checkBox.Size = new System.Drawing.Size(66, 17); + this.webpLossless_checkBox.Size = new System.Drawing.Size(64, 17); this.webpLossless_checkBox.TabIndex = 47; this.webpLossless_checkBox.Text = "Lossless"; this.webpLossless_checkBox.UseVisualStyleBackColor = true; @@ -1304,6 +1858,7 @@ private void InitializeComponent() // // webpQuality_numericUpDown // + this.webpQuality_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.webpQuality_numericUpDown.Location = new System.Drawing.Point(111, 73); this.webpQuality_numericUpDown.Name = "webpQuality_numericUpDown"; this.webpQuality_numericUpDown.Size = new System.Drawing.Size(48, 20); @@ -1334,6 +1889,7 @@ private void InitializeComponent() // // webpPreset_comboBox // + this.webpPreset_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.webpPreset_comboBox.FormattingEnabled = true; this.webpPreset_comboBox.Location = new System.Drawing.Point(111, 44); this.webpPreset_comboBox.Name = "webpPreset_comboBox"; @@ -1353,6 +1909,7 @@ private void InitializeComponent() // // pngCompression_numericUpDown // + this.pngCompression_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.pngCompression_numericUpDown.Location = new System.Drawing.Point(111, 19); this.pngCompression_numericUpDown.Maximum = new decimal(new int[] { 9, @@ -1389,6 +1946,7 @@ private void InitializeComponent() // // tiffJpegQuality_numericUpDown // + this.tiffJpegQuality_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.tiffJpegQuality_numericUpDown.Location = new System.Drawing.Point(112, 44); this.tiffJpegQuality_numericUpDown.Name = "tiffJpegQuality_numericUpDown"; this.tiffJpegQuality_numericUpDown.Size = new System.Drawing.Size(48, 20); @@ -1411,423 +1969,294 @@ private void InitializeComponent() // label24 // this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(6, 20); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(100, 13); - this.label24.TabIndex = 2; - this.label24.Text = "Compresion method"; - // - // tiffSettings_comboBox - // - this.tiffSettings_comboBox.FormattingEnabled = true; - this.tiffSettings_comboBox.Location = new System.Drawing.Point(112, 15); - this.tiffSettings_comboBox.Name = "tiffSettings_comboBox"; - this.tiffSettings_comboBox.Size = new System.Drawing.Size(96, 21); - this.tiffSettings_comboBox.TabIndex = 45; - // - // ddsOutputSettings_groupBox - // - this.ddsOutputSettings_groupBox.Controls.Add(this.label17); - this.ddsOutputSettings_groupBox.Controls.Add(this.label16); - this.ddsOutputSettings_groupBox.Controls.Add(this.label15); - this.ddsOutputSettings_groupBox.Controls.Add(this.ddsGenerateMipmaps_checkBox); - this.ddsOutputSettings_groupBox.Controls.Add(this.ddsCompresion_comboBox); - this.ddsOutputSettings_groupBox.Controls.Add(this.ddsFileFormat_comboBox); - this.ddsOutputSettings_groupBox.Controls.Add(this.ddsTextureType_comboBox); - this.ddsOutputSettings_groupBox.Location = new System.Drawing.Point(368, 17); - this.ddsOutputSettings_groupBox.Name = "ddsOutputSettings_groupBox"; - this.ddsOutputSettings_groupBox.Size = new System.Drawing.Size(344, 139); - this.ddsOutputSettings_groupBox.TabIndex = 42; - this.ddsOutputSettings_groupBox.TabStop = false; - this.ddsOutputSettings_groupBox.Text = "DDS output settings"; - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(8, 86); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(90, 13); - this.label17.TabIndex = 3; - this.label17.Text = "BC7 Compression"; - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(8, 59); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(67, 13); - this.label16.TabIndex = 2; - this.label16.Text = "Compression"; - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(8, 31); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(66, 13); - this.label15.TabIndex = 2; - this.label15.Text = "Texture type"; - // - // ddsGenerateMipmaps_checkBox - // - this.ddsGenerateMipmaps_checkBox.AutoSize = true; - this.ddsGenerateMipmaps_checkBox.Checked = true; - this.ddsGenerateMipmaps_checkBox.CheckState = System.Windows.Forms.CheckState.Checked; - this.ddsGenerateMipmaps_checkBox.Location = new System.Drawing.Point(104, 110); - this.ddsGenerateMipmaps_checkBox.Name = "ddsGenerateMipmaps_checkBox"; - this.ddsGenerateMipmaps_checkBox.Size = new System.Drawing.Size(114, 17); - this.ddsGenerateMipmaps_checkBox.TabIndex = 1; - this.ddsGenerateMipmaps_checkBox.Text = "Generate mipmaps"; - this.ddsGenerateMipmaps_checkBox.UseVisualStyleBackColor = true; - // - // ddsCompresion_comboBox - // - this.ddsCompresion_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ddsCompresion_comboBox.FormattingEnabled = true; - this.ddsCompresion_comboBox.Location = new System.Drawing.Point(104, 83); - this.ddsCompresion_comboBox.Name = "ddsCompresion_comboBox"; - this.ddsCompresion_comboBox.Size = new System.Drawing.Size(222, 21); - this.ddsCompresion_comboBox.TabIndex = 0; - // - // ddsFileFormat_comboBox - // - this.ddsFileFormat_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ddsFileFormat_comboBox.FormattingEnabled = true; - this.ddsFileFormat_comboBox.Location = new System.Drawing.Point(104, 56); - this.ddsFileFormat_comboBox.Name = "ddsFileFormat_comboBox"; - this.ddsFileFormat_comboBox.Size = new System.Drawing.Size(222, 21); - this.ddsFileFormat_comboBox.TabIndex = 0; - // - // ddsTextureType_comboBox - // - this.ddsTextureType_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.ddsTextureType_comboBox.FormattingEnabled = true; - this.ddsTextureType_comboBox.Location = new System.Drawing.Point(104, 28); - this.ddsTextureType_comboBox.Name = "ddsTextureType_comboBox"; - this.ddsTextureType_comboBox.Size = new System.Drawing.Size(222, 21); - this.ddsTextureType_comboBox.TabIndex = 0; - // - // advanced_tabPage - // - this.advanced_tabPage.Controls.Add(this.imagePostprocess_groupBox); - this.advanced_tabPage.Controls.Add(this.imagePreprocess_groupBox); - this.advanced_tabPage.Controls.Add(this.changeModelsPath_button); - this.advanced_tabPage.Controls.Add(this.upscaleSize_groupBox); - this.advanced_tabPage.Controls.Add(this.changeOutputPath_button); - this.advanced_tabPage.Controls.Add(this.filters_groupBox); - this.advanced_tabPage.Controls.Add(this.label8); - this.advanced_tabPage.Controls.Add(this.advancedSuffix_textBox); - this.advanced_tabPage.Controls.Add(this.changeInputPath_button); - this.advanced_tabPage.Controls.Add(this.advancedUseSuffix_checkBox); - this.advanced_tabPage.Controls.Add(this.inputPath_textBox); - this.advanced_tabPage.Controls.Add(this.outputPath_textBox); - this.advanced_tabPage.Controls.Add(this.modelsPath_textBox); - this.advanced_tabPage.Controls.Add(this.label7); - this.advanced_tabPage.Controls.Add(this.label2); - this.advanced_tabPage.Location = new System.Drawing.Point(4, 25); - this.advanced_tabPage.Name = "advanced_tabPage"; - this.advanced_tabPage.Size = new System.Drawing.Size(770, 613); - this.advanced_tabPage.TabIndex = 2; - this.advanced_tabPage.Text = "Advanced"; - this.advanced_tabPage.UseVisualStyleBackColor = true; - // - // imagePostprocess_groupBox - // - this.imagePostprocess_groupBox.Controls.Add(this.label22); - this.imagePostprocess_groupBox.Controls.Add(this.threshold_groupBox); - this.imagePostprocess_groupBox.Controls.Add(this.label21); - this.imagePostprocess_groupBox.Controls.Add(this.resizeImageAfterFilterType_comboBox); - this.imagePostprocess_groupBox.Controls.Add(this.resizeImageAfterScaleFactor_comboBox); - this.imagePostprocess_groupBox.Location = new System.Drawing.Point(442, 407); - this.imagePostprocess_groupBox.Name = "imagePostprocess_groupBox"; - this.imagePostprocess_groupBox.Size = new System.Drawing.Size(269, 198); - this.imagePostprocess_groupBox.TabIndex = 42; - this.imagePostprocess_groupBox.TabStop = false; - this.imagePostprocess_groupBox.Text = "Image postprocess"; - // - // label22 - // - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(177, 127); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(16, 13); - this.label22.TabIndex = 2; - this.label22.Text = "to"; - // - // threshold_groupBox - // - this.threshold_groupBox.Controls.Add(this.thresholdBlack_numericUpDown); - this.threshold_groupBox.Controls.Add(this.label13); - this.threshold_groupBox.Controls.Add(this.thresholdEnabled_checkBox); - this.threshold_groupBox.Controls.Add(this.label12); - this.threshold_groupBox.Controls.Add(this.thresholdWhite_numericUpDown); - this.threshold_groupBox.Location = new System.Drawing.Point(12, 22); - this.threshold_groupBox.Name = "threshold_groupBox"; - this.threshold_groupBox.Size = new System.Drawing.Size(204, 88); - this.threshold_groupBox.TabIndex = 3; - this.threshold_groupBox.TabStop = false; - this.threshold_groupBox.Text = "Threshold"; - // - // thresholdBlack_numericUpDown - // - this.thresholdBlack_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.thresholdBlack_numericUpDown.Enabled = false; - this.thresholdBlack_numericUpDown.Location = new System.Drawing.Point(91, 24); - this.thresholdBlack_numericUpDown.Name = "thresholdBlack_numericUpDown"; - this.thresholdBlack_numericUpDown.Size = new System.Drawing.Size(45, 20); - this.thresholdBlack_numericUpDown.TabIndex = 1; - this.toolTip1.SetToolTip(this.thresholdBlack_numericUpDown, "Make all pixels darker than percentage true black"); - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.label13.Location = new System.Drawing.Point(137, 54); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(46, 13); - this.label13.TabIndex = 2; - this.label13.Text = "% White"; - // - // thresholdEnabled_checkBox - // - this.thresholdEnabled_checkBox.AutoSize = true; - this.thresholdEnabled_checkBox.Location = new System.Drawing.Point(12, 38); - this.thresholdEnabled_checkBox.Name = "thresholdEnabled_checkBox"; - this.thresholdEnabled_checkBox.Size = new System.Drawing.Size(73, 17); - this.thresholdEnabled_checkBox.TabIndex = 0; - this.thresholdEnabled_checkBox.Text = "Threshold"; - this.thresholdEnabled_checkBox.UseVisualStyleBackColor = true; - this.thresholdEnabled_checkBox.CheckedChanged += new System.EventHandler(this.thresholdEnabled_checkBox_CheckedChanged); - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.label12.Location = new System.Drawing.Point(137, 28); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(45, 13); - this.label12.TabIndex = 2; - this.label12.Text = "% Black"; - // - // thresholdWhite_numericUpDown - // - this.thresholdWhite_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.thresholdWhite_numericUpDown.Enabled = false; - this.thresholdWhite_numericUpDown.Increment = new decimal(new int[] { - 100, - 0, - 0, - 0}); - this.thresholdWhite_numericUpDown.Location = new System.Drawing.Point(91, 50); - this.thresholdWhite_numericUpDown.Name = "thresholdWhite_numericUpDown"; - this.thresholdWhite_numericUpDown.Size = new System.Drawing.Size(45, 20); - this.thresholdWhite_numericUpDown.TabIndex = 1; - this.toolTip1.SetToolTip(this.thresholdWhite_numericUpDown, "Make all pixels brighter than percentage true white"); - this.thresholdWhite_numericUpDown.Value = new decimal(new int[] { - 100, - 0, - 0, - 0}); - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(6, 126); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(61, 13); - this.label21.TabIndex = 2; - this.label21.Text = "Resize with"; - // - // resizeImageAfterFilterType_comboBox - // - this.resizeImageAfterFilterType_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.resizeImageAfterFilterType_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.resizeImageAfterFilterType_comboBox.FormattingEnabled = true; - this.resizeImageAfterFilterType_comboBox.Location = new System.Drawing.Point(68, 123); - this.resizeImageAfterFilterType_comboBox.Name = "resizeImageAfterFilterType_comboBox"; - this.resizeImageAfterFilterType_comboBox.Size = new System.Drawing.Size(102, 21); - this.resizeImageAfterFilterType_comboBox.TabIndex = 0; + this.label24.Location = new System.Drawing.Point(6, 20); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(100, 13); + this.label24.TabIndex = 2; + this.label24.Text = "Compresion method"; // - // resizeImageAfterScaleFactor_comboBox + // tiffSettings_comboBox // - this.resizeImageAfterScaleFactor_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.resizeImageAfterScaleFactor_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.resizeImageAfterScaleFactor_comboBox.FormattingEnabled = true; - this.resizeImageAfterScaleFactor_comboBox.Location = new System.Drawing.Point(200, 123); - this.resizeImageAfterScaleFactor_comboBox.Name = "resizeImageAfterScaleFactor_comboBox"; - this.resizeImageAfterScaleFactor_comboBox.Size = new System.Drawing.Size(60, 21); - this.resizeImageAfterScaleFactor_comboBox.TabIndex = 0; + this.tiffSettings_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.tiffSettings_comboBox.FormattingEnabled = true; + this.tiffSettings_comboBox.Location = new System.Drawing.Point(112, 15); + this.tiffSettings_comboBox.Name = "tiffSettings_comboBox"; + this.tiffSettings_comboBox.Size = new System.Drawing.Size(96, 21); + this.tiffSettings_comboBox.TabIndex = 45; // - // imagePreprocess_groupBox + // ddsOutputSettings_groupBox // - this.imagePreprocess_groupBox.Controls.Add(this.label20); - this.imagePreprocess_groupBox.Controls.Add(this.label19); - this.imagePreprocess_groupBox.Controls.Add(this.label14); - this.imagePreprocess_groupBox.Controls.Add(this.resizeImageBeforeScaleFactor_comboBox); - this.imagePreprocess_groupBox.Controls.Add(this.resizeImageBeforeFilterType_comboBox); - this.imagePreprocess_groupBox.Controls.Add(this.noiseReductionType_comboBox); - this.imagePreprocess_groupBox.Location = new System.Drawing.Point(7, 407); - this.imagePreprocess_groupBox.Name = "imagePreprocess_groupBox"; - this.imagePreprocess_groupBox.Size = new System.Drawing.Size(429, 198); - this.imagePreprocess_groupBox.TabIndex = 41; - this.imagePreprocess_groupBox.TabStop = false; - this.imagePreprocess_groupBox.Text = "Image preprocess"; + this.ddsOutputSettings_groupBox.Controls.Add(this.label17); + this.ddsOutputSettings_groupBox.Controls.Add(this.label16); + this.ddsOutputSettings_groupBox.Controls.Add(this.label15); + this.ddsOutputSettings_groupBox.Controls.Add(this.ddsGenerateMipmaps_checkBox); + this.ddsOutputSettings_groupBox.Controls.Add(this.ddsCompresion_comboBox); + this.ddsOutputSettings_groupBox.Controls.Add(this.ddsFileFormat_comboBox); + this.ddsOutputSettings_groupBox.Controls.Add(this.ddsTextureType_comboBox); + this.ddsOutputSettings_groupBox.Location = new System.Drawing.Point(368, 17); + this.ddsOutputSettings_groupBox.Name = "ddsOutputSettings_groupBox"; + this.ddsOutputSettings_groupBox.Size = new System.Drawing.Size(344, 139); + this.ddsOutputSettings_groupBox.TabIndex = 42; + this.ddsOutputSettings_groupBox.TabStop = false; + this.ddsOutputSettings_groupBox.Text = "DDS output settings"; // - // label20 + // label17 // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(217, 61); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(16, 13); - this.label20.TabIndex = 2; - this.label20.Text = "to"; + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(8, 86); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(90, 13); + this.label17.TabIndex = 3; + this.label17.Text = "BC7 Compression"; // - // label19 + // label16 // - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(20, 61); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(61, 13); - this.label19.TabIndex = 2; - this.label19.Text = "Resize with"; + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(8, 59); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(67, 13); + this.label16.TabIndex = 2; + this.label16.Text = "Compression"; // - // label14 + // label15 // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(8, 29); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(73, 13); - this.label14.TabIndex = 1; - this.label14.Text = "Reduce noise"; + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(8, 31); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(66, 13); + this.label15.TabIndex = 2; + this.label15.Text = "Texture type"; // - // resizeImageBeforeScaleFactor_comboBox + // ddsGenerateMipmaps_checkBox // - this.resizeImageBeforeScaleFactor_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.resizeImageBeforeScaleFactor_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.resizeImageBeforeScaleFactor_comboBox.FormattingEnabled = true; - this.resizeImageBeforeScaleFactor_comboBox.Location = new System.Drawing.Point(239, 57); - this.resizeImageBeforeScaleFactor_comboBox.Name = "resizeImageBeforeScaleFactor_comboBox"; - this.resizeImageBeforeScaleFactor_comboBox.Size = new System.Drawing.Size(60, 21); - this.resizeImageBeforeScaleFactor_comboBox.TabIndex = 0; + this.ddsGenerateMipmaps_checkBox.AutoSize = true; + this.ddsGenerateMipmaps_checkBox.Checked = true; + this.ddsGenerateMipmaps_checkBox.CheckState = System.Windows.Forms.CheckState.Checked; + this.ddsGenerateMipmaps_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.ddsGenerateMipmaps_checkBox.Location = new System.Drawing.Point(104, 110); + this.ddsGenerateMipmaps_checkBox.Name = "ddsGenerateMipmaps_checkBox"; + this.ddsGenerateMipmaps_checkBox.Size = new System.Drawing.Size(112, 17); + this.ddsGenerateMipmaps_checkBox.TabIndex = 1; + this.ddsGenerateMipmaps_checkBox.Text = "Generate mipmaps"; + this.ddsGenerateMipmaps_checkBox.UseVisualStyleBackColor = true; // - // resizeImageBeforeFilterType_comboBox + // ddsCompresion_comboBox // - this.resizeImageBeforeFilterType_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.resizeImageBeforeFilterType_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.resizeImageBeforeFilterType_comboBox.FormattingEnabled = true; - this.resizeImageBeforeFilterType_comboBox.Location = new System.Drawing.Point(87, 57); - this.resizeImageBeforeFilterType_comboBox.Name = "resizeImageBeforeFilterType_comboBox"; - this.resizeImageBeforeFilterType_comboBox.Size = new System.Drawing.Size(127, 21); - this.resizeImageBeforeFilterType_comboBox.TabIndex = 0; + this.ddsCompresion_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.ddsCompresion_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.ddsCompresion_comboBox.FormattingEnabled = true; + this.ddsCompresion_comboBox.Location = new System.Drawing.Point(104, 83); + this.ddsCompresion_comboBox.Name = "ddsCompresion_comboBox"; + this.ddsCompresion_comboBox.Size = new System.Drawing.Size(222, 21); + this.ddsCompresion_comboBox.TabIndex = 0; // - // noiseReductionType_comboBox + // ddsFileFormat_comboBox // - this.noiseReductionType_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.noiseReductionType_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.noiseReductionType_comboBox.FormattingEnabled = true; - this.noiseReductionType_comboBox.Location = new System.Drawing.Point(87, 26); - this.noiseReductionType_comboBox.Name = "noiseReductionType_comboBox"; - this.noiseReductionType_comboBox.Size = new System.Drawing.Size(127, 21); - this.noiseReductionType_comboBox.TabIndex = 0; - this.toolTip1.SetToolTip(this.noiseReductionType_comboBox, "Try to remove image noise with specific ImageMagick method"); + this.ddsFileFormat_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.ddsFileFormat_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.ddsFileFormat_comboBox.FormattingEnabled = true; + this.ddsFileFormat_comboBox.Location = new System.Drawing.Point(104, 56); + this.ddsFileFormat_comboBox.Name = "ddsFileFormat_comboBox"; + this.ddsFileFormat_comboBox.Size = new System.Drawing.Size(222, 21); + this.ddsFileFormat_comboBox.TabIndex = 0; // - // changeModelsPath_button + // ddsTextureType_comboBox // - this.changeModelsPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.changeModelsPath_button.Location = new System.Drawing.Point(591, 69); - this.changeModelsPath_button.Name = "changeModelsPath_button"; - this.changeModelsPath_button.Size = new System.Drawing.Size(39, 20); - this.changeModelsPath_button.TabIndex = 29; - this.changeModelsPath_button.Text = "..."; - this.changeModelsPath_button.UseVisualStyleBackColor = true; - this.changeModelsPath_button.Click += new System.EventHandler(this.changePath_button_Click); + this.ddsTextureType_comboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.ddsTextureType_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.ddsTextureType_comboBox.FormattingEnabled = true; + this.ddsTextureType_comboBox.Location = new System.Drawing.Point(104, 28); + this.ddsTextureType_comboBox.Name = "ddsTextureType_comboBox"; + this.ddsTextureType_comboBox.Size = new System.Drawing.Size(222, 21); + this.ddsTextureType_comboBox.TabIndex = 0; // - // upscaleSize_groupBox - // - this.upscaleSize_groupBox.Controls.Add(this.x1_radioButton); - this.upscaleSize_groupBox.Controls.Add(this.x2_radioButton); - this.upscaleSize_groupBox.Controls.Add(this.x4_radioButton); - this.upscaleSize_groupBox.Location = new System.Drawing.Point(977, 618); - this.upscaleSize_groupBox.Name = "upscaleSize_groupBox"; - this.upscaleSize_groupBox.Size = new System.Drawing.Size(129, 54); - this.upscaleSize_groupBox.TabIndex = 39; - this.upscaleSize_groupBox.TabStop = false; - this.upscaleSize_groupBox.Text = "Upscale Size"; - this.upscaleSize_groupBox.Visible = false; - // - // x1_radioButton - // - this.x1_radioButton.AutoSize = true; - this.x1_radioButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.x1_radioButton.Location = new System.Drawing.Point(6, 23); - this.x1_radioButton.Name = "x1_radioButton"; - this.x1_radioButton.Size = new System.Drawing.Size(35, 17); - this.x1_radioButton.TabIndex = 12; - this.x1_radioButton.Tag = "1"; - this.x1_radioButton.Text = "x1"; - this.x1_radioButton.UseVisualStyleBackColor = true; - // - // x2_radioButton - // - this.x2_radioButton.AutoSize = true; - this.x2_radioButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.x2_radioButton.Location = new System.Drawing.Point(48, 23); - this.x2_radioButton.Name = "x2_radioButton"; - this.x2_radioButton.Size = new System.Drawing.Size(35, 17); - this.x2_radioButton.TabIndex = 10; - this.x2_radioButton.Tag = "2"; - this.x2_radioButton.Text = "x2"; - this.x2_radioButton.UseVisualStyleBackColor = true; - // - // x4_radioButton - // - this.x4_radioButton.AutoSize = true; - this.x4_radioButton.Checked = true; - this.x4_radioButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.x4_radioButton.Location = new System.Drawing.Point(90, 23); - this.x4_radioButton.Name = "x4_radioButton"; - this.x4_radioButton.Size = new System.Drawing.Size(35, 17); - this.x4_radioButton.TabIndex = 11; - this.x4_radioButton.TabStop = true; - this.x4_radioButton.Tag = "4"; - this.x4_radioButton.Text = "x4"; - this.x4_radioButton.UseVisualStyleBackColor = true; + // advanced_tabPage // - // changeOutputPath_button + this.advanced_tabPage.Controls.Add(this.disableRuleSystem_checkBox); + this.advanced_tabPage.Controls.Add(this.rules_groupBox); + this.advanced_tabPage.Controls.Add(this.filters_groupBox); + this.advanced_tabPage.Location = new System.Drawing.Point(4, 25); + this.advanced_tabPage.Name = "advanced_tabPage"; + this.advanced_tabPage.Size = new System.Drawing.Size(1263, 812); + this.advanced_tabPage.TabIndex = 2; + this.advanced_tabPage.Text = "Filters/Rules"; + this.advanced_tabPage.UseVisualStyleBackColor = true; // - this.changeOutputPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.changeOutputPath_button.Location = new System.Drawing.Point(591, 43); - this.changeOutputPath_button.Name = "changeOutputPath_button"; - this.changeOutputPath_button.Size = new System.Drawing.Size(39, 20); - this.changeOutputPath_button.TabIndex = 29; - this.changeOutputPath_button.Text = "..."; - this.changeOutputPath_button.UseVisualStyleBackColor = true; - this.changeOutputPath_button.Click += new System.EventHandler(this.changePath_button_Click); + // disableRuleSystem_checkBox + // + this.disableRuleSystem_checkBox.AutoSize = true; + this.disableRuleSystem_checkBox.Location = new System.Drawing.Point(562, 494); + this.disableRuleSystem_checkBox.Name = "disableRuleSystem_checkBox"; + this.disableRuleSystem_checkBox.Size = new System.Drawing.Size(123, 17); + this.disableRuleSystem_checkBox.TabIndex = 41; + this.disableRuleSystem_checkBox.Text = "Disable Rule System"; + this.disableRuleSystem_checkBox.UseVisualStyleBackColor = true; + // + // rules_groupBox + // + this.rules_groupBox.Controls.Add(this.rulePriority_numericUpDown); + this.rules_groupBox.Controls.Add(this.deleteRule_button); + this.rules_groupBox.Controls.Add(this.rules_listBox); + this.rules_groupBox.Controls.Add(this.newRuleName_textBox); + this.rules_groupBox.Controls.Add(this.ruleProfiles_comboBox); + this.rules_groupBox.Controls.Add(this.ruleFilters_comboBox); + this.rules_groupBox.Controls.Add(this.saveRuleFromCurrent_button); + this.rules_groupBox.Controls.Add(this.saveRule_button); + this.rules_groupBox.Controls.Add(this.loadRule_button); + this.rules_groupBox.Location = new System.Drawing.Point(562, 3); + this.rules_groupBox.Name = "rules_groupBox"; + this.rules_groupBox.Size = new System.Drawing.Size(200, 485); + this.rules_groupBox.TabIndex = 40; + this.rules_groupBox.TabStop = false; + this.rules_groupBox.Text = "Rules"; + // + // rulePriority_numericUpDown + // + this.rulePriority_numericUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.rulePriority_numericUpDown.Location = new System.Drawing.Point(134, 274); + this.rulePriority_numericUpDown.Name = "rulePriority_numericUpDown"; + this.rulePriority_numericUpDown.ReadOnly = true; + this.rulePriority_numericUpDown.Size = new System.Drawing.Size(47, 20); + this.rulePriority_numericUpDown.TabIndex = 59; + this.rulePriority_numericUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.toolTip1.SetToolTip(this.rulePriority_numericUpDown, "Rule priority. Rules with higher priority will be applied first."); + this.rulePriority_numericUpDown.ValueChanged += new System.EventHandler(this.RulePriority_numericUpDown_ValueChanged); + // + // deleteRule_button + // + this.deleteRule_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.deleteRule_button.Location = new System.Drawing.Point(20, 410); + this.deleteRule_button.Name = "deleteRule_button"; + this.deleteRule_button.Size = new System.Drawing.Size(161, 31); + this.deleteRule_button.TabIndex = 58; + this.deleteRule_button.Text = "Delete rule"; + this.deleteRule_button.UseVisualStyleBackColor = true; + this.deleteRule_button.Click += new System.EventHandler(this.DeleteRule_button_Click); + // + // rules_listBox + // + this.rules_listBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.rules_listBox.FormattingEnabled = true; + this.rules_listBox.Location = new System.Drawing.Point(20, 25); + this.rules_listBox.Name = "rules_listBox"; + this.rules_listBox.Size = new System.Drawing.Size(161, 184); + this.rules_listBox.TabIndex = 1; + this.rules_listBox.SelectedIndexChanged += new System.EventHandler(this.Rules_listBox_SelectedIndexChanged); + // + // newRuleName_textBox + // + this.newRuleName_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.newRuleName_textBox.Location = new System.Drawing.Point(20, 274); + this.newRuleName_textBox.Name = "newRuleName_textBox"; + this.newRuleName_textBox.Size = new System.Drawing.Size(110, 20); + this.newRuleName_textBox.TabIndex = 57; + this.toolTip1.SetToolTip(this.newRuleName_textBox, "Rule name"); + this.newRuleName_textBox.TextChanged += new System.EventHandler(this.NewRuleName_textBox_TextChanged); + // + // ruleProfiles_comboBox + // + this.ruleProfiles_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.ruleProfiles_comboBox.FormattingEnabled = true; + this.ruleProfiles_comboBox.Location = new System.Drawing.Point(20, 242); + this.ruleProfiles_comboBox.Name = "ruleProfiles_comboBox"; + this.ruleProfiles_comboBox.Size = new System.Drawing.Size(161, 21); + this.ruleProfiles_comboBox.TabIndex = 0; + this.toolTip1.SetToolTip(this.ruleProfiles_comboBox, "Profile for rule"); + // + // ruleFilters_comboBox + // + this.ruleFilters_comboBox.BackColor = System.Drawing.SystemColors.Window; + this.ruleFilters_comboBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.ruleFilters_comboBox.FormattingEnabled = true; + this.ruleFilters_comboBox.Location = new System.Drawing.Point(20, 216); + this.ruleFilters_comboBox.Name = "ruleFilters_comboBox"; + this.ruleFilters_comboBox.Size = new System.Drawing.Size(161, 21); + this.ruleFilters_comboBox.TabIndex = 0; + this.toolTip1.SetToolTip(this.ruleFilters_comboBox, "Filter for rule"); + // + // saveRuleFromCurrent_button + // + this.saveRuleFromCurrent_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.saveRuleFromCurrent_button.Location = new System.Drawing.Point(20, 339); + this.saveRuleFromCurrent_button.Name = "saveRuleFromCurrent_button"; + this.saveRuleFromCurrent_button.Size = new System.Drawing.Size(161, 31); + this.saveRuleFromCurrent_button.TabIndex = 55; + this.saveRuleFromCurrent_button.Text = "Save from current filter/profile"; + this.saveRuleFromCurrent_button.UseVisualStyleBackColor = true; + this.saveRuleFromCurrent_button.Click += new System.EventHandler(this.SaveRule_button_Click); + // + // saveRule_button + // + this.saveRule_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.saveRule_button.Location = new System.Drawing.Point(20, 303); + this.saveRule_button.Name = "saveRule_button"; + this.saveRule_button.Size = new System.Drawing.Size(161, 31); + this.saveRule_button.TabIndex = 55; + this.saveRule_button.Text = "Save from selected filter/profile"; + this.saveRule_button.UseVisualStyleBackColor = true; + this.saveRule_button.Click += new System.EventHandler(this.SaveRule_button_Click); + // + // loadRule_button + // + this.loadRule_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.loadRule_button.Location = new System.Drawing.Point(20, 375); + this.loadRule_button.Name = "loadRule_button"; + this.loadRule_button.Size = new System.Drawing.Size(161, 31); + this.loadRule_button.TabIndex = 56; + this.loadRule_button.Text = "Load rule"; + this.loadRule_button.UseVisualStyleBackColor = true; + this.loadRule_button.Click += new System.EventHandler(this.LoadRule_button_Click); // // filters_groupBox // + this.filters_groupBox.Controls.Add(this.deleteFilter_button); this.filters_groupBox.Controls.Add(this.filterExtensions_checkedListBox); + this.filters_groupBox.Controls.Add(this.newFilterName_textBox); this.filters_groupBox.Controls.Add(this.filtersSize_groupBox); + this.filters_groupBox.Controls.Add(this.saveFilter_button); + this.filters_groupBox.Controls.Add(this.groupBox10); this.filters_groupBox.Controls.Add(this.filtersFilename_groupBox); + this.filters_groupBox.Controls.Add(this.loadFilter_button); this.filters_groupBox.Controls.Add(this.checkBox3); + this.filters_groupBox.Controls.Add(this.filters_listBox); this.filters_groupBox.Controls.Add(this.filtersAlpha_groupBox); - this.filters_groupBox.Location = new System.Drawing.Point(7, 131); + this.filters_groupBox.Location = new System.Drawing.Point(0, 3); this.filters_groupBox.Name = "filters_groupBox"; - this.filters_groupBox.Size = new System.Drawing.Size(704, 270); + this.filters_groupBox.Size = new System.Drawing.Size(537, 631); this.filters_groupBox.TabIndex = 32; this.filters_groupBox.TabStop = false; this.filters_groupBox.Text = "Filters"; // + // deleteFilter_button + // + this.deleteFilter_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.deleteFilter_button.Location = new System.Drawing.Point(162, 583); + this.deleteFilter_button.Name = "deleteFilter_button"; + this.deleteFilter_button.Size = new System.Drawing.Size(149, 31); + this.deleteFilter_button.TabIndex = 58; + this.deleteFilter_button.Text = "Delete filter"; + this.deleteFilter_button.UseVisualStyleBackColor = true; + this.deleteFilter_button.Click += new System.EventHandler(this.DeleteFilter_button_Click); + // // filterExtensions_checkedListBox // this.filterExtensions_checkedListBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.filterExtensions_checkedListBox.CheckOnClick = true; this.filterExtensions_checkedListBox.FormattingEnabled = true; - this.filterExtensions_checkedListBox.Location = new System.Drawing.Point(425, 38); + this.filterExtensions_checkedListBox.Location = new System.Drawing.Point(388, 25); this.filterExtensions_checkedListBox.Name = "filterExtensions_checkedListBox"; - this.filterExtensions_checkedListBox.Size = new System.Drawing.Size(120, 197); + this.filterExtensions_checkedListBox.Size = new System.Drawing.Size(128, 182); this.filterExtensions_checkedListBox.TabIndex = 10; this.filterExtensions_checkedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.filterExtensions_checkedListBox_ItemCheck); // + // newFilterName_textBox + // + this.newFilterName_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.newFilterName_textBox.Location = new System.Drawing.Point(165, 443); + this.newFilterName_textBox.Name = "newFilterName_textBox"; + this.newFilterName_textBox.Size = new System.Drawing.Size(149, 20); + this.newFilterName_textBox.TabIndex = 57; + // // filtersSize_groupBox // this.filtersSize_groupBox.Controls.Add(this.filtersSizeOn_checkBox); @@ -1836,9 +2265,9 @@ private void InitializeComponent() this.filtersSize_groupBox.Controls.Add(this.label11); this.filtersSize_groupBox.Controls.Add(this.filterSizeOr_checkBox); this.filtersSize_groupBox.Controls.Add(this.label10); - this.filtersSize_groupBox.Location = new System.Drawing.Point(181, 141); + this.filtersSize_groupBox.Location = new System.Drawing.Point(140, 274); this.filtersSize_groupBox.Name = "filtersSize_groupBox"; - this.filtersSize_groupBox.Size = new System.Drawing.Size(227, 94); + this.filtersSize_groupBox.Size = new System.Drawing.Size(242, 86); this.filtersSize_groupBox.TabIndex = 9; this.filtersSize_groupBox.TabStop = false; this.filtersSize_groupBox.Text = "Size"; @@ -1925,6 +2354,84 @@ private void InitializeComponent() this.label10.TabIndex = 7; this.label10.Text = "Width"; // + // saveFilter_button + // + this.saveFilter_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.saveFilter_button.Location = new System.Drawing.Point(162, 514); + this.saveFilter_button.Name = "saveFilter_button"; + this.saveFilter_button.Size = new System.Drawing.Size(149, 31); + this.saveFilter_button.TabIndex = 55; + this.saveFilter_button.Text = "Save filter"; + this.saveFilter_button.UseVisualStyleBackColor = true; + this.saveFilter_button.Click += new System.EventHandler(this.SaveFilter_button_Click); + // + // groupBox10 + // + this.groupBox10.Controls.Add(this.filterFolderNameCaseSensitive_checkBox); + this.groupBox10.Controls.Add(this.filterFolderNameContains_checkBox); + this.groupBox10.Controls.Add(this.filterFolderNameContains_textBox); + this.groupBox10.Controls.Add(this.filterFolderNameNotContains_checkBox); + this.groupBox10.Controls.Add(this.filterFolderNameNotContains_textBox); + this.groupBox10.Location = new System.Drawing.Point(3, 121); + this.groupBox10.Name = "groupBox10"; + this.groupBox10.Size = new System.Drawing.Size(378, 94); + this.groupBox10.TabIndex = 8; + this.groupBox10.TabStop = false; + this.groupBox10.Text = "Folder name"; + // + // filterFolderNameCaseSensitive_checkBox + // + this.filterFolderNameCaseSensitive_checkBox.AutoSize = true; + this.filterFolderNameCaseSensitive_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.filterFolderNameCaseSensitive_checkBox.Location = new System.Drawing.Point(112, 15); + this.filterFolderNameCaseSensitive_checkBox.Name = "filterFolderNameCaseSensitive_checkBox"; + this.filterFolderNameCaseSensitive_checkBox.Size = new System.Drawing.Size(91, 17); + this.filterFolderNameCaseSensitive_checkBox.TabIndex = 3; + this.filterFolderNameCaseSensitive_checkBox.Text = "Case sensitive"; + this.filterFolderNameCaseSensitive_checkBox.UseVisualStyleBackColor = true; + // + // filterFolderNameContains_checkBox + // + this.filterFolderNameContains_checkBox.AutoSize = true; + this.filterFolderNameContains_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.filterFolderNameContains_checkBox.Location = new System.Drawing.Point(9, 39); + this.filterFolderNameContains_checkBox.Name = "filterFolderNameContains_checkBox"; + this.filterFolderNameContains_checkBox.Size = new System.Drawing.Size(64, 17); + this.filterFolderNameContains_checkBox.TabIndex = 1; + this.filterFolderNameContains_checkBox.Text = "Contains"; + this.filterFolderNameContains_checkBox.UseVisualStyleBackColor = true; + this.filterFolderNameContains_checkBox.CheckedChanged += new System.EventHandler(this.filterFilenameContains_checkBox_CheckedChanged); + // + // filterFolderNameContains_textBox + // + this.filterFolderNameContains_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.filterFolderNameContains_textBox.Location = new System.Drawing.Point(112, 38); + this.filterFolderNameContains_textBox.Name = "filterFolderNameContains_textBox"; + this.filterFolderNameContains_textBox.ReadOnly = true; + this.filterFolderNameContains_textBox.Size = new System.Drawing.Size(247, 20); + this.filterFolderNameContains_textBox.TabIndex = 2; + // + // filterFolderNameNotContains_checkBox + // + this.filterFolderNameNotContains_checkBox.AutoSize = true; + this.filterFolderNameNotContains_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.filterFolderNameNotContains_checkBox.Location = new System.Drawing.Point(9, 65); + this.filterFolderNameNotContains_checkBox.Name = "filterFolderNameNotContains_checkBox"; + this.filterFolderNameNotContains_checkBox.Size = new System.Drawing.Size(97, 17); + this.filterFolderNameNotContains_checkBox.TabIndex = 1; + this.filterFolderNameNotContains_checkBox.Text = "Doesn\'t contain"; + this.filterFolderNameNotContains_checkBox.UseVisualStyleBackColor = true; + this.filterFolderNameNotContains_checkBox.CheckedChanged += new System.EventHandler(this.filterFilenameNotContains_checkBox_CheckedChanged); + // + // filterFolderNameNotContains_textBox + // + this.filterFolderNameNotContains_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.filterFolderNameNotContains_textBox.Location = new System.Drawing.Point(112, 64); + this.filterFolderNameNotContains_textBox.Name = "filterFolderNameNotContains_textBox"; + this.filterFolderNameNotContains_textBox.ReadOnly = true; + this.filterFolderNameNotContains_textBox.Size = new System.Drawing.Size(247, 20); + this.filterFolderNameNotContains_textBox.TabIndex = 2; + // // filtersFilename_groupBox // this.filtersFilename_groupBox.Controls.Add(this.filterFilenameCaseSensitive_checkBox); @@ -1932,9 +2439,9 @@ private void InitializeComponent() this.filtersFilename_groupBox.Controls.Add(this.filterFilenameContains_textBox); this.filtersFilename_groupBox.Controls.Add(this.filterFilenameNotContains_checkBox); this.filtersFilename_groupBox.Controls.Add(this.filterFilenameNotContains_textBox); - this.filtersFilename_groupBox.Location = new System.Drawing.Point(11, 34); + this.filtersFilename_groupBox.Location = new System.Drawing.Point(4, 21); this.filtersFilename_groupBox.Name = "filtersFilename_groupBox"; - this.filtersFilename_groupBox.Size = new System.Drawing.Size(397, 94); + this.filtersFilename_groupBox.Size = new System.Drawing.Size(378, 94); this.filtersFilename_groupBox.TabIndex = 8; this.filtersFilename_groupBox.TabStop = false; this.filtersFilename_groupBox.Text = "Filename"; @@ -1968,7 +2475,7 @@ private void InitializeComponent() this.filterFilenameContains_textBox.Location = new System.Drawing.Point(112, 38); this.filterFilenameContains_textBox.Name = "filterFilenameContains_textBox"; this.filterFilenameContains_textBox.ReadOnly = true; - this.filterFilenameContains_textBox.Size = new System.Drawing.Size(266, 20); + this.filterFilenameContains_textBox.Size = new System.Drawing.Size(247, 20); this.filterFilenameContains_textBox.TabIndex = 2; // // filterFilenameNotContains_checkBox @@ -1989,9 +2496,20 @@ private void InitializeComponent() this.filterFilenameNotContains_textBox.Location = new System.Drawing.Point(112, 64); this.filterFilenameNotContains_textBox.Name = "filterFilenameNotContains_textBox"; this.filterFilenameNotContains_textBox.ReadOnly = true; - this.filterFilenameNotContains_textBox.Size = new System.Drawing.Size(266, 20); + this.filterFilenameNotContains_textBox.Size = new System.Drawing.Size(247, 20); this.filterFilenameNotContains_textBox.TabIndex = 2; // + // loadFilter_button + // + this.loadFilter_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.loadFilter_button.Location = new System.Drawing.Point(162, 548); + this.loadFilter_button.Name = "loadFilter_button"; + this.loadFilter_button.Size = new System.Drawing.Size(149, 31); + this.loadFilter_button.TabIndex = 56; + this.loadFilter_button.Text = "Load filter"; + this.loadFilter_button.UseVisualStyleBackColor = true; + this.loadFilter_button.Click += new System.EventHandler(this.LoadFilter_button_Click); + // // checkBox3 // this.checkBox3.AutoSize = true; @@ -2004,12 +2522,22 @@ private void InitializeComponent() this.checkBox3.UseVisualStyleBackColor = true; this.checkBox3.Visible = false; // + // filters_listBox + // + this.filters_listBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.filters_listBox.FormattingEnabled = true; + this.filters_listBox.Location = new System.Drawing.Point(8, 443); + this.filters_listBox.Name = "filters_listBox"; + this.filters_listBox.Size = new System.Drawing.Size(149, 171); + this.filters_listBox.TabIndex = 54; + this.filters_listBox.SelectedIndexChanged += new System.EventHandler(this.filters_listBox_SelectedIndexChanged); + // // filtersAlpha_groupBox // this.filtersAlpha_groupBox.Controls.Add(this.filterAlpha_comboBox); - this.filtersAlpha_groupBox.Location = new System.Drawing.Point(11, 141); + this.filtersAlpha_groupBox.Location = new System.Drawing.Point(4, 274); this.filtersAlpha_groupBox.Name = "filtersAlpha_groupBox"; - this.filtersAlpha_groupBox.Size = new System.Drawing.Size(164, 94); + this.filtersAlpha_groupBox.Size = new System.Drawing.Size(130, 86); this.filtersAlpha_groupBox.TabIndex = 0; this.filtersAlpha_groupBox.TabStop = false; this.filtersAlpha_groupBox.Text = "Alpha"; @@ -2022,98 +2550,9 @@ private void InitializeComponent() this.filterAlpha_comboBox.FormattingEnabled = true; this.filterAlpha_comboBox.Location = new System.Drawing.Point(9, 38); this.filterAlpha_comboBox.Name = "filterAlpha_comboBox"; - this.filterAlpha_comboBox.Size = new System.Drawing.Size(147, 21); + this.filterAlpha_comboBox.Size = new System.Drawing.Size(111, 21); this.filterAlpha_comboBox.TabIndex = 0; // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(35, 73); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(41, 13); - this.label8.TabIndex = 20; - this.label8.Text = "Models"; - // - // advancedSuffix_textBox - // - this.advancedSuffix_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.advancedSuffix_textBox.Location = new System.Drawing.Point(393, 96); - this.advancedSuffix_textBox.Name = "advancedSuffix_textBox"; - this.advancedSuffix_textBox.ReadOnly = true; - this.advancedSuffix_textBox.Size = new System.Drawing.Size(193, 20); - this.advancedSuffix_textBox.TabIndex = 1; - // - // changeInputPath_button - // - this.changeInputPath_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.changeInputPath_button.Location = new System.Drawing.Point(591, 17); - this.changeInputPath_button.Name = "changeInputPath_button"; - this.changeInputPath_button.Size = new System.Drawing.Size(39, 20); - this.changeInputPath_button.TabIndex = 29; - this.changeInputPath_button.Text = "..."; - this.changeInputPath_button.UseVisualStyleBackColor = true; - this.changeInputPath_button.Click += new System.EventHandler(this.changePath_button_Click); - // - // advancedUseSuffix_checkBox - // - this.advancedUseSuffix_checkBox.AutoSize = true; - this.advancedUseSuffix_checkBox.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.advancedUseSuffix_checkBox.Location = new System.Drawing.Point(273, 97); - this.advancedUseSuffix_checkBox.Name = "advancedUseSuffix_checkBox"; - this.advancedUseSuffix_checkBox.Size = new System.Drawing.Size(117, 17); - this.advancedUseSuffix_checkBox.TabIndex = 0; - this.advancedUseSuffix_checkBox.Text = "Use suffix for results"; - this.advancedUseSuffix_checkBox.UseVisualStyleBackColor = true; - this.advancedUseSuffix_checkBox.CheckedChanged += new System.EventHandler(this.advancedUseSuffix_checkBox_CheckedChanged); - // - // inputPath_textBox - // - this.inputPath_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.inputPath_textBox.Location = new System.Drawing.Point(84, 18); - this.inputPath_textBox.Name = "inputPath_textBox"; - this.inputPath_textBox.ReadOnly = true; - this.inputPath_textBox.Size = new System.Drawing.Size(502, 20); - this.inputPath_textBox.TabIndex = 19; - this.toolTip1.SetToolTip(this.inputPath_textBox, "ESRGAN input folder"); - // - // outputPath_textBox - // - this.outputPath_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.outputPath_textBox.Location = new System.Drawing.Point(84, 44); - this.outputPath_textBox.Name = "outputPath_textBox"; - this.outputPath_textBox.ReadOnly = true; - this.outputPath_textBox.Size = new System.Drawing.Size(502, 20); - this.outputPath_textBox.TabIndex = 19; - this.toolTip1.SetToolTip(this.outputPath_textBox, "ESRGAN output folder"); - // - // modelsPath_textBox - // - this.modelsPath_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.modelsPath_textBox.Location = new System.Drawing.Point(84, 70); - this.modelsPath_textBox.Name = "modelsPath_textBox"; - this.modelsPath_textBox.ReadOnly = true; - this.modelsPath_textBox.Size = new System.Drawing.Size(502, 20); - this.modelsPath_textBox.TabIndex = 19; - this.toolTip1.SetToolTip(this.modelsPath_textBox, "Folder with .pth files"); - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(5, 47); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(74, 13); - this.label7.TabIndex = 20; - this.label7.Text = "Output/results"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(26, 21); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(50, 13); - this.label2.TabIndex = 20; - this.label2.Text = "Input/LR"; - // // interpolation_tabPage // this.interpolation_tabPage.Controls.Add(this.modelInterpolationAlpha_trackBar); @@ -2124,7 +2563,7 @@ private void InitializeComponent() this.interpolation_tabPage.Controls.Add(this.interpolationModelOne_comboBox); this.interpolation_tabPage.Location = new System.Drawing.Point(4, 25); this.interpolation_tabPage.Name = "interpolation_tabPage"; - this.interpolation_tabPage.Size = new System.Drawing.Size(770, 613); + this.interpolation_tabPage.Size = new System.Drawing.Size(1263, 812); this.interpolation_tabPage.TabIndex = 3; this.interpolation_tabPage.Text = "Models interpolation"; this.interpolation_tabPage.UseVisualStyleBackColor = true; @@ -2202,7 +2641,7 @@ private void InitializeComponent() this.overlayResults_tabPage.Controls.Add(this.tableLayoutPanel4); this.overlayResults_tabPage.Location = new System.Drawing.Point(4, 25); this.overlayResults_tabPage.Name = "overlayResults_tabPage"; - this.overlayResults_tabPage.Size = new System.Drawing.Size(770, 613); + this.overlayResults_tabPage.Size = new System.Drawing.Size(1263, 812); this.overlayResults_tabPage.TabIndex = 6; this.overlayResults_tabPage.Text = "Image interpolation"; this.overlayResults_tabPage.UseVisualStyleBackColor = true; @@ -2225,16 +2664,16 @@ private void InitializeComponent() this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F)); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 175F)); - this.tableLayoutPanel4.Size = new System.Drawing.Size(770, 613); + this.tableLayoutPanel4.Size = new System.Drawing.Size(1263, 812); this.tableLayoutPanel4.TabIndex = 4; // // overlayImages_button // this.overlayImages_button.Dock = System.Windows.Forms.DockStyle.Fill; this.overlayImages_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.overlayImages_button.Location = new System.Drawing.Point(673, 3); + this.overlayImages_button.Location = new System.Drawing.Point(1166, 3); this.overlayImages_button.Name = "overlayImages_button"; - this.overlayImages_button.Size = new System.Drawing.Size(94, 382); + this.overlayImages_button.Size = new System.Drawing.Size(94, 581); this.overlayImages_button.TabIndex = 1; this.overlayImages_button.Text = "Interpolate"; this.overlayImages_button.UseVisualStyleBackColor = true; @@ -2246,7 +2685,7 @@ private void InitializeComponent() this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox4.Location = new System.Drawing.Point(3, 3); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(664, 382); + this.groupBox4.Size = new System.Drawing.Size(1157, 581); this.groupBox4.TabIndex = 0; this.groupBox4.TabStop = false; this.groupBox4.Text = "Interpolate two images"; @@ -2266,20 +2705,30 @@ private void InitializeComponent() this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F)); this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel5.Size = new System.Drawing.Size(658, 363); + this.tableLayoutPanel5.Size = new System.Drawing.Size(1151, 562); this.tableLayoutPanel5.TabIndex = 0; // // groupBox7 // + this.groupBox7.Controls.Add(this.imageBName_label); this.groupBox7.Controls.Add(this.imageB_panel); this.groupBox7.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox7.Location = new System.Drawing.Point(332, 3); + this.groupBox7.Location = new System.Drawing.Point(578, 3); this.groupBox7.Name = "groupBox7"; - this.groupBox7.Size = new System.Drawing.Size(323, 329); + this.groupBox7.Size = new System.Drawing.Size(570, 528); this.groupBox7.TabIndex = 1; this.groupBox7.TabStop = false; this.groupBox7.Text = "Image B"; // + // imageBName_label + // + this.imageBName_label.AutoSize = true; + this.imageBName_label.Location = new System.Drawing.Point(54, 0); + this.imageBName_label.Name = "imageBName_label"; + this.imageBName_label.Size = new System.Drawing.Size(98, 13); + this.imageBName_label.TabIndex = 6; + this.imageBName_label.Text = "imageBName_label"; + // // imageB_panel // this.imageB_panel.AllowDrop = true; @@ -2287,7 +2736,7 @@ private void InitializeComponent() this.imageB_panel.Dock = System.Windows.Forms.DockStyle.Fill; this.imageB_panel.Location = new System.Drawing.Point(3, 16); this.imageB_panel.Name = "imageB_panel"; - this.imageB_panel.Size = new System.Drawing.Size(317, 310); + this.imageB_panel.Size = new System.Drawing.Size(564, 509); this.imageB_panel.TabIndex = 5; this.imageB_panel.DragDrop += new System.Windows.Forms.DragEventHandler(this.imagePanel_DragDrop); this.imageB_panel.DragEnter += new System.Windows.Forms.DragEventHandler(this.general_DragEnter); @@ -2297,21 +2746,31 @@ private void InitializeComponent() this.imageB_pictureBox.Dock = System.Windows.Forms.DockStyle.Fill; this.imageB_pictureBox.Location = new System.Drawing.Point(0, 0); this.imageB_pictureBox.Name = "imageB_pictureBox"; - this.imageB_pictureBox.Size = new System.Drawing.Size(317, 310); + this.imageB_pictureBox.Size = new System.Drawing.Size(564, 509); this.imageB_pictureBox.TabIndex = 0; this.imageB_pictureBox.TabStop = false; // // groupBox6 // + this.groupBox6.Controls.Add(this.imageAName_label); this.groupBox6.Controls.Add(this.imageA_panel); this.groupBox6.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox6.Location = new System.Drawing.Point(3, 3); this.groupBox6.Name = "groupBox6"; - this.groupBox6.Size = new System.Drawing.Size(323, 329); + this.groupBox6.Size = new System.Drawing.Size(569, 528); this.groupBox6.TabIndex = 1; this.groupBox6.TabStop = false; this.groupBox6.Text = "Image A"; // + // imageAName_label + // + this.imageAName_label.AutoSize = true; + this.imageAName_label.Location = new System.Drawing.Point(54, 0); + this.imageAName_label.Name = "imageAName_label"; + this.imageAName_label.Size = new System.Drawing.Size(98, 13); + this.imageAName_label.TabIndex = 6; + this.imageAName_label.Text = "imageAName_label"; + // // imageA_panel // this.imageA_panel.AllowDrop = true; @@ -2319,7 +2778,7 @@ private void InitializeComponent() this.imageA_panel.Dock = System.Windows.Forms.DockStyle.Fill; this.imageA_panel.Location = new System.Drawing.Point(3, 16); this.imageA_panel.Name = "imageA_panel"; - this.imageA_panel.Size = new System.Drawing.Size(317, 310); + this.imageA_panel.Size = new System.Drawing.Size(563, 509); this.imageA_panel.TabIndex = 4; this.imageA_panel.DragDrop += new System.Windows.Forms.DragEventHandler(this.imagePanel_DragDrop); this.imageA_panel.DragEnter += new System.Windows.Forms.DragEventHandler(this.general_DragEnter); @@ -2329,7 +2788,7 @@ private void InitializeComponent() this.imageA_pictureBox.Dock = System.Windows.Forms.DockStyle.Fill; this.imageA_pictureBox.Location = new System.Drawing.Point(0, 0); this.imageA_pictureBox.Name = "imageA_pictureBox"; - this.imageA_pictureBox.Size = new System.Drawing.Size(317, 310); + this.imageA_pictureBox.Size = new System.Drawing.Size(563, 509); this.imageA_pictureBox.TabIndex = 0; this.imageA_pictureBox.TabStop = false; // @@ -2338,16 +2797,16 @@ private void InitializeComponent() this.overlayResultName_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.tableLayoutPanel5.SetColumnSpan(this.overlayResultName_textBox, 2); this.overlayResultName_textBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.overlayResultName_textBox.Location = new System.Drawing.Point(3, 338); + this.overlayResultName_textBox.Location = new System.Drawing.Point(3, 537); this.overlayResultName_textBox.Name = "overlayResultName_textBox"; - this.overlayResultName_textBox.Size = new System.Drawing.Size(652, 20); + this.overlayResultName_textBox.Size = new System.Drawing.Size(1145, 20); this.overlayResultName_textBox.TabIndex = 2; // // overlayFolders_button // this.overlayFolders_button.Dock = System.Windows.Forms.DockStyle.Fill; this.overlayFolders_button.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.overlayFolders_button.Location = new System.Drawing.Point(673, 441); + this.overlayFolders_button.Location = new System.Drawing.Point(1166, 640); this.overlayFolders_button.Name = "overlayFolders_button"; this.overlayFolders_button.Size = new System.Drawing.Size(94, 169); this.overlayFolders_button.TabIndex = 1; @@ -2360,7 +2819,7 @@ private void InitializeComponent() this.imageInterpolationAlphaValue_textBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.imageInterpolationAlphaValue_textBox.Dock = System.Windows.Forms.DockStyle.Fill; this.imageInterpolationAlphaValue_textBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.25F); - this.imageInterpolationAlphaValue_textBox.Location = new System.Drawing.Point(673, 400); + this.imageInterpolationAlphaValue_textBox.Location = new System.Drawing.Point(1166, 599); this.imageInterpolationAlphaValue_textBox.Margin = new System.Windows.Forms.Padding(3, 12, 3, 3); this.imageInterpolationAlphaValue_textBox.Name = "imageInterpolationAlphaValue_textBox"; this.imageInterpolationAlphaValue_textBox.ReadOnly = true; @@ -2383,7 +2842,7 @@ private void InitializeComponent() this.groupBox5.Controls.Add(this.resultsBPath_textBox); this.groupBox5.Controls.Add(this.resultsDestinationPath_textBox); this.groupBox5.Controls.Add(this.label28); - this.groupBox5.Location = new System.Drawing.Point(3, 441); + this.groupBox5.Location = new System.Drawing.Point(3, 640); this.groupBox5.Name = "groupBox5"; this.groupBox5.Size = new System.Drawing.Size(661, 169); this.groupBox5.TabIndex = 0; @@ -2513,9 +2972,9 @@ private void InitializeComponent() // this.panel3.Controls.Add(this.imageInterpolation_trackBar); this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel3.Location = new System.Drawing.Point(3, 391); + this.panel3.Location = new System.Drawing.Point(3, 590); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(664, 44); + this.panel3.Size = new System.Drawing.Size(1157, 44); this.panel3.TabIndex = 6; // // imageInterpolation_trackBar @@ -2526,7 +2985,7 @@ private void InitializeComponent() this.imageInterpolation_trackBar.Maximum = 99; this.imageInterpolation_trackBar.Minimum = 1; this.imageInterpolation_trackBar.Name = "imageInterpolation_trackBar"; - this.imageInterpolation_trackBar.Size = new System.Drawing.Size(664, 44); + this.imageInterpolation_trackBar.Size = new System.Drawing.Size(1157, 44); this.imageInterpolation_trackBar.TabIndex = 5; this.imageInterpolation_trackBar.Value = 50; this.imageInterpolation_trackBar.Scroll += new System.EventHandler(this.ImageInterpolation_trackBar_Scroll); @@ -2553,10 +3012,10 @@ private void InitializeComponent() this.AllowDrop = true; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(778, 642); + this.ClientSize = new System.Drawing.Size(1271, 841); this.Controls.Add(this.tabControl1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MinimumSize = new System.Drawing.Size(790, 676); + this.MinimumSize = new System.Drawing.Size(1000, 777); this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Image Enhancing Utility"; @@ -2577,19 +3036,26 @@ private void InitializeComponent() this.previewResult_tabPage.ResumeLayout(false); this.previewResult_tabPage.PerformLayout(); this.tableLayoutPanel3.ResumeLayout(false); - this.splitContainer2.Panel1.ResumeLayout(false); - this.splitContainer2.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); - this.splitContainer2.ResumeLayout(false); this.splitContainer3.Panel1.ResumeLayout(false); this.splitContainer3.Panel2.ResumeLayout(false); this.splitContainer3.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); this.splitContainer3.ResumeLayout(false); + this.tableLayoutPanel6.ResumeLayout(false); this.toolStrip.ResumeLayout(false); this.toolStrip.PerformLayout(); this.settings_tabPage.ResumeLayout(false); this.settings_tabPage.PerformLayout(); + this.groupBox9.ResumeLayout(false); + this.groupBox9.PerformLayout(); + this.imagePostprocess_groupBox.ResumeLayout(false); + this.imagePostprocess_groupBox.PerformLayout(); + this.threshold_groupBox.ResumeLayout(false); + this.threshold_groupBox.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.thresholdBlack_numericUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.thresholdWhite_numericUpDown)).EndInit(); + this.imagePreprocess_groupBox.ResumeLayout(false); + this.imagePreprocess_groupBox.PerformLayout(); this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.maxTileHeight_numericUpDown)).EndInit(); @@ -2597,6 +3063,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.overlapSize_numericUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.maxTileResolution_numericUpDown)).EndInit(); this.settingsOutputFormat_tabPage.ResumeLayout(false); + this.settingsOutputFormat_tabPage.PerformLayout(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.webpQuality_numericUpDown)).EndInit(); @@ -2610,22 +3077,17 @@ private void InitializeComponent() this.ddsOutputSettings_groupBox.PerformLayout(); this.advanced_tabPage.ResumeLayout(false); this.advanced_tabPage.PerformLayout(); - this.imagePostprocess_groupBox.ResumeLayout(false); - this.imagePostprocess_groupBox.PerformLayout(); - this.threshold_groupBox.ResumeLayout(false); - this.threshold_groupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.thresholdBlack_numericUpDown)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.thresholdWhite_numericUpDown)).EndInit(); - this.imagePreprocess_groupBox.ResumeLayout(false); - this.imagePreprocess_groupBox.PerformLayout(); - this.upscaleSize_groupBox.ResumeLayout(false); - this.upscaleSize_groupBox.PerformLayout(); + this.rules_groupBox.ResumeLayout(false); + this.rules_groupBox.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.rulePriority_numericUpDown)).EndInit(); this.filters_groupBox.ResumeLayout(false); this.filters_groupBox.PerformLayout(); this.filtersSize_groupBox.ResumeLayout(false); this.filtersSize_groupBox.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.filterSizeWidth_numericUpDown)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.filterSizeHeight_numericUpDown)).EndInit(); + this.groupBox10.ResumeLayout(false); + this.groupBox10.PerformLayout(); this.filtersFilename_groupBox.ResumeLayout(false); this.filtersFilename_groupBox.PerformLayout(); this.filtersAlpha_groupBox.ResumeLayout(false); @@ -2639,9 +3101,11 @@ private void InitializeComponent() this.tableLayoutPanel5.ResumeLayout(false); this.tableLayoutPanel5.PerformLayout(); this.groupBox7.ResumeLayout(false); + this.groupBox7.PerformLayout(); this.imageB_panel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.imageB_pictureBox)).EndInit(); this.groupBox6.ResumeLayout(false); + this.groupBox6.PerformLayout(); this.imageA_panel.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.imageA_pictureBox)).EndInit(); this.groupBox5.ResumeLayout(false); @@ -2672,7 +3136,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label6; private System.Windows.Forms.NumericUpDown overlapSize_numericUpDown; private System.Windows.Forms.CheckBox ignoreAlpha_checkBox; - private System.Windows.Forms.CheckBox debugUpscale_checkBox; private System.Windows.Forms.Button changeInputImgPath_button; private System.Windows.Forms.Button changeEsrganPath_button; private System.Windows.Forms.Button changeMergedResultsPath_button; @@ -2720,10 +3183,6 @@ private void InitializeComponent() private System.Windows.Forms.Label label9; private System.Windows.Forms.NumericUpDown maxTileHeight_numericUpDown; private System.Windows.Forms.NumericUpDown maxTileWidth_numericUpDown; - private System.Windows.Forms.GroupBox upscaleSize_groupBox; - private System.Windows.Forms.RadioButton x1_radioButton; - private System.Windows.Forms.RadioButton x2_radioButton; - private System.Windows.Forms.RadioButton x4_radioButton; private System.Windows.Forms.CheckBox deleteResults_checkBox; private System.Windows.Forms.CheckBox checkForUpdates_checkBox; private System.Windows.Forms.GroupBox imagePostprocess_groupBox; @@ -2806,7 +3265,6 @@ private void InitializeComponent() private Cyotek.Windows.Forms.ImageBox previewImageBox; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; private System.Windows.Forms.ComboBox previewModels_comboBox; - private System.Windows.Forms.SplitContainer splitContainer2; private System.Windows.Forms.Button previewUpdate_button; private System.Windows.Forms.Button previewSave_button; private System.Windows.Forms.ProgressBar preview_progressBar; @@ -2844,6 +3302,48 @@ private void InitializeComponent() private System.Windows.Forms.TrackBar modelInterpolationAlpha_trackBar; private System.Windows.Forms.Panel panel3; private System.Windows.Forms.TrackBar imageInterpolation_trackBar; + private System.Windows.Forms.ListBox profiles_listBox; + private System.Windows.Forms.Button deleteProfile_button; + private System.Windows.Forms.TextBox saveProfileName_textBox; + private System.Windows.Forms.Button saveProfile_button; + private System.Windows.Forms.Button loadProfile_button; + private System.Windows.Forms.Button deleteFilter_button; + private System.Windows.Forms.TextBox newFilterName_textBox; + private System.Windows.Forms.Button saveFilter_button; + private System.Windows.Forms.Button loadFilter_button; + private System.Windows.Forms.ListBox filters_listBox; + private System.Windows.Forms.GroupBox rules_groupBox; + private System.Windows.Forms.NumericUpDown rulePriority_numericUpDown; + private System.Windows.Forms.Button deleteRule_button; + private System.Windows.Forms.ListBox rules_listBox; + private System.Windows.Forms.TextBox newRuleName_textBox; + private System.Windows.Forms.ComboBox ruleProfiles_comboBox; + private System.Windows.Forms.ComboBox ruleFilters_comboBox; + private System.Windows.Forms.Button saveRule_button; + private System.Windows.Forms.Button loadRule_button; + private System.Windows.Forms.GroupBox groupBox9; + private System.Windows.Forms.ListBox profilesMainTab_listBox; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.GroupBox groupBox10; + private System.Windows.Forms.CheckBox filterFolderNameCaseSensitive_checkBox; + private System.Windows.Forms.CheckBox filterFolderNameContains_checkBox; + private System.Windows.Forms.TextBox filterFolderNameContains_textBox; + private System.Windows.Forms.CheckBox filterFolderNameNotContains_checkBox; + private System.Windows.Forms.TextBox filterFolderNameNotContains_textBox; + private System.Windows.Forms.CheckBox disableRuleSystem_checkBox; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Label label32; + private System.Windows.Forms.Label label33; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button saveRuleFromCurrent_button; + private System.Windows.Forms.ComboBox profileModel_comboBox; + private System.Windows.Forms.CheckBox useProfileModel_checkBox; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel6; + private System.Windows.Forms.Label imageBName_label; + private System.Windows.Forms.Label imageAName_label; + private System.Windows.Forms.CheckBox topMost_checkBox; } } diff --git a/MainForm.cs b/MainForm.cs index 332a8c7..71598ee 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -15,7 +15,9 @@ using DynamicData; using GitHubUpdate; using ImageEnhancingUtility.Core; +using ImageEnhancingUtility.Core.Utility; using ReactiveUI; +using Rule = ImageEnhancingUtility.Core.Rule; //TODO: //ask to change all paths when changing ESRGAN path @@ -37,65 +39,29 @@ object IViewFor.ViewModel private MyTreeView treeView1; - List checkedModels = new List(); + List checkedModels = new List(); readonly List pathsTextBoxes; int widthBeforeResize, heightBeforeResize; bool lastUseDifferentModelAlpha = false; - - private delegate void SafeCallDelegate(string text); - private delegate void SafeCallDelegateWithColor(string text, Color color); - - private void WriteToLogsThreadSafe(string text) - { - if (richTextBox1.InvokeRequired) - { - var d = new SafeCallDelegate(WriteToLogsThreadSafe); - Invoke(d, new object[] { text }); - } - else - richTextBox1.Text = text; - //richTextBox1.AppendText($"\n[{DateTime.Now}] {text}", System.Drawing.Color.White); - } + + private delegate void SafeCallDelegateWithColor(LogMessage message); private void WriteToLogsThreadSafe(LogMessage message) { if (richTextBox1.InvokeRequired) { - var d = new SafeCallDelegate(WriteToLogsThreadSafe); + var d = new SafeCallDelegateWithColor(WriteToLogsThreadSafe); Invoke(d, new object[] { message }); } else - { - richTextBox1.AppendText(message.Text, message.Color); - } - //richTextBox1.AppendText($"\n[{DateTime.Now}] {text}", System.Drawing.Color.White); - } - - private void AppendToLogsThreadSafe(string text) - { - if (richTextBox1.InvokeRequired) - { - var d = new SafeCallDelegate(AppendToLogsThreadSafe); - Invoke(d, new object[] { text }); - } - else - richTextBox1.AppendText($"\n[{DateTime.Now}] {text}", System.Drawing.Color.White); - } - - private void WriteToLogsThreadSafe(string text, Color color) - { - if (richTextBox1.InvokeRequired) { - var d = new SafeCallDelegateWithColor(WriteToLogsThreadSafe); - Invoke(d, new object[] { text, color }); - } - else - richTextBox1.AppendText($"\n[{DateTime.Now}] {text}", color); + richTextBox1.AppendText(message.Text, message.Color); + } } - + public double ProgressBarValue { get => 0; @@ -115,133 +81,283 @@ private void ReportProgressThreadSafe(double value) } else { - progressBar1.Value = (int) value; + progressBar1.Value = (int)value; progress_label.Text = $@"{ViewModel.FilesDone}/{ViewModel.FilesTotal}"; //hack progressFiltered_label.Text = ViewModel.FilesDoneSuccesfully.ToString(); } - } + } + + [DllImport("user32.dll")] //textbox hint + private static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam); - public List ModelsItems + #region CONSTRUCTOR + + public MainForm() { - get => null; - set - { - CreateModelTree(value); - modelForAlpha_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null); - previewModels_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null); - interpolationModelOne_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null); - interpolationModelTwo_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null); + InitializeComponent(); + + //disable mousewheel scrolling: + outputDestinationMode_comboBox.MouseWheel += (o, e) => ((HandledMouseEventArgs)e).Handled = true; + overwriteMode_comboBox.MouseWheel += (o, e) => ((HandledMouseEventArgs)e).Handled = true; + + CreateMyTreeView(); + treeView_contextMenuStrip.Items[0].Click += OpenModelFolder; + + FormClosing += MainForm_FormClosing; + + ReadOnlyObservableCollection bindingDataProfiles = null; + + profiles_listBox.DisplayMember = "Name"; + profilesMainTab_listBox.DisplayMember = "Name"; + ruleProfiles_comboBox.DisplayMember = "Name"; + + ReadOnlyObservableCollection bindingDataFilters = null; + + this.OneWayBind(ViewModel, vm => bindingDataFilters, v => v.filters_listBox.DataSource); + filters_listBox.DisplayMember = "Name"; + this.OneWayBind(ViewModel, vm => bindingDataFilters, v => v.ruleFilters_comboBox.DataSource); + ruleFilters_comboBox.DisplayMember = "Name"; + + ViewModel = new IEU(); + + BindMainTab(); + + this.Bind(ViewModel, vm => vm.DisableRuleSystem, v => v.disableRuleSystem_checkBox.Checked); + ViewModel.WhenAnyValue(vm => vm.DisableRuleSystem).Subscribe(x => HideRules(x)); + + ReadOnlyObservableCollection bindingData; + + ViewModel.Log.Connect() + .ObserveOn(RxApp.MainThreadScheduler) + .Bind(out bindingData) + .OnItemAdded(x => WriteToLogsThreadSafe(x)) + .Subscribe(); + + ViewModel.Profiles.Connect() + .ObserveOn(RxApp.MainThreadScheduler) + .Bind(out bindingDataProfiles) + .Subscribe(x => UpdateDataSource(profiles_listBox, ruleProfiles_comboBox, bindingDataProfiles)); + + ViewModel.Filters.Connect() + .ObserveOn(RxApp.MainThreadScheduler) + .Bind(out bindingDataFilters) + .Subscribe(x => UpdateDataSource(filters_listBox, ruleFilters_comboBox, bindingDataFilters)); + + ReadOnlyObservableCollection bindingDataModels = null; + + ViewModel.ModelsItems.Connect() + .ObserveOn(RxApp.MainThreadScheduler) + .Bind(out bindingDataModels) + .Subscribe(_ => UpdateModels(bindingDataModels)); + + modelForAlpha_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems.Items, null); //initial value + profileModel_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems.Items, null); //initial value + + rules_listBox.DisplayMember = "Name"; + rules_listBox.DataSource = new BindingSource(ViewModel.Ruleset.Values.ToList(), null); + + BindSettingsTab(); + + BindCommands(); + + pathsTextBoxes = new List { esrganPath_textBox, imgPath_textBox, modelsPath_textBox }; + progress_label.Text = "0/0"; + changeEsrganPath_button.Tag = esrganPath_textBox; + changeInputImgPath_button.Tag = imgPath_textBox; + changeMergedResultsPath_button.Tag = resultsMergedPath_textBox; + changeInputPath_button.Tag = inputPath_textBox; + changeOutputPath_button.Tag = outputPath_textBox; + changeModelsPath_button.Tag = modelsPath_textBox; + + changeOriginalImagesPath_button.Tag = originalImagesPath_textBox; + changeResultsAPath_button.Tag = resultsAPath_textBox; + changeResultsBPath_button.Tag = resultsBPath_textBox; + changeResultsDestinationPath_button.Tag = resultsDestinationPath_textBox; + + appVersion_label.Text = "GUI v" + this.AppVersion; + appCoreVersion_linkLabel.Text = "IEU.Core v" + ViewModel.AppVersion; + + interpolationModelOne_comboBox.DisplayMember = + interpolationModelTwo_comboBox.DisplayMember = + modelForAlpha_comboBox.DisplayMember = + profileModel_comboBox.DisplayMember = + previewModels_comboBox.DisplayMember = "Name"; + interpolationModelOne_comboBox.ValueMember = + interpolationModelTwo_comboBox.ValueMember = + modelForAlpha_comboBox.ValueMember = + profileModel_comboBox.ValueMember = + previewModels_comboBox.ValueMember = "FullName"; + + if (ViewModel.ModelsItems.Count > 0) + { + this.Bind(ViewModel, + vm => vm.CurrentProfile.ModelForAlpha, + v => v.modelForAlpha_comboBox.SelectedIndex, + x => x == null ? 0 : ViewModel.ModelsItems.Items.ToList().FindIndex(y => y.FullName == x.FullName), + x => GetModel(x)); + + this.Bind(ViewModel, + vm => vm.CurrentProfile.Model, + v => v.profileModel_comboBox.SelectedIndex, + x => GetIndex(x), + x => GetModel(x)); } - } - [DllImport("user32.dll")] //textbox hint - private static extern IntPtr SendMessage(IntPtr hWnd, int Msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam); + lastUseDifferentModelAlpha = useDifferentModelForAlpha_checkBox.Checked; - #region BINDINGS + BindOutputFormats(); - void BindSettingsTab() - { - this.Bind(ViewModel, vm => vm.ResultsPath, v => v.outputPath_textBox.Text); - this.Bind(ViewModel, vm => vm.ModelsPath, v => v.modelsPath_textBox.Text); - this.Bind(ViewModel, vm => vm.LrPath, v => v.inputPath_textBox.Text); + #region bind references + //Observable.FromEvent(ev => filterExtensions_checkedListBox.ItemCheck += ev, ev => filterExtensions_checkedListBox.ItemCheck -= ev) + // .Select((x,y) => filterExtensions_checkedListBox.CheckedItems) + // .BindTo(ViewModel, vm => vm.filterSelectedExtensionsList, vmToViewConverterOverride: new ListboxToListConverter()); - this.Bind(ViewModel, vm => vm.InputDirectoryPath, v => v.imgPath_textBox.Text); - this.Bind(ViewModel, vm => vm.OutputDirectoryPath, v => v.resultsMergedPath_textBox.Text); + //Observable.FromEventPattern(ev => ItemsListBox.SelectedValueChanged += ev, ev => ItemsListBox.SelectedValueChanged -= ev) + //.Select(_ => ItemsListBox.SelectedItem) + //.BindTo(_vm, vm => vm.SelectedItem); - this.Bind(ViewModel, vm => vm.EsrganPath, v => v.esrganPath_textBox.Text); + //this.WhenActivated(d => + //{ + // d(this.Bind(ViewModel, vm => vm.esrganPath, v => v.esrganPath_textBox.Text)); + //}); + //var selectionChanged = Observable.FromEvent( + // h => (_, e) => h(e), + // ev => ddsTextureType_comboBox.SelectedIndexChanged += ev, + // ev => ddsTextureType_comboBox.SelectedIndexChanged += ev); + #endregion - this.Bind(ViewModel, vm => vm.MaxTileResolution, v => v.maxTileResolution_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); - this.Bind(ViewModel, vm => vm.MaxTileResolutionWidth, v => v.maxTileWidth_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); - this.Bind(ViewModel, vm => vm.MaxTileResolutionHeight, v => v.maxTileHeight_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); - this.Bind(ViewModel, vm => vm.PreciseTileResolution, v => v.preciseTile_checkBox.Checked); + BindAdvanced(); + + VerifyPaths(); - this.Bind(ViewModel, vm => vm.IgnoreAlpha, v => v.ignoreAlpha_checkBox.Checked); - this.Bind(ViewModel, vm => vm.IgnoreSingleColorAlphas, v => v.ignoreSingleColorAlpha_checkBox.Checked); - this.Bind(ViewModel, vm => vm.BalanceAlphas, v => v.balanceAlphas_checkBox.Checked); + if (ViewModel.CheckForUpdates) + CheckNewReleases(); - this.Bind(ViewModel, vm => vm.DeleteResults, v => v.deleteResults_checkBox.Checked); - this.Bind(ViewModel, vm => vm.CreateMemoryImage, v => v.createMemoryImage_checkBox.Checked); - this.Bind(ViewModel, vm => vm.UseOriginalImageFormat, v => v.preserveFormat_checkBox.Checked); - this.Bind(ViewModel, vm => vm.SplitRGB, v => v.splitRGB_checkBox.Checked); - this.Bind(ViewModel, vm => vm.UseCPU, v => v.useCPU_checkBox.Checked); + zoomImageBox.VerticalScroll.Enabled = false; - this.Bind(ViewModel, vm => vm.UseDifferentModelForAlpha, v => v.useDifferentModelForAlpha_checkBox.Checked); - this.Bind(ViewModel, vm => vm.SeamlessTexture, v => v.seamlessTextures_checkBox.Checked); - this.Bind(ViewModel, vm => vm.OverlapSize, v => v.overlapSize_numericUpDown.Value, x => x, x => (int)x); + imageA_panel.Tag = imageA_pictureBox; + imageB_panel.Tag = imageB_pictureBox; + imageA_pictureBox.SizeMode = imageB_pictureBox.SizeMode = PictureBoxSizeMode.Zoom; + imageAName_label.Text = imageBName_label.Text = ""; - this.Bind(ViewModel, vm => vm.CheckForUpdates, v => v.checkForUpdates_checkBox.Checked); + originalImagesPath_textBox.Text = imgPath_textBox.Text; + resultsDestinationPath_textBox.Text = resultsMergedPath_textBox.Text; } + #endregion + + #region BINDINGS void BindMainTab() { - this.Bind(ViewModel, vm => vm.OutputDestinationModes, v => v.outputDestinationMode_comboBox.DataSource, x => new BindingSource(x, null), x => (x as BindingSource).DataSource as Dictionary); + this.OneWayBind(ViewModel, vm => vm.OutputDestinationModes, v => v.outputDestinationMode_comboBox.DataSource, x => new BindingSource(x, null)); outputDestinationMode_comboBox.DisplayMember = "Key"; outputDestinationMode_comboBox.ValueMember = "Value"; this.Bind(ViewModel, vm => vm.OutputDestinationMode, v => v.outputDestinationMode_comboBox.SelectedValue, x => x, x => (int)x); - this.Bind(ViewModel, vm => vm.OverwriteModes, v => v.overwriteMode_comboBox.DataSource, x => new BindingSource(x, null), x => (x as BindingSource).DataSource as Dictionary); + this.OneWayBind(ViewModel, vm => vm.OverwriteModes, v => v.overwriteMode_comboBox.DataSource, x => new BindingSource(x, null)); overwriteMode_comboBox.DisplayMember = "Key"; overwriteMode_comboBox.ValueMember = "Value"; - this.Bind(ViewModel, vm => vm.OverwriteMode, v => v.overwriteMode_comboBox.SelectedIndex); + this.Bind(ViewModel, vm => vm.CurrentProfile.OverwriteMode, v => v.overwriteMode_comboBox.SelectedValue); this.OneWayBind(ViewModel, vm => vm.ProgressBarValue, v => v.ProgressBarValue); - this.OneWayBind(ViewModel, vm => vm.ModelsItems, v => v.ModelsItems); + this.Bind(ViewModel, vm => vm.WindowOnTop, v => v.TopMost); + } + void BindSettingsTab() + { + this.Bind(ViewModel, vm => vm.ResultsPath, v => v.outputPath_textBox.Text); + this.Bind(ViewModel, vm => vm.ModelsPath, v => v.modelsPath_textBox.Text); + this.Bind(ViewModel, vm => vm.LrPath, v => v.inputPath_textBox.Text); + this.Bind(ViewModel, vm => vm.InputDirectoryPath, v => v.imgPath_textBox.Text); + this.Bind(ViewModel, vm => vm.OutputDirectoryPath, v => v.resultsMergedPath_textBox.Text); + this.Bind(ViewModel, vm => vm.EsrganPath, v => v.esrganPath_textBox.Text); + + this.Bind(ViewModel, vm => vm.MaxTileResolution, v => v.maxTileResolution_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.MaxTileResolutionWidth, v => v.maxTileWidth_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.MaxTileResolutionHeight, v => v.maxTileHeight_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.CurrentProfile.PreciseTileResolution, v => v.preciseTile_checkBox.Checked); + + this.Bind(ViewModel, vm => vm.CurrentProfile.IgnoreAlpha, v => v.ignoreAlpha_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentProfile.IgnoreSingleColorAlphas, v => v.ignoreSingleColorAlpha_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentProfile.BalanceAlphas, v => v.balanceAlphas_checkBox.Checked); + + this.Bind(ViewModel, vm => vm.CurrentProfile.DeleteResults, v => v.deleteResults_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CreateMemoryImage, v => v.createMemoryImage_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentProfile.UseOriginalImageFormat, v => v.preserveFormat_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentProfile.SplitRGB, v => v.splitRGB_checkBox.Checked); + this.Bind(ViewModel, vm => vm.UseCPU, v => v.useCPU_checkBox.Checked); + this.Bind(ViewModel, vm => vm.UseBasicSR, v => v.useBasicSR_checkBox.Checked); + + this.Bind(ViewModel, vm => vm.CurrentProfile.UseDifferentModelForAlpha, v => v.useDifferentModelForAlpha_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentProfile.UseModel, v => v.useProfileModel_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentProfile.SeamlessTexture, v => v.seamlessTextures_checkBox.Checked); + this.Bind(ViewModel, vm => vm.OverlapSize, v => v.overlapSize_numericUpDown.Value, x => x, x => (int)x); + + this.Bind(ViewModel, vm => vm.CheckForUpdates, v => v.checkForUpdates_checkBox.Checked); + } + void BindOutputFormats() { - ddsTextureType_comboBox.DataSource = new BindingSource(IEU.ddsTextureType, null); + ddsTextureType_comboBox.DataSource = new BindingSource(Dictionaries.ddsTextureType, null); ddsTextureType_comboBox.DisplayMember = "Key"; ddsTextureType_comboBox.ValueMember = "Value"; ddsTextureType_comboBox.SelectedIndex = 0; - this.Bind(ViewModel, vm => vm.DdsTextureTypeSelectedIndex, v => v.ddsTextureType_comboBox.SelectedIndex); + this.Bind(ViewModel, vm => vm.CurrentProfile.DdsTextureTypeSelectedIndex, v => v.ddsTextureType_comboBox.SelectedIndex); ddsFileFormat_comboBox.DisplayMember = "Name"; ddsFileFormat_comboBox.ValueMember = "DdsFileFormat"; - this.Bind(ViewModel, vm => vm.DdsFileFormatsCurrent, v => v.ddsFileFormat_comboBox.DataSource); - this.Bind(ViewModel, vm => vm.DdsFileFormatSelectedIndex, v => v.ddsFileFormat_comboBox.SelectedIndex); + this.Bind(ViewModel, vm => vm.CurrentProfile.DdsFileFormatsCurrent, v => v.ddsFileFormat_comboBox.DataSource); + this.Bind(ViewModel, vm => vm.CurrentProfile.DdsFileFormatSelectedIndex, v => v.ddsFileFormat_comboBox.SelectedIndex); - this.Bind(ViewModel, vm => vm.ddsGenerateMipmaps, v => v.ddsGenerateMipmaps_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentProfile.ddsGenerateMipmaps, v => v.ddsGenerateMipmaps_checkBox.Checked); ddsCompresion_comboBox.DataSource = new List() { "Fast", "Normal", "Slow (best)" }; ddsCompresion_comboBox.SelectedIndex = 0; - this.Bind(ViewModel, vm => vm.DdsBC7CompressionSelected, v => v.ddsCompresion_comboBox.SelectedIndex); + this.Bind(ViewModel, vm => vm.CurrentProfile.DdsBC7CompressionSelected, v => v.ddsCompresion_comboBox.SelectedIndex); - outputFormat_comboBox.DataSource = new BindingSource(ViewModel.FormatInfos, null); + outputFormat_comboBox.DataSource = new BindingSource(ViewModel.CurrentProfile.FormatInfos, null); outputFormat_comboBox.DisplayMember = "DisplayName"; outputFormat_comboBox.ValueMember = "Extension"; - this.Bind(ViewModel, vm => vm.SelectedOutputFormatIndex, v => v.outputFormat_comboBox.SelectedIndex); + this.Bind(ViewModel, vm => vm.CurrentProfile.SelectedOutputFormatIndex, v => v.outputFormat_comboBox.SelectedIndex); - tiffSettings_comboBox.DataSource = new BindingSource(IEU.TiffCompressionModes, null); + tiffSettings_comboBox.DataSource = new BindingSource(Dictionaries.TiffCompressionModes, null); tiffSettings_comboBox.DisplayMember = "Key"; tiffSettings_comboBox.ValueMember = "Value"; tiffSettings_comboBox.SelectedIndex = 0; - this.Bind(ViewModel, vm => vm.tiffFormat.CompressionMethod, v => v.tiffSettings_comboBox.SelectedValue, x => x, x => (string)x); - this.Bind(ViewModel, vm => vm.tiffFormat.QualityFactor, v => v.tiffJpegQuality_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.CurrentProfile.tiffFormat.CompressionMethod, v => v.tiffSettings_comboBox.SelectedValue, x => x, x => (string)x); + this.Bind(ViewModel, vm => vm.CurrentProfile.tiffFormat.QualityFactor, v => v.tiffJpegQuality_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); - webpPreset_comboBox.DataSource = new BindingSource(IEU.WebpPresets, null); + webpPreset_comboBox.DataSource = new BindingSource(Dictionaries.WebpPresets, null); webpPreset_comboBox.DisplayMember = "Key"; webpPreset_comboBox.ValueMember = "Value"; webpPreset_comboBox.SelectedIndex = 0; - this.Bind(ViewModel, vm => vm.webpFormat.CompressionMethod, v => v.webpPreset_comboBox.SelectedValue, x => x, x => (string)x); - this.Bind(ViewModel, vm => vm.webpFormat.QualityFactor, v => v.webpQuality_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); - this.Bind(ViewModel, vm => vm.pngFormat.CompressionFactor, v => v.pngCompression_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.CurrentProfile.webpFormat.CompressionMethod, v => v.webpPreset_comboBox.SelectedValue, x => x, x => (string)x); + this.Bind(ViewModel, vm => vm.CurrentProfile.webpFormat.QualityFactor, v => v.webpQuality_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.CurrentProfile.pngFormat.CompressionFactor, v => v.pngCompression_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); } + Tuple upscaleFunc() => new Tuple(false, null); + void BindCommands() - { + { this.BindCommand(ViewModel, vm => vm.SplitCommand, v => v.crop_button); this.BindCommand(ViewModel, vm => vm.UpscaleCommand, v => v.upscale_button); this.BindCommand(ViewModel, vm => vm.MergeCommand, v => v.merge_button); this.BindCommand(ViewModel, vm => vm.SplitUpscaleMergeCommand, v => v.runAll_button); - - ViewModel.SplitCommand.ThrownExceptions.Subscribe(error => { AppendToLogsThreadSafe(error.Message); }); - ViewModel.UpscaleCommand.ThrownExceptions.Subscribe(error => { AppendToLogsThreadSafe(error.Message); }); - ViewModel.MergeCommand.ThrownExceptions.Subscribe(error => { AppendToLogsThreadSafe(error.Message); }); - ViewModel.SplitUpscaleMergeCommand.ThrownExceptions.Subscribe(error => { AppendToLogsThreadSafe(error.Message); }); + + ViewModel.SplitCommand.ThrownExceptions.Subscribe(error => { WriteToLogsThreadSafe(new LogMessage(error.Message, Color.Red)); }); + ViewModel.UpscaleCommand.ThrownExceptions.Subscribe(error => { WriteToLogsThreadSafe(new LogMessage(error.Message, Color.Red)); }); + ViewModel.MergeCommand.ThrownExceptions.Subscribe(error => + { + WriteToLogsThreadSafe(new LogMessage(error.Message, Color.Red)); + if(error.InnerException != null) + WriteToLogsThreadSafe(new LogMessage(error.InnerException.Message, Color.Red)); + }); + ViewModel.SplitUpscaleMergeCommand.ThrownExceptions.Subscribe(error => { WriteToLogsThreadSafe(new LogMessage(error.Message, Color.Red)); }); } void BindAdvanced() @@ -251,54 +367,62 @@ void BindAdvanced() this.Bind(ViewModel, vm => vm.AdvancedUseResultSuffix, v => v.advancedUseSuffix_checkBox.Checked); this.Bind(ViewModel, vm => vm.AdvancedResultSuffix, v => v.advancedSuffix_textBox.Text); - this.Bind(ViewModel, vm => vm.FilterFilenameCaseSensitive, v => v.filterFilenameCaseSensitive_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentFilter.FilenameCaseSensitive, v => v.filterFilenameCaseSensitive_checkBox.Checked); + + this.Bind(ViewModel, vm => vm.CurrentFilter.FilenameContainsEnabled, v => v.filterFilenameContains_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentFilter.FilenameContainsPattern, v => v.filterFilenameContains_textBox.Text); + + this.Bind(ViewModel, vm => vm.CurrentFilter.FilenameNotContainsEnabled, v => v.filterFilenameNotContains_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentFilter.FilenameNotContainsPattern, v => v.filterFilenameNotContains_textBox.Text); - this.Bind(ViewModel, vm => vm.FilterFilenameContainsEnabled, v => v.filterFilenameContains_checkBox.Checked); - this.Bind(ViewModel, vm => vm.FilterFilenameContainsPattern, v => v.filterFilenameContains_textBox.Text); + this.Bind(ViewModel, vm => vm.CurrentFilter.FolderNameCaseSensitive, v => v.filterFolderNameCaseSensitive_checkBox.Checked); - this.Bind(ViewModel, vm => vm.FilterFilenameNotContainsEnabled, v => v.filterFilenameNotContains_checkBox.Checked); - this.Bind(ViewModel, vm => vm.FilterFilenameNotContainsPattern, v => v.filterFilenameNotContains_textBox.Text); + this.Bind(ViewModel, vm => vm.CurrentFilter.FolderNameContainsEnabled, v => v.filterFolderNameContains_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentFilter.FolderNameContainsPattern, v => v.filterFolderNameContains_textBox.Text); - filterAlpha_comboBox.DataSource = new List() { "None", "Contains alpha", "Doesn't contain alpha" }; + this.Bind(ViewModel, vm => vm.CurrentFilter.FolderNameNotContainsEnabled, v => v.filterFolderNameNotContains_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentFilter.FolderNameNotContainsPattern, v => v.filterFolderNameNotContains_textBox.Text); + + filterAlpha_comboBox.DataSource = Filter.FiltersAlpha; filterAlpha_comboBox.SelectedIndex = 0; - this.Bind(ViewModel, vm => vm.FilterAlpha, v => v.filterAlpha_comboBox.SelectedIndex); + this.Bind(ViewModel, vm => vm.CurrentFilter.Alpha, v => v.filterAlpha_comboBox.SelectedIndex); - this.Bind(ViewModel, vm => vm.FilterImageResolutionEnabled, v => v.filtersSizeOn_checkBox.Checked); - this.Bind(ViewModel, vm => vm.FilterImageResolutionOr, v => v.filterSizeOr_checkBox.Checked); - this.Bind(ViewModel, vm => vm.FilterImageResolutionMaxWidth, v => v.filterSizeWidth_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); - this.Bind(ViewModel, vm => vm.FilterImageResolutionMaxHeight, v => v.filterSizeHeight_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.CurrentFilter.ImageResolutionEnabled, v => v.filtersSizeOn_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentFilter.ImageResolutionOr, v => v.filterSizeOr_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentFilter.ImageResolutionMaxWidth, v => v.filterSizeWidth_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.CurrentFilter.ImageResolutionMaxHeight, v => v.filterSizeHeight_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); - foreach (var item in IEU.filterExtensionsList) + foreach (var item in Filter.ExtensionsList) filterExtensions_checkedListBox.Items.Add(item); - noiseReductionType_comboBox.DataSource = ViewModel.postprocessNoiseFilter; + noiseReductionType_comboBox.DataSource = IEU.NoiseReductionTypes; noiseReductionType_comboBox.SelectedIndex = 0; - this.Bind(ViewModel, vm => vm.NoiseReductionType, v => v.noiseReductionType_comboBox.SelectedIndex); + this.Bind(ViewModel, vm => vm.CurrentProfile.NoiseReductionType, v => v.noiseReductionType_comboBox.SelectedIndex); - this.Bind(ViewModel, vm => vm.ThresholdEnabled, v => v.thresholdEnabled_checkBox.Checked); - this.Bind(ViewModel, vm => vm.ThresholdBlackValue, v => v.thresholdBlack_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); - this.Bind(ViewModel, vm => vm.ThresholdWhiteValue, v => v.thresholdWhite_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.CurrentProfile.ThresholdEnabled, v => v.thresholdEnabled_checkBox.Checked); + this.Bind(ViewModel, vm => vm.CurrentProfile.ThresholdBlackValue, v => v.thresholdBlack_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); + this.Bind(ViewModel, vm => vm.CurrentProfile.ThresholdWhiteValue, v => v.thresholdWhite_numericUpDown.Value, x => x, y => decimal.ToInt32(y)); #region #RESIZE - resizeImageBeforeScaleFactor_comboBox.DataSource = IEU.ResizeImageScaleFactors; + resizeImageBeforeScaleFactor_comboBox.DataSource = new BindingSource(IEU.ResizeImageScaleFactors, null); resizeImageBeforeScaleFactor_comboBox.SelectedIndex = 3; - this.Bind(ViewModel, vm => vm.ResizeImageBeforeScaleFactor, v => v.resizeImageBeforeScaleFactor_comboBox.Text, x => x.ToString(), x => Double.Parse(x.ToString())); + this.Bind(ViewModel, vm => vm.CurrentProfile.ResizeImageBeforeScaleFactor, v => v.resizeImageBeforeScaleFactor_comboBox.Text, x => x.ToString(), x => Double.Parse(x.ToString())); - resizeImageBeforeFilterType_comboBox.DataSource = new BindingSource(IEU.MagickFilterTypes, null); + resizeImageBeforeFilterType_comboBox.DataSource = new BindingSource(Dictionaries.MagickFilterTypes, null); resizeImageBeforeFilterType_comboBox.DisplayMember = "Value"; resizeImageBeforeFilterType_comboBox.ValueMember = "Key"; resizeImageBeforeFilterType_comboBox.SelectedIndex = 0; - this.Bind(ViewModel, vm => vm.ResizeImageBeforeFilterType, v => v.resizeImageBeforeFilterType_comboBox.SelectedValue, x => x, x => (int)x); + this.Bind(ViewModel, vm => vm.CurrentProfile.ResizeImageBeforeFilterType, v => v.resizeImageBeforeFilterType_comboBox.SelectedValue, x => x, x => (int)x); - resizeImageAfterScaleFactor_comboBox.DataSource = IEU.ResizeImageScaleFactors; + resizeImageAfterScaleFactor_comboBox.DataSource = new BindingSource(IEU.ResizeImageScaleFactors, null); resizeImageAfterScaleFactor_comboBox.SelectedIndex = 3; - this.Bind(ViewModel, vm => vm.ResizeImageAfterScaleFactor, v => v.resizeImageAfterScaleFactor_comboBox.Text, x => x.ToString(), x => Double.Parse(x.ToString())); + this.Bind(ViewModel, vm => vm.CurrentProfile.ResizeImageAfterScaleFactor, v => v.resizeImageAfterScaleFactor_comboBox.Text, x => x.ToString(), x => Double.Parse(x.ToString())); - resizeImageAfterFilterType_comboBox.DataSource = new BindingSource(IEU.MagickFilterTypes, null); + resizeImageAfterFilterType_comboBox.DataSource = new BindingSource(Dictionaries.MagickFilterTypes, null); resizeImageAfterFilterType_comboBox.DisplayMember = "Value"; resizeImageAfterFilterType_comboBox.ValueMember = "Key"; resizeImageAfterFilterType_comboBox.SelectedIndex = 0; - this.Bind(ViewModel, vm => vm.ResizeImageAfterFilterType, v => v.resizeImageAfterFilterType_comboBox.SelectedValue, x => x, x => (int)x); + this.Bind(ViewModel, vm => vm.CurrentProfile.ResizeImageAfterFilterType, v => v.resizeImageAfterFilterType_comboBox.SelectedValue, x => x, x => (int)x); #endregion #endregion @@ -306,119 +430,8 @@ void BindAdvanced() #endregion - public MainForm() - { - InitializeComponent(); - CreateMyTreeView(); - treeView_contextMenuStrip.Items[0].Click += OpenModelFolder; - - FormClosing += MainForm_FormClosing; - - //this.OneWayBind(ViewModel, vm => vm.SelectedModelsItems, v => v.checkedModels, vmToViewConverterOverride: new ReactiveListConverter()); - - BindMainTab(); + #region MODELS/TREEVIEW - ViewModel = new IEU(); - - ReadOnlyObservableCollection bindingData; - - ViewModel.Log.Connect() - .ObserveOn(RxApp.MainThreadScheduler) - .Bind(out bindingData) - .OnItemAdded(x => WriteToLogsThreadSafe(x)) - .Subscribe(); - - BindSettingsTab(); - - BindCommands(); - - pathsTextBoxes = new List { esrganPath_textBox, imgPath_textBox, modelsPath_textBox }; - progress_label.Text = "0/0"; - changeEsrganPath_button.Tag = esrganPath_textBox; - changeInputImgPath_button.Tag = imgPath_textBox; - changeMergedResultsPath_button.Tag = resultsMergedPath_textBox; - changeInputPath_button.Tag = inputPath_textBox; - changeOutputPath_button.Tag = outputPath_textBox; - changeModelsPath_button.Tag = modelsPath_textBox; - - changeOriginalImagesPath_button.Tag = originalImagesPath_textBox; - changeResultsAPath_button.Tag = resultsAPath_textBox; - changeResultsBPath_button.Tag = resultsBPath_textBox; - changeResultsDestinationPath_button.Tag = resultsDestinationPath_textBox; - - appVersion_label.Text = "GUI v" + this.AppVersion; - appCoreVersion_linkLabel.Text = "IEU.Core v" + ViewModel.AppVersion; - - interpolationModelOne_comboBox.DisplayMember = "Name"; - interpolationModelOne_comboBox.ValueMember = "FullName"; - interpolationModelOne_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null); - - interpolationModelTwo_comboBox.DisplayMember = "Name"; - interpolationModelTwo_comboBox.ValueMember = "FullName"; - interpolationModelTwo_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null); - - modelForAlpha_comboBox.DisplayMember = "Name"; - modelForAlpha_comboBox.ValueMember = "FullName"; - modelForAlpha_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null); - - previewModels_comboBox.DisplayMember = "Name"; - previewModels_comboBox.ValueMember = "FullName"; - previewModels_comboBox.DataSource = new BindingSource(ViewModel.ModelsItems, null); - - if (ViewModel.ModelsItems.Count > 0) - { - interpolationModelOne_comboBox.SelectedIndex = 0; - interpolationModelTwo_comboBox.SelectedIndex = 0; - modelForAlpha_comboBox.SelectedIndex = 0; - - this.Bind(ViewModel, - vm => vm.LastModelForAlphaPath, - v => v.modelForAlpha_comboBox.SelectedIndex, - x => x==""?0:ViewModel.ModelsItems.FindIndex(y => y.FullName == x), - x => ViewModel.ModelsItems[x].FullName); - } - - lastUseDifferentModelAlpha = useDifferentModelForAlpha_checkBox.Checked; - - BindOutputFormats(); - - #region bind references - //Observable.FromEvent(ev => filterExtensions_checkedListBox.ItemCheck += ev, ev => filterExtensions_checkedListBox.ItemCheck -= ev) - // .Select((x,y) => filterExtensions_checkedListBox.CheckedItems) - // .BindTo(ViewModel, vm => vm.filterSelectedExtensionsList, vmToViewConverterOverride: new ListboxToListConverter()); - - //Observable.FromEventPattern(ev => ItemsListBox.SelectedValueChanged += ev, ev => ItemsListBox.SelectedValueChanged -= ev) - //.Select(_ => ItemsListBox.SelectedItem) - //.BindTo(_vm, vm => vm.SelectedItem); - - //this.WhenActivated(d => - //{ - // d(this.Bind(ViewModel, vm => vm.esrganPath, v => v.esrganPath_textBox.Text)); - //}); - - //var selectionChanged = Observable.FromEvent( - // h => (_, e) => h(e), - // ev => ddsTextureType_comboBox.SelectedIndexChanged += ev, - // ev => ddsTextureType_comboBox.SelectedIndexChanged += ev); - #endregion - - BindAdvanced(); - - VerifyPaths(); - - if (ViewModel.CheckForUpdates) - CheckNewReleases(); - - zoomImageBox.VerticalScroll.Enabled = false; - - imageA_panel.Tag = imageA_pictureBox; - imageB_panel.Tag = imageB_pictureBox; - imageA_pictureBox.SizeMode = PictureBoxSizeMode.Zoom; - imageB_pictureBox.SizeMode = PictureBoxSizeMode.Zoom; - - //OpenImage(@"E:\Documents\GitHub\ImageEnhancingUtility\IEU.Winforms\sample.jpg"); - } - private void CreateMyTreeView() { this.treeView1 = new MyTreeView @@ -438,7 +451,88 @@ private void CreateMyTreeView() this.splitContainer1.Panel1.Controls.Add(this.treeView1); } - void CreateModelTree(List items) + private void treeView1_AfterCheck(object sender, TreeViewEventArgs e) + { + checkedModels = treeView1.Nodes.Find("", true).Where(x => x.Checked).ToList() + .ConvertAll(x => x.Tag as ModelInfo) + .Where(x => x?.GetType().ToString() == "ImageEnhancingUtility.Core.ModelInfo").ToList(); + ViewModel.SelectedModelsItems = checkedModels; //hack + + DisableUseModelForAlpha(); + //else + //{ + // if (outputDestinationMode_comboBox.Items.Count > 2 && outputDestinationMode_comboBox.SelectedIndex != 3) + // outputDestinationMode_comboBox.SelectedIndex = 0; + //} + } + + void UpdateDataSource(ListBox listBox, ComboBox comboBox, ReadOnlyObservableCollection bindingData) + { + listBox.DataSource = new BindingSource(bindingData, null); + profilesMainTab_listBox.DataSource = new BindingSource(bindingData, null); + comboBox.DataSource = new BindingSource(bindingData, null); + } + + void UpdateDataSource(ListBox listBox, ComboBox comboBox, ReadOnlyObservableCollection bindingData) + { + listBox.DataSource = new BindingSource(bindingData, null); + comboBox.DataSource = new BindingSource(bindingData, null); + } + + void UpdateModels(ReadOnlyObservableCollection bindingDataModels) + { + if (bindingDataModels.Count == 0) return; + string selectedModelFullname = ViewModel.CurrentProfile.ModelForAlpha?.FullName; + modelForAlpha_comboBox.DataSource = new BindingSource(bindingDataModels, null); + int lastSelectedIndex = bindingDataModels.ToList().FindIndex(y => y.FullName == selectedModelFullname); + if (lastSelectedIndex >= bindingDataModels.Count || lastSelectedIndex < 0) + lastSelectedIndex = 0; + modelForAlpha_comboBox.SelectedIndex = lastSelectedIndex; + + selectedModelFullname = ViewModel.CurrentProfile.Model?.FullName; + profileModel_comboBox.DataSource = new BindingSource(bindingDataModels, null); + lastSelectedIndex = bindingDataModels.ToList().FindIndex(y => y.FullName == selectedModelFullname); + if (lastSelectedIndex >= bindingDataModels.Count || lastSelectedIndex < 0) + lastSelectedIndex = 0; + profileModel_comboBox.SelectedIndex = lastSelectedIndex; + + selectedModelFullname = (interpolationModelOne_comboBox.SelectedItem as ModelInfo)?.FullName; + interpolationModelOne_comboBox.DataSource = new BindingSource(bindingDataModels, null); + lastSelectedIndex = bindingDataModels.ToList().FindIndex(y => y.FullName == selectedModelFullname); + if (lastSelectedIndex >= bindingDataModels.Count || lastSelectedIndex < 0) + lastSelectedIndex = 0; + interpolationModelOne_comboBox.SelectedIndex = lastSelectedIndex; + + selectedModelFullname = (interpolationModelTwo_comboBox.SelectedItem as ModelInfo)?.FullName; + interpolationModelTwo_comboBox.DataSource = new BindingSource(bindingDataModels, null); + lastSelectedIndex = bindingDataModels.ToList().FindIndex(y => y.FullName == selectedModelFullname); + if (lastSelectedIndex >= bindingDataModels.Count || lastSelectedIndex < 0) + lastSelectedIndex = 0; + interpolationModelTwo_comboBox.SelectedIndex = lastSelectedIndex; + + selectedModelFullname = (previewModels_comboBox.SelectedItem as ModelInfo)?.FullName; + previewModels_comboBox.DataSource = new BindingSource(bindingDataModels, null); + lastSelectedIndex = bindingDataModels.ToList().FindIndex(y => y.FullName == selectedModelFullname); + if (lastSelectedIndex >= bindingDataModels.Count || lastSelectedIndex < 0) + lastSelectedIndex = 0; + previewModels_comboBox.SelectedIndex = lastSelectedIndex; + + if (bindingDataModels.Count > 0) + CreateModelTree(bindingDataModels); + } + + ModelInfo GetModel(int x) + { + return ViewModel.ModelsItems.Items.ToList()[x]; + } + + int GetIndex(ModelInfo x) + { + int r = x == null ? 0 : ViewModel.ModelsItems.Items.ToList().FindIndex(y => y.FullName == x.FullName); + return r; + } + + void CreateModelTree(IEnumerable items) { treeView1.Nodes.Clear(); treeView1.CheckBoxes = true; @@ -474,7 +568,9 @@ void CreateModelTree(List items) } treeView1.Nodes[0].ExpandAll(); } - + + #endregion + bool VerifyPaths() { string message = "Some directories dont exist!"; @@ -541,7 +637,29 @@ async Task CheckNewReleases() break; } } - + + void DisableUseModelForAlpha() + { + useDifferentModelForAlpha_checkBox.Enabled = checkedModels.Count <= 1 || useProfileModel_checkBox.Checked; + + if (checkedModels.Count > 1) + if (useDifferentModelForAlpha_checkBox.Checked) + { + lastUseDifferentModelAlpha = true; + useDifferentModelForAlpha_checkBox.Checked = false; + } + else + { + if (lastUseDifferentModelAlpha) + useDifferentModelForAlpha_checkBox.Checked = lastUseDifferentModelAlpha; + } + } + + void HideRules(bool on = true) + { + rules_groupBox.Visible = !on; + } + #region PREVIEW methods Bitmap originalPreview, resultPreview; @@ -563,7 +681,7 @@ private void OpenImage(string fullname) originalPreview = null; resultPreview = null; - Image image = Helper.LoadImageToBitmap(fullname); + Image image = ImageOperations.LoadImageToBitmap(fullname); previewFullname = fullname; //zoomImageBox.BeginUpdate(); zoomImageBox.Image = image; @@ -587,8 +705,7 @@ private void OpenImage(string fullname) } FillZoomLevels(); UpdateStatusBar(); - zoomImageBox.ZoomToFit(); - + zoomImageBox.ZoomToFit(); } private void UpdatePreview() @@ -877,17 +994,25 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) } } + private void PreviewInProgress(bool inProgress) + { + int progress = inProgress ? 30 : 0; + bool enabled = inProgress ? false : true; + preview_progressBar.Style = inProgress? ProgressBarStyle.Marquee : preview_progressBar.Style = ProgressBarStyle.Continuous; + preview_progressBar.MarqueeAnimationSpeed = progress; + previewUpdate_button.Enabled = enabled; + previewSave_button.Enabled = enabled; + zoomImageBox.Enabled = enabled; + } + private async void previewUpdate_button_Click(object sender, EventArgs e) { string modelPath = previewModels_comboBox.SelectedValue.ToString(); if (originalPreview == null) - return; - - preview_progressBar.Style = ProgressBarStyle.Marquee; - preview_progressBar.MarqueeAnimationSpeed = 30; - Bitmap preview = await ViewModel.CreatePreview(originalPreview, modelPath); - preview_progressBar.Style = ProgressBarStyle.Continuous; - preview_progressBar.MarqueeAnimationSpeed = 0; + return; + PreviewInProgress(true); + Bitmap preview = await ViewModel.CreatePreview(originalPreview, modelPath); + PreviewInProgress(false); if (preview != null) { previewImageBox.Image = preview; @@ -901,14 +1026,13 @@ private async void previewUpdate_button_Click(object sender, EventArgs e) private async void previewSave_button_Click(object sender, EventArgs e) { + string modelPath = previewModels_comboBox.SelectedValue.ToString(); if (zoomImageBox.Image == null) return; - preview_progressBar.Style = ProgressBarStyle.Marquee; - preview_progressBar.MarqueeAnimationSpeed = 30; + PreviewInProgress(true); Bitmap preview = await ViewModel.CreatePreview((Bitmap)zoomImageBox.Image, modelPath); - preview_progressBar.Style = ProgressBarStyle.Continuous; - preview_progressBar.MarqueeAnimationSpeed = 0; + PreviewInProgress(false); if (preview != null) { string modelName = Path.GetFileNameWithoutExtension(modelPath); @@ -918,7 +1042,7 @@ private async void previewSave_button_Click(object sender, EventArgs e) } else { - MessageBox.Show("Failed to create preview, sorry!"); + MessageBox.Show($"Failed to create preview! Logs saved in <{ViewModel.EsrganPath}\\IEU_preview>"); } } @@ -961,8 +1085,7 @@ private void zoomImageBox_DragDrop(object sender, DragEventArgs e) } } } - - + #endregion #region MainForm @@ -1005,6 +1128,8 @@ private void MainForm_Load(object sender, EventArgs e) { SendMessage(filterFilenameContains_textBox.Handle, 0x1501, 1, "word1;word2;word3"); SendMessage(filterFilenameNotContains_textBox.Handle, 0x1501, 1, "word1;word2;word3"); + SendMessage(filterFolderNameContains_textBox.Handle, 0x1501, 1, "word1;word2;word3"); + SendMessage(filterFolderNameNotContains_textBox.Handle, 0x1501, 1, "word1;word2;word3"); SendMessage(interpolationOutputModelName_textBox.Handle, 0x1501, 1, "New model name"); Width = Convert.ToInt32(ViewModel.WindowWidth); @@ -1046,31 +1171,16 @@ private async void interpolationStart_button_Click(object sender, EventArgs e) #endregion - private void advancedUseSuffix_checkBox_CheckedChanged(object sender, EventArgs e) + void comboBox_DisableMouseWheel(object sender, MouseEventArgs e) { - advancedSuffix_textBox.ReadOnly = !advancedUseSuffix_checkBox.Checked; + ((HandledMouseEventArgs)e).Handled = true; } - private void treeView1_AfterCheck(object sender, TreeViewEventArgs e) + private void advancedUseSuffix_checkBox_CheckedChanged(object sender, EventArgs e) { - checkedModels = treeView1.Nodes.Find("", true).Where(x => x.Checked).ToList() - .ConvertAll(x => x.Tag as ModelInfo) - .Where(x => x?.GetType().ToString() == "ImageEnhancingUtility.Core.ModelInfo").ToList(); - ViewModel.SelectedModelsItems = checkedModels; //hack - - useDifferentModelForAlpha_checkBox.Enabled = checkedModels.Count <= 1; - - if (checkedModels.Count > 1) - if (useDifferentModelForAlpha_checkBox.Checked) - { - lastUseDifferentModelAlpha = true; - useDifferentModelForAlpha_checkBox.Checked = false; - } - else - if (lastUseDifferentModelAlpha) - useDifferentModelForAlpha_checkBox.Checked = lastUseDifferentModelAlpha; + advancedSuffix_textBox.ReadOnly = !advancedUseSuffix_checkBox.Checked; } - + private void richTextBox1_TextChanged(object sender, EventArgs e) { // set the current caret position to the end @@ -1192,6 +1302,7 @@ private void mainTab_DragDrop(object sender, DragEventArgs e) MessageBox.Show($"Succesfully copied {imagesCopied} files" + (modelsCopied > 0 ? $" and { modelsCopied} models" : "")); } + string alphaPrev = "05"; private void InterpolationSettingsChanged(object sender, EventArgs e) { @@ -1222,6 +1333,17 @@ private void useDifferentModelForAlpha_checkBox_CheckedChanged(object sender, Ev lastUseDifferentModelAlpha = false; } + private void UseProfileModel_checkBox_CheckedChanged(object sender, EventArgs e) + { + profileModel_comboBox.Enabled = useProfileModel_checkBox.Checked; + treeView1.Enabled = !useProfileModel_checkBox.Checked; + + if (!useDifferentModelForAlpha_checkBox.Enabled && useProfileModel_checkBox.Checked) + useDifferentModelForAlpha_checkBox.Enabled = true; + if (useDifferentModelForAlpha_checkBox.Enabled && !useProfileModel_checkBox.Checked && checkedModels.Count > 1) + DisableUseModelForAlpha(); + } + private void preserveFormat_checkBox_CheckedChanged(object sender, EventArgs e) { outputFormat_comboBox.Enabled = !preserveFormat_checkBox.Checked; @@ -1231,13 +1353,14 @@ private void filterExtensions_checkedListBox_ItemCheck(object sender, ItemCheckE { CheckedListBox checkedListBox = sender as CheckedListBox; var selectedITem = checkedListBox.SelectedItem; - ViewModel.FilterSelectedExtensionsList = checkedListBox.CheckedItems.Cast().ToList(); //hack + ViewModel.CurrentFilter.SelectedExtensionsList = checkedListBox.CheckedItems.Cast().ToList(); //hack if (checkedListBox.CheckedItems.Contains(selectedITem)) - ViewModel.FilterSelectedExtensionsList.Remove(checkedListBox.SelectedItem.ToString()); + ViewModel.CurrentFilter.SelectedExtensionsList.Remove(checkedListBox.SelectedItem.ToString()); else - ViewModel.FilterSelectedExtensionsList.Add(checkedListBox.SelectedItem.ToString()); + ViewModel.CurrentFilter.SelectedExtensionsList.Add(checkedListBox.SelectedItem.ToString()); } + #region IMAGE INTERPOLATION private void imagePanel_DragDrop(object sender, DragEventArgs e) @@ -1247,12 +1370,14 @@ private void imagePanel_DragDrop(object sender, DragEventArgs e) { try { - Image image = Helper.LoadImageToBitmap(filePaths[0]); + Image image = ImageOperations.LoadImageToBitmap(filePaths[0]); PictureBox pictureBox = ((sender as Panel).Tag as PictureBox); pictureBox.Image = image; pictureBox.Tag = filePaths[0]; if(overlayResultName_textBox.Text != Path.GetFileName(imageA_pictureBox.Tag as string)) overlayResultName_textBox.Text = Path.GetFileName(filePaths[0]); + Label label = pictureBox.Name == "imageA_pictureBox" ? imageAName_label : imageBName_label; + label.Text = Path.GetFileName(filePaths[0]); } catch { @@ -1310,11 +1435,151 @@ private void ImageInterpolation_trackBar_Scroll(object sender, EventArgs e) #endregion - private void modelForAlpha_comboBox_SelectedIndexChanged(object sender, EventArgs e) + #region RULESET + + private void SaveProfile_button_Click(object sender, EventArgs e) + { + ViewModel.AddProfile(saveProfileName_textBox.Text); + } + + private void LoadProfile_button_Click(object sender, EventArgs e) + { + ViewModel.LoadProfile(profiles_listBox.SelectedValue as Profile); + } + + private void LoadProfileMainTab_button_Click(object sender, EventArgs e) { - ViewModel.ModelForAlpha = modelForAlpha_comboBox.SelectedItem as ModelInfo; //hack, breaks MVVM + ViewModel.LoadProfile(profilesMainTab_listBox.SelectedValue as Profile); } + private void configs_listBox_SelectedIndexChanged(object sender, EventArgs e) + { + if (profiles_listBox.SelectedValue != null) + saveProfileName_textBox.Text = (profiles_listBox.SelectedValue as Profile).Name; + if ((profiles_listBox.SelectedValue as Profile).Name == "Global") + deleteProfile_button.Enabled = false; + else + deleteProfile_button.Enabled = true; + } + + private void DeleteProfile_button_Click(object sender, EventArgs e) + { + ViewModel.DeleteProfile(profiles_listBox.SelectedValue as Profile); + } + + private void SaveFilter_button_Click(object sender, EventArgs e) + { + ViewModel.AddFilter(newFilterName_textBox.Text); + } + + private void LoadFilter_button_Click(object sender, EventArgs e) + { + Filter loadedFilter = filters_listBox.SelectedValue as Filter; + ViewModel.LoadFilter(loadedFilter); + + for (int i = 0; i < filterExtensions_checkedListBox.Items.Count; i++) + filterExtensions_checkedListBox.SetItemChecked(i, false); + + foreach (var ext in loadedFilter.SelectedExtensionsList) + { + int index = filterExtensions_checkedListBox.Items.IndexOf(ext); + filterExtensions_checkedListBox.SetItemChecked(index, true); + } + } + + private void DeleteFilter_button_Click(object sender, EventArgs e) + { + ViewModel.DeleteFilter(filters_listBox.SelectedValue as Filter); + } + + private void filters_listBox_SelectedIndexChanged(object sender, EventArgs e) + { + if (filters_listBox.SelectedValue != null) + newFilterName_textBox.Text = (filters_listBox.SelectedValue as Filter).Name; + if ((filters_listBox.SelectedValue as Filter).Name == "Global") + deleteFilter_button.Enabled = false; + else + deleteFilter_button.Enabled = true; + } + + private void SaveRule_button_Click(object sender, EventArgs e) + { + ViewModel.AddRule( + newRuleName_textBox.Text, + ruleProfiles_comboBox.SelectedValue as Profile, + ruleFilters_comboBox.SelectedValue as Filter); + rules_listBox.DataSource = new BindingSource(ViewModel.Ruleset.Values.ToList(), null); + } + + private void SaveRuleFromCurrent_button_Click(object sender, EventArgs e) + { + ViewModel.AddRule( + newRuleName_textBox.Text, + ViewModel.CurrentProfile, + ViewModel.CurrentFilter); + rules_listBox.DataSource = new BindingSource(ViewModel.Ruleset.Values.ToList(), null); + } + + private void DeleteRule_button_Click(object sender, EventArgs e) + { + ViewModel.DeleteRule(rules_listBox.SelectedValue as Rule); + rules_listBox.DataSource = new BindingSource(ViewModel.Ruleset.Values.ToList(), null); + } + + private void Rules_listBox_SelectedIndexChanged(object sender, EventArgs e) + { + if (rules_listBox.SelectedValue != null) + newRuleName_textBox.Text = (rules_listBox.SelectedValue as Rule).Name; + if ((rules_listBox.SelectedValue as Rule).Name == "Global") + deleteRule_button.Enabled = false; + else + deleteRule_button.Enabled = true; + rulePriority_numericUpDown.Value = (rules_listBox.SelectedValue as Rule).Priority; + } + + private void NewRuleName_textBox_TextChanged(object sender, EventArgs e) + { + if(newRuleName_textBox.Text == "Global") + saveRule_button.Enabled = false; + else + saveRule_button.Enabled = true; + } + + private void LoadRule_button_Click(object sender, EventArgs e) + { + Rule selectedRule = rules_listBox.SelectedValue as Rule; + if (selectedRule != null) + { + ViewModel.LoadProfile(selectedRule.Profile); + ViewModel.LoadFilter(selectedRule.Filter); + } + } + + private void TopMost_checkBox_CheckedChanged(object sender, EventArgs e) + { + TopMost = topMost_checkBox.Checked; + } + + private void RulePriority_numericUpDown_ValueChanged(object sender, EventArgs e) + { + int newValue = (int)rulePriority_numericUpDown.Value; + Rule selectedRule = rules_listBox.SelectedValue as Rule; + if (selectedRule != null + && selectedRule.Name != "Global" + && newValue != selectedRule.Priority + && newValue > 0 + && newValue < rules_listBox.Items.Count) + { + ViewModel.ChangeRulePriority(selectedRule, newValue); + rules_listBox.DataSource = new BindingSource(ViewModel.Ruleset.Values.ToList(), null); + rules_listBox.SelectedIndex = rules_listBox.Items.Count - 1 - newValue; + } + else + rulePriority_numericUpDown.Value = (rules_listBox.SelectedValue as Rule).Priority; + + } + #endregion + private void webpLossless_checkBox_CheckedChanged(object sender, EventArgs e) { webpPreset_comboBox.Enabled = !webpLossless_checkBox.Checked; diff --git a/MainForm.resx b/MainForm.resx index 28d24ac..5e4f020 100644 --- a/MainForm.resx +++ b/MainForm.resx @@ -118,10 +118,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 17, 17 + 18, -3 - 224, 17 + 281, 1 @@ -182,10 +182,10 @@ - 114, 17 + 96, -1 - 49 + 26 diff --git a/Program.cs b/Program.cs index 8018826..63057aa 100644 --- a/Program.cs +++ b/Program.cs @@ -8,9 +8,6 @@ namespace ImageEnhancingUtility.Winforms { static class Program { - /// - /// Главная точка входа для приложения. - /// [STAThread] static void Main() {