new gui features

This commit is contained in:
Manuel Kamper 2019-07-29 17:32:26 +02:00
parent c3735583a2
commit b8b1794c17
6 changed files with 52 additions and 5 deletions

View File

@ -64,6 +64,9 @@
<setting name="zoom" serializeAs="String">
<value>0</value>
</setting>
<setting name="showInfo" serializeAs="String">
<value>True</value>
</setting>
</Mk0.Software.ImageSorter.Properties.Settings>
</userSettings>
</configuration>

View File

@ -502,7 +502,7 @@
this.MinimumSize = new System.Drawing.Size(983, 605);
this.Name = "Main";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Image Sorter v1.33 | © 2015-2019 by manuelkamper.com";
this.Text = "Image Sorter v1.34 | © 2015-2019 by manuelkamper.com";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Main_FormClosing);
this.Load += new System.EventHandler(this.Main_Load);
this.Shown += new System.EventHandler(this.Main_Shown);

View File

@ -42,6 +42,7 @@ namespace Mk0.Software.ImageSorter
private string startuppath;
private string startupimage;
public string[] Args;
private System.Timers.Timer t = new System.Timers.Timer(700);
public Main()
{
@ -121,11 +122,11 @@ namespace Mk0.Software.ImageSorter
/// <param name="e"></param>
private void Main_Shown(object sender, EventArgs e)
{
if (Properties.Settings.Default.lastHeight >= this.MinimumSize.Height)
if (Properties.Settings.Default.lastHeight >= MinimumSize.Height)
{
Height = Properties.Settings.Default.lastHeight;
}
if (Properties.Settings.Default.lastWidth >= this.MinimumSize.Width)
if (Properties.Settings.Default.lastWidth >= MinimumSize.Width)
{
Width = Properties.Settings.Default.lastWidth;
}
@ -137,6 +138,12 @@ namespace Mk0.Software.ImageSorter
{
Left = Properties.Settings.Default.lastLeft;
}
groupBox1.Visible = Properties.Settings.Default.showInfo;
if (!groupBox1.Visible)
{
groupBox2.Location = new Point(groupBox2.Location.X, 12);
groupBox2.Height = groupBox2.Height + 87;
}
CheckSubfolders();
SearchImages();
CountPicsInPath();
@ -632,6 +639,27 @@ namespace Mk0.Software.ImageSorter
CountPicsInPath();
LoadPicture(imageIndex);
CheckUndo();
btn.ForeColor = Color.MediumSeaGreen;
btn.Font = new Font(btn.Font, FontStyle.Bold);
t.Elapsed += new System.Timers.ElapsedEventHandler((sender1, e1) => ButtonBlink(sender, e, btn));
t.Enabled = true;
}
/// <summary>
/// Blinkender Button nach erfolgreichem Verschieben
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <param name="btn"></param>
private void ButtonBlink(object sender, EventArgs e, Button btn)
{
btn.BeginInvoke(new MethodInvoker(() =>
{
btn.ForeColor = SystemColors.ControlText;
btn.Font = new Font(btn.Font, FontStyle.Regular);
}));
t.Stop();
}
/// <summary>
@ -1075,6 +1103,7 @@ namespace Mk0.Software.ImageSorter
Properties.Settings.Default.lastHeight = Height;
Properties.Settings.Default.lastTop = Top;
Properties.Settings.Default.lastLeft = Left;
Properties.Settings.Default.showInfo = groupBox1.Visible;
Properties.Settings.Default.Save();
}

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.33.*")]
[assembly: AssemblyVersion("1.34.*")]
//[assembly: AssemblyFileVersion("1.6.0.0")]

View File

@ -12,7 +12,7 @@ namespace Mk0.Software.ImageSorter.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -130,5 +130,17 @@ namespace Mk0.Software.ImageSorter.Properties {
this["zoom"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool showInfo {
get {
return ((bool)(this["showInfo"]));
}
set {
this["showInfo"] = value;
}
}
}
}

View File

@ -29,5 +29,8 @@
<Setting Name="zoom" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="showInfo" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>