diff --git a/Form1.Designer.cs b/Form1.Designer.cs index 182b6fc..769d55a 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -65,7 +65,6 @@ namespace photo_sorter this.gbox_copybool = new System.Windows.Forms.GroupBox(); this.rad_sort_move = new System.Windows.Forms.RadioButton(); this.rad_sort_copy = new System.Windows.Forms.RadioButton(); - this.tbox_sort_secondary = new System.Windows.Forms.TextBox(); this.lbl_sort_secondary = new System.Windows.Forms.Label(); this.tbox_sort_primary = new System.Windows.Forms.TextBox(); this.lbl_sort_primary = new System.Windows.Forms.Label(); @@ -77,6 +76,13 @@ namespace photo_sorter this.split_container_main = new System.Windows.Forms.SplitContainer(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); this.btn_delete = new System.Windows.Forms.Button(); + this.btn_prerender = new System.Windows.Forms.Button(); + this.cbox_sort_secondary = new System.Windows.Forms.ComboBox(); + this.lbox_secondary_sortlist = new System.Windows.Forms.ListBox(); + this.tabctrl_sort_dir = new System.Windows.Forms.TabControl(); + this.tab_secondsort = new System.Windows.Forms.TabPage(); + this.tab_primesort = new System.Windows.Forms.TabPage(); + this.lbox_primary_sortlist = new System.Windows.Forms.ListBox(); this.menuStrip1.SuspendLayout(); this.gbox_preview.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.img_preview)).BeginInit(); @@ -88,6 +94,9 @@ namespace photo_sorter this.split_container_main.Panel1.SuspendLayout(); this.split_container_main.Panel2.SuspendLayout(); this.split_container_main.SuspendLayout(); + this.tabctrl_sort_dir.SuspendLayout(); + this.tab_secondsort.SuspendLayout(); + this.tab_primesort.SuspendLayout(); this.SuspendLayout(); // // menuStrip1 @@ -271,6 +280,9 @@ namespace photo_sorter this.gbox_info.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.gbox_info.Controls.Add(this.tabctrl_sort_dir); + this.gbox_info.Controls.Add(this.cbox_sort_secondary); + this.gbox_info.Controls.Add(this.btn_prerender); this.gbox_info.Controls.Add(this.gbox_photo_type); this.gbox_info.Controls.Add(this.btn_reload_src); this.gbox_info.Controls.Add(this.btn_open_src_dir); @@ -280,12 +292,11 @@ namespace photo_sorter this.gbox_info.Controls.Add(this.tbox_dest_dir); this.gbox_info.Controls.Add(this.lbl_dest_dir); this.gbox_info.Controls.Add(this.gbox_copybool); - this.gbox_info.Controls.Add(this.tbox_sort_secondary); this.gbox_info.Controls.Add(this.lbl_sort_secondary); this.gbox_info.Controls.Add(this.tbox_sort_primary); this.gbox_info.Controls.Add(this.lbl_sort_primary); this.gbox_info.Location = new System.Drawing.Point(3, 3); - this.gbox_info.MinimumSize = new System.Drawing.Size(280, 320); + this.gbox_info.MinimumSize = new System.Drawing.Size(346, 540); this.gbox_info.Name = "gbox_info"; this.gbox_info.Size = new System.Drawing.Size(354, 540); this.gbox_info.TabIndex = 2; @@ -301,7 +312,7 @@ namespace photo_sorter this.gbox_photo_type.Controls.Add(this.rad_cr2); this.gbox_photo_type.Location = new System.Drawing.Point(7, 151); this.gbox_photo_type.Name = "gbox_photo_type"; - this.gbox_photo_type.Size = new System.Drawing.Size(142, 137); + this.gbox_photo_type.Size = new System.Drawing.Size(211, 89); this.gbox_photo_type.TabIndex = 4; this.gbox_photo_type.TabStop = false; this.gbox_photo_type.Text = "File Type"; @@ -319,7 +330,7 @@ namespace photo_sorter // rad_png // this.rad_png.AutoSize = true; - this.rad_png.Location = new System.Drawing.Point(6, 111); + this.rad_png.Location = new System.Drawing.Point(156, 42); this.rad_png.Name = "rad_png"; this.rad_png.Size = new System.Drawing.Size(48, 17); this.rad_png.TabIndex = 8; @@ -329,7 +340,7 @@ namespace photo_sorter // rad_jpeg // this.rad_jpeg.AutoSize = true; - this.rad_jpeg.Location = new System.Drawing.Point(6, 88); + this.rad_jpeg.Location = new System.Drawing.Point(156, 19); this.rad_jpeg.Name = "rad_jpeg"; this.rad_jpeg.Size = new System.Drawing.Size(45, 17); this.rad_jpeg.TabIndex = 7; @@ -466,15 +477,6 @@ namespace photo_sorter this.rad_sort_copy.Text = "Copy"; this.rad_sort_copy.UseVisualStyleBackColor = true; // - // tbox_sort_secondary - // - this.tbox_sort_secondary.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tbox_sort_secondary.Location = new System.Drawing.Point(6, 123); - this.tbox_sort_secondary.Name = "tbox_sort_secondary"; - this.tbox_sort_secondary.Size = new System.Drawing.Size(342, 20); - this.tbox_sort_secondary.TabIndex = 3; - // // lbl_sort_secondary // this.lbl_sort_secondary.AutoSize = true; @@ -553,7 +555,7 @@ namespace photo_sorter // split_container_main.Panel1 // this.split_container_main.Panel1.Controls.Add(this.gbox_info); - this.split_container_main.Panel1MinSize = 320; + this.split_container_main.Panel1MinSize = 350; // // split_container_main.Panel2 // @@ -572,7 +574,84 @@ namespace photo_sorter this.btn_delete.TabIndex = 9; this.btn_delete.Text = "&Delete (!)"; this.btn_delete.UseVisualStyleBackColor = true; - this.btn_delete.Visible = false; + this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click); + // + // btn_prerender + // + this.btn_prerender.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btn_prerender.Enabled = false; + this.btn_prerender.Location = new System.Drawing.Point(183, 488); + this.btn_prerender.Name = "btn_prerender"; + this.btn_prerender.Size = new System.Drawing.Size(75, 23); + this.btn_prerender.TabIndex = 903; + this.btn_prerender.Text = "Pre-R&ender"; + this.btn_prerender.UseVisualStyleBackColor = true; + this.btn_prerender.Click += new System.EventHandler(this.btn_prerender_Click); + // + // cbox_sort_secondary + // + this.cbox_sort_secondary.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cbox_sort_secondary.FormattingEnabled = true; + this.cbox_sort_secondary.Location = new System.Drawing.Point(6, 125); + this.cbox_sort_secondary.Name = "cbox_sort_secondary"; + this.cbox_sort_secondary.Size = new System.Drawing.Size(342, 21); + this.cbox_sort_secondary.TabIndex = 904; + // + // lbox_secondary_sortlist + // + this.lbox_secondary_sortlist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbox_secondary_sortlist.FormattingEnabled = true; + this.lbox_secondary_sortlist.Location = new System.Drawing.Point(5, 6); + this.lbox_secondary_sortlist.Name = "lbox_secondary_sortlist"; + this.lbox_secondary_sortlist.Size = new System.Drawing.Size(323, 199); + this.lbox_secondary_sortlist.TabIndex = 0; + // + // tabctrl_sort_dir + // + this.tabctrl_sort_dir.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabctrl_sort_dir.Controls.Add(this.tab_primesort); + this.tabctrl_sort_dir.Controls.Add(this.tab_secondsort); + this.tabctrl_sort_dir.Location = new System.Drawing.Point(6, 246); + this.tabctrl_sort_dir.Name = "tabctrl_sort_dir"; + this.tabctrl_sort_dir.SelectedIndex = 0; + this.tabctrl_sort_dir.Size = new System.Drawing.Size(340, 236); + this.tabctrl_sort_dir.TabIndex = 0; + // + // tab_secondsort + // + this.tab_secondsort.Controls.Add(this.lbox_secondary_sortlist); + this.tab_secondsort.Location = new System.Drawing.Point(4, 22); + this.tab_secondsort.Name = "tab_secondsort"; + this.tab_secondsort.Padding = new System.Windows.Forms.Padding(3); + this.tab_secondsort.Size = new System.Drawing.Size(332, 210); + this.tab_secondsort.TabIndex = 1; + this.tab_secondsort.Text = "Secondary Sort Directories"; + // + // tab_primesort + // + this.tab_primesort.Controls.Add(this.lbox_primary_sortlist); + this.tab_primesort.Location = new System.Drawing.Point(4, 22); + this.tab_primesort.Name = "tab_primesort"; + this.tab_primesort.Padding = new System.Windows.Forms.Padding(3); + this.tab_primesort.Size = new System.Drawing.Size(332, 210); + this.tab_primesort.TabIndex = 0; + this.tab_primesort.Text = "Primary Sort Directories"; + // + // lbox_primary_sortlist + // + this.lbox_primary_sortlist.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbox_primary_sortlist.FormattingEnabled = true; + this.lbox_primary_sortlist.Location = new System.Drawing.Point(5, 6); + this.lbox_primary_sortlist.Name = "lbox_primary_sortlist"; + this.lbox_primary_sortlist.Size = new System.Drawing.Size(323, 199); + this.lbox_primary_sortlist.TabIndex = 1; // // form_main // @@ -604,6 +683,9 @@ namespace photo_sorter this.split_container_main.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.split_container_main)).EndInit(); this.split_container_main.ResumeLayout(false); + this.tabctrl_sort_dir.ResumeLayout(false); + this.tab_secondsort.ResumeLayout(false); + this.tab_primesort.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -628,7 +710,6 @@ namespace photo_sorter private System.Windows.Forms.GroupBox gbox_copybool; private System.Windows.Forms.RadioButton rad_sort_move; private System.Windows.Forms.RadioButton rad_sort_copy; - private System.Windows.Forms.TextBox tbox_sort_secondary; private System.Windows.Forms.Label lbl_sort_secondary; private System.Windows.Forms.TextBox tbox_sort_primary; private System.Windows.Forms.Label lbl_sort_primary; @@ -658,6 +739,13 @@ namespace photo_sorter private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.Button btn_delete; + private System.Windows.Forms.Button btn_prerender; + private System.Windows.Forms.ComboBox cbox_sort_secondary; + private System.Windows.Forms.ListBox lbox_secondary_sortlist; + private System.Windows.Forms.TabControl tabctrl_sort_dir; + private System.Windows.Forms.TabPage tab_primesort; + private System.Windows.Forms.ListBox lbox_primary_sortlist; + private System.Windows.Forms.TabPage tab_secondsort; } } diff --git a/Form1.cs b/Form1.cs index 8d495ea..6b0697a 100644 --- a/Form1.cs +++ b/Form1.cs @@ -349,7 +349,7 @@ namespace photo_sorter public void sort_image() { string prim_dir = global.dest + '\\' + tbox_sort_primary.Text; - string sec_dir = prim_dir + '\\' + tbox_sort_secondary.Text; + string sec_dir = prim_dir + '\\' + cbox_sort_secondary.Text; string dpath; if (global.dest == "") @@ -367,7 +367,7 @@ namespace photo_sorter //MessageBox.Show("Primary sort directory name is required!", "Error: Primary Sort", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } - if (tbox_sort_secondary.Text == "") + if (cbox_sort_secondary.Text == "") { dpath = prim_dir; } @@ -455,6 +455,28 @@ namespace photo_sorter } } } + public void delete_image() + { + if (MessageBox.Show("Are you sure you want to delete this photo?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + MessageBox.Show("Poof! The photo would normally get deleted here if this function's code were completed, but alas, it is not, so this photo you have deemed to be subpar is still existing."); + } + else + { + MessageBox.Show("Forsooth! This photo is a keeper after all and would not have been deleted!"); + } + } + public void prerender_init() + { + if (MessageBox.Show("WARNING: Pre-rendering your photos may take a long time, and the preview image quality will be lower than normal.\n\nWould you like to proceed?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + MessageBox.Show("Pre-rendering would normally have started, but instead, nothing interesting happens."); + } + else + { + MessageBox.Show("You've chickened out and abandoned the pre-render process. Nothing interesting happens."); + } + } // // UI Interactions @@ -485,7 +507,7 @@ namespace photo_sorter private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { - MessageBox.Show("Photo Sorter v1.0.1\n\nThis application is Copyright \u00A9 Skyfall Tech, 2022-2023.\n\nPlease visit https://www.skyfall.tech/ for more information."); + MessageBox.Show("Photo Sorter v1.0.2\n\nThis application is Copyright \u00A9 Aaron Johnson, 2023.\n\nPlease visit https://www.skyfall.tech/ for more information."); } private void btn_open_src_dir_Click(object sender, EventArgs e) @@ -527,6 +549,16 @@ namespace photo_sorter Properties.Settings.Default.Save(); } + private void btn_delete_Click(object sender, EventArgs e) + { + delete_image(); + } + + private void btn_prerender_Click(object sender, EventArgs e) + { + prerender_init(); + } + /*private void Form1_FormClosing(Object sender, FormClosingEventArgs e) { diff --git a/photo_sorter.csproj b/photo_sorter.csproj index 3efbb7c..774a521 100644 --- a/photo_sorter.csproj +++ b/photo_sorter.csproj @@ -25,8 +25,8 @@ false false true - 2 - 1.0.1.2 + 0 + 1.0.1.0 false true