resolve screen position bug #1

This commit is contained in:
Manuel Kamper 2020-01-12 09:37:11 +01:00
parent 7c7ca3e8f1
commit f99d31c72d
4 changed files with 14 additions and 6 deletions

View File

@ -693,12 +693,12 @@
this.MinimumSize = new System.Drawing.Size(983, 605);
this.Name = "Main";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Image Sorter v1.49 | © 2015-2020 by mk0.at";
this.Text = "Image Sorter v1.50 | © 2015-2020 by mk0.at";
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);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Main_KeyDown);
this.Resize += new System.EventHandler(this.Main_ResizeEnd);
this.Resize += new System.EventHandler(this.Main_Resize);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxImage)).EndInit();
this.contextMenuStrip.ResumeLayout(false);
this.groupBoxInformationen.ResumeLayout(false);

View File

@ -44,6 +44,7 @@ namespace Mk0.Software.ImageSorter
private string startupimage;
public string[] Args;
private System.Timers.Timer t1 = new System.Timers.Timer(1200);
private FormWindowState lastState = FormWindowState.Minimized;
public Main()
{
@ -104,9 +105,12 @@ namespace Mk0.Software.ImageSorter
LoadPicture(GetImageIndex(Path.Combine(startuppath, startupimage)));
if (WindowState != FormWindowState.Normal || WindowState != FormWindowState.Maximized)
{
WindowState = FormWindowState.Normal;
if (lastState != FormWindowState.Minimized) { WindowState = lastState; } else { WindowState = FormWindowState.Normal; }
}
Activate();
BringToFront();
TopMost = true;
TopMost = false;
}
}
}
@ -1258,8 +1262,12 @@ namespace Mk0.Software.ImageSorter
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Main_ResizeEnd(object sender, EventArgs e)
private void Main_Resize(object sender, EventArgs e)
{
if (WindowState != FormWindowState.Minimized)
{
lastState = WindowState;
}
try
{
Zoom();

View File

@ -33,7 +33,7 @@
<PublisherName>manuelkamper.com</PublisherName>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.49.0.0</ApplicationVersion>
<ApplicationVersion>1.50.0.0</ApplicationVersion>
<UseApplicationTrust>true</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<ExcludeDeploymentUrl>true</ExcludeDeploymentUrl>

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.49.*")]
[assembly: AssemblyVersion("1.50.*")]
//[assembly: AssemblyFileVersion("1.6.0.0")]