Added informative loading text to status bar, replaced default image

master
Aaron 3 years ago
parent 62c79ddbb6
commit 870abe7f58

170
Form1.Designer.cs generated

@ -45,6 +45,12 @@ namespace photo_sorter
this.btn_sort = new System.Windows.Forms.Button(); this.btn_sort = new System.Windows.Forms.Button();
this.img_preview = new System.Windows.Forms.PictureBox(); this.img_preview = new System.Windows.Forms.PictureBox();
this.gbox_info = new System.Windows.Forms.GroupBox(); this.gbox_info = new System.Windows.Forms.GroupBox();
this.gbox_photo_type = new System.Windows.Forms.GroupBox();
this.rad_dng = new System.Windows.Forms.RadioButton();
this.rad_png = new System.Windows.Forms.RadioButton();
this.rad_jpeg = new System.Windows.Forms.RadioButton();
this.rad_nef = new System.Windows.Forms.RadioButton();
this.rad_cr2 = new System.Windows.Forms.RadioButton();
this.btn_reload_src = new System.Windows.Forms.Button(); this.btn_reload_src = new System.Windows.Forms.Button();
this.btn_open_src_dir = new System.Windows.Forms.Button(); this.btn_open_src_dir = new System.Windows.Forms.Button();
this.btn_open_dest_dir = new System.Windows.Forms.Button(); this.btn_open_dest_dir = new System.Windows.Forms.Button();
@ -62,27 +68,21 @@ namespace photo_sorter
this.status_bar = new System.Windows.Forms.StatusStrip(); this.status_bar = new System.Windows.Forms.StatusStrip();
this.stat_last_action = new System.Windows.Forms.ToolStripStatusLabel(); this.stat_last_action = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripSpacer = new System.Windows.Forms.ToolStripStatusLabel(); this.toolStripSpacer = new System.Windows.Forms.ToolStripStatusLabel();
this.stat_bar_label = new System.Windows.Forms.ToolStripStatusLabel();
this.pbar = new System.Windows.Forms.ToolStripProgressBar(); this.pbar = new System.Windows.Forms.ToolStripProgressBar();
this.split_container_main = new System.Windows.Forms.SplitContainer(); this.split_container_main = new System.Windows.Forms.SplitContainer();
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.stat_bar_label = new System.Windows.Forms.ToolStripStatusLabel();
this.gbox_photo_type = new System.Windows.Forms.GroupBox();
this.rad_nef = new System.Windows.Forms.RadioButton();
this.rad_cr2 = new System.Windows.Forms.RadioButton();
this.rad_jpeg = new System.Windows.Forms.RadioButton();
this.rad_png = new System.Windows.Forms.RadioButton();
this.rad_dng = new System.Windows.Forms.RadioButton();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.gbox_preview.SuspendLayout(); this.gbox_preview.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.img_preview)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.img_preview)).BeginInit();
this.gbox_info.SuspendLayout(); this.gbox_info.SuspendLayout();
this.gbox_photo_type.SuspendLayout();
this.gbox_copybool.SuspendLayout(); this.gbox_copybool.SuspendLayout();
this.status_bar.SuspendLayout(); this.status_bar.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.split_container_main)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.split_container_main)).BeginInit();
this.split_container_main.Panel1.SuspendLayout(); this.split_container_main.Panel1.SuspendLayout();
this.split_container_main.Panel2.SuspendLayout(); this.split_container_main.Panel2.SuspendLayout();
this.split_container_main.SuspendLayout(); this.split_container_main.SuspendLayout();
this.gbox_photo_type.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// menuStrip1 // menuStrip1
@ -177,9 +177,9 @@ namespace photo_sorter
this.lbl_current_fname.AutoSize = true; this.lbl_current_fname.AutoSize = true;
this.lbl_current_fname.Location = new System.Drawing.Point(9, 18); this.lbl_current_fname.Location = new System.Drawing.Point(9, 18);
this.lbl_current_fname.Name = "lbl_current_fname"; this.lbl_current_fname.Name = "lbl_current_fname";
this.lbl_current_fname.Size = new System.Drawing.Size(214, 13); this.lbl_current_fname.Size = new System.Drawing.Size(202, 13);
this.lbl_current_fname.TabIndex = 7; this.lbl_current_fname.TabIndex = 7;
this.lbl_current_fname.Text = "hank_ketchum.file - Select Source to begin!"; this.lbl_current_fname.Text = "reckoning_2.file - Select Source to begin!";
// //
// btn_next // btn_next
// //
@ -253,6 +253,72 @@ namespace photo_sorter
this.gbox_info.TabStop = false; this.gbox_info.TabStop = false;
this.gbox_info.Text = "Sorting Info"; this.gbox_info.Text = "Sorting Info";
// //
// gbox_photo_type
//
this.gbox_photo_type.Controls.Add(this.rad_dng);
this.gbox_photo_type.Controls.Add(this.rad_png);
this.gbox_photo_type.Controls.Add(this.rad_jpeg);
this.gbox_photo_type.Controls.Add(this.rad_nef);
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.TabIndex = 6;
this.gbox_photo_type.TabStop = false;
this.gbox_photo_type.Text = "File Type";
//
// rad_dng
//
this.rad_dng.AutoSize = true;
this.rad_dng.Location = new System.Drawing.Point(6, 65);
this.rad_dng.Name = "rad_dng";
this.rad_dng.Size = new System.Drawing.Size(133, 17);
this.rad_dng.TabIndex = 6;
this.rad_dng.Text = "DNG (Digital Negative)";
this.rad_dng.UseVisualStyleBackColor = true;
//
// rad_png
//
this.rad_png.AutoSize = true;
this.rad_png.Location = new System.Drawing.Point(6, 111);
this.rad_png.Name = "rad_png";
this.rad_png.Size = new System.Drawing.Size(48, 17);
this.rad_png.TabIndex = 8;
this.rad_png.Text = "PNG";
this.rad_png.UseVisualStyleBackColor = true;
//
// rad_jpeg
//
this.rad_jpeg.AutoSize = true;
this.rad_jpeg.Location = new System.Drawing.Point(6, 88);
this.rad_jpeg.Name = "rad_jpeg";
this.rad_jpeg.Size = new System.Drawing.Size(45, 17);
this.rad_jpeg.TabIndex = 7;
this.rad_jpeg.Text = "JPG";
this.rad_jpeg.UseVisualStyleBackColor = true;
//
// rad_nef
//
this.rad_nef.AutoSize = true;
this.rad_nef.Checked = true;
this.rad_nef.Location = new System.Drawing.Point(6, 19);
this.rad_nef.Name = "rad_nef";
this.rad_nef.Size = new System.Drawing.Size(108, 17);
this.rad_nef.TabIndex = 4;
this.rad_nef.TabStop = true;
this.rad_nef.Text = "NEF (Nikon Raw)";
this.rad_nef.UseVisualStyleBackColor = true;
//
// rad_cr2
//
this.rad_cr2.AutoSize = true;
this.rad_cr2.Location = new System.Drawing.Point(6, 42);
this.rad_cr2.Name = "rad_cr2";
this.rad_cr2.Size = new System.Drawing.Size(111, 17);
this.rad_cr2.TabIndex = 5;
this.rad_cr2.Text = "CR2 (Canon Raw)";
this.rad_cr2.UseVisualStyleBackColor = true;
//
// btn_reload_src // btn_reload_src
// //
this.btn_reload_src.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btn_reload_src.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@ -423,6 +489,13 @@ namespace photo_sorter
this.toolStripSpacer.Size = new System.Drawing.Size(784, 17); this.toolStripSpacer.Size = new System.Drawing.Size(784, 17);
this.toolStripSpacer.Spring = true; this.toolStripSpacer.Spring = true;
// //
// stat_bar_label
//
this.stat_bar_label.Name = "stat_bar_label";
this.stat_bar_label.Size = new System.Drawing.Size(59, 17);
this.stat_bar_label.Text = "Loading...";
this.stat_bar_label.Visible = false;
//
// pbar // pbar
// //
this.pbar.Name = "pbar"; this.pbar.Name = "pbar";
@ -451,79 +524,6 @@ namespace photo_sorter
this.split_container_main.SplitterDistance = 359; this.split_container_main.SplitterDistance = 359;
this.split_container_main.TabIndex = 4; this.split_container_main.TabIndex = 4;
// //
// stat_bar_label
//
this.stat_bar_label.Name = "stat_bar_label";
this.stat_bar_label.Size = new System.Drawing.Size(59, 17);
this.stat_bar_label.Text = "Loading...";
this.stat_bar_label.Visible = false;
//
// gbox_photo_type
//
this.gbox_photo_type.Controls.Add(this.rad_dng);
this.gbox_photo_type.Controls.Add(this.rad_png);
this.gbox_photo_type.Controls.Add(this.rad_jpeg);
this.gbox_photo_type.Controls.Add(this.rad_nef);
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.TabIndex = 6;
this.gbox_photo_type.TabStop = false;
this.gbox_photo_type.Text = "File Type";
//
// rad_nef
//
this.rad_nef.AutoSize = true;
this.rad_nef.Checked = true;
this.rad_nef.Location = new System.Drawing.Point(6, 19);
this.rad_nef.Name = "rad_nef";
this.rad_nef.Size = new System.Drawing.Size(108, 17);
this.rad_nef.TabIndex = 4;
this.rad_nef.TabStop = true;
this.rad_nef.Text = "NEF (Nikon Raw)";
this.rad_nef.UseVisualStyleBackColor = true;
//
// rad_cr2
//
this.rad_cr2.AutoSize = true;
this.rad_cr2.Location = new System.Drawing.Point(6, 42);
this.rad_cr2.Name = "rad_cr2";
this.rad_cr2.Size = new System.Drawing.Size(111, 17);
this.rad_cr2.TabIndex = 5;
this.rad_cr2.Text = "CR2 (Canon Raw)";
this.rad_cr2.UseVisualStyleBackColor = true;
//
// rad_jpeg
//
this.rad_jpeg.AutoSize = true;
this.rad_jpeg.Location = new System.Drawing.Point(6, 88);
this.rad_jpeg.Name = "rad_jpeg";
this.rad_jpeg.Size = new System.Drawing.Size(45, 17);
this.rad_jpeg.TabIndex = 7;
this.rad_jpeg.Text = "JPG";
this.rad_jpeg.UseVisualStyleBackColor = true;
//
// rad_png
//
this.rad_png.AutoSize = true;
this.rad_png.Location = new System.Drawing.Point(6, 111);
this.rad_png.Name = "rad_png";
this.rad_png.Size = new System.Drawing.Size(48, 17);
this.rad_png.TabIndex = 8;
this.rad_png.Text = "PNG";
this.rad_png.UseVisualStyleBackColor = true;
//
// rad_dng
//
this.rad_dng.AutoSize = true;
this.rad_dng.Location = new System.Drawing.Point(6, 65);
this.rad_dng.Name = "rad_dng";
this.rad_dng.Size = new System.Drawing.Size(133, 17);
this.rad_dng.TabIndex = 6;
this.rad_dng.Text = "DNG (Digital Negative)";
this.rad_dng.UseVisualStyleBackColor = true;
//
// form_main // form_main
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -544,6 +544,8 @@ namespace photo_sorter
((System.ComponentModel.ISupportInitialize)(this.img_preview)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.img_preview)).EndInit();
this.gbox_info.ResumeLayout(false); this.gbox_info.ResumeLayout(false);
this.gbox_info.PerformLayout(); this.gbox_info.PerformLayout();
this.gbox_photo_type.ResumeLayout(false);
this.gbox_photo_type.PerformLayout();
this.gbox_copybool.ResumeLayout(false); this.gbox_copybool.ResumeLayout(false);
this.gbox_copybool.PerformLayout(); this.gbox_copybool.PerformLayout();
this.status_bar.ResumeLayout(false); this.status_bar.ResumeLayout(false);
@ -552,8 +554,6 @@ namespace photo_sorter
this.split_container_main.Panel2.ResumeLayout(false); this.split_container_main.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.split_container_main)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.split_container_main)).EndInit();
this.split_container_main.ResumeLayout(false); this.split_container_main.ResumeLayout(false);
this.gbox_photo_type.ResumeLayout(false);
this.gbox_photo_type.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();

@ -115,7 +115,8 @@ namespace photo_sorter
else else
{ {
pbar.Value = 6; pbar.Value = 6;
pbar.Value -= 1; pbar.Value -= 1; // This 'hack' forces an instant progress bar update
stat_bar_label.Text = "Getting file info...";
stat_bar_label.Visible = true; stat_bar_label.Visible = true;
if (global.filecount <= 1) if (global.filecount <= 1)
{ {
@ -139,6 +140,8 @@ namespace photo_sorter
} }
*/ */
pbar.Value += 5; pbar.Value += 5;
stat_bar_label.Text = "Allocating memory...";
status_bar.Refresh();
Image img; Image img;
using (MemoryStream img_stream = new MemoryStream()) using (MemoryStream img_stream = new MemoryStream())
{ {
@ -147,6 +150,8 @@ namespace photo_sorter
img_preview.Visible = false; img_preview.Visible = false;
gbox_preview.Enabled = false; gbox_preview.Enabled = false;
pbar.Value += 10; pbar.Value += 10;
stat_bar_label.Text = "Analyzing image...";
status_bar.Refresh();
// Convert RAW file to JPEG in memory // Convert RAW file to JPEG in memory
using (var raw_img = new MagickImage(fname)) using (var raw_img = new MagickImage(fname))
{ {
@ -157,6 +162,8 @@ namespace photo_sorter
img_stream.Position = 0; img_stream.Position = 0;
raw_img.Write(img_stream, ImageMagick.MagickFormat.Jpeg); raw_img.Write(img_stream, ImageMagick.MagickFormat.Jpeg);
pbar.Value += 15; pbar.Value += 15;
stat_bar_label.Text = "Creating bitmap...";
status_bar.Refresh();
} }
} }
@ -171,6 +178,7 @@ namespace photo_sorter
} }
img_preview.Image = img; img_preview.Image = img;
stat_bar_label.Text = "Done!";
img_preview.Visible = true; img_preview.Visible = true;
gbox_preview.Enabled = true; gbox_preview.Enabled = true;
stat_bar_label.Visible = false; stat_bar_label.Visible = false;

File diff suppressed because it is too large Load Diff

@ -1,15 +1,16 @@
using System.Reflection; using System.Resources;
using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("photo_sorter")] [assembly: AssemblyTitle("Photo Sorter")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("Skyfall Tech")]
[assembly: AssemblyProduct("photo_sorter")] [assembly: AssemblyProduct("Photo Sorter")]
[assembly: AssemblyCopyright("Copyright © 2022")] [assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -32,5 +33,6 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: NeutralResourcesLanguage("en")]

@ -26,7 +26,7 @@
<UpdateRequired>false</UpdateRequired> <UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions> <MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> <ApplicationVersion>1.0.1.0</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
@ -42,7 +42,7 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@ -53,6 +53,25 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>skyfall_logo_roulette_white001.ico</ApplicationIcon> <ApplicationIcon>skyfall_logo_roulette_white001.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Magick.NET-Q16-AnyCPU, Version=12.2.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL"> <Reference Include="Magick.NET-Q16-AnyCPU, Version=12.2.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>packages\Magick.NET-Q16-AnyCPU.12.2.1\lib\netstandard20\Magick.NET-Q16-AnyCPU.dll</HintPath> <HintPath>packages\Magick.NET-Q16-AnyCPU.12.2.1\lib\netstandard20\Magick.NET-Q16-AnyCPU.dll</HintPath>

@ -8,13 +8,19 @@ EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Debug|Any CPU.ActiveCfg = Release|Any CPU {68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Debug|Any CPU.Build.0 = Release|Any CPU {68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Debug|Any CPU.Build.0 = Release|Any CPU
{68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Debug|x64.ActiveCfg = Debug|x64
{68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Debug|x64.Build.0 = Debug|x64
{68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Release|Any CPU.ActiveCfg = Release|Any CPU {68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Release|Any CPU.Build.0 = Release|Any CPU {68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Release|Any CPU.Build.0 = Release|Any CPU
{68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Release|x64.ActiveCfg = Release|x64
{68A4768D-35D5-4F22-98C8-0B7CD754E0CE}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

Loading…
Cancel
Save