resolve fullscreen bug #1

This commit is contained in:
Manuel Kamper 2020-01-10 21:27:04 +01:00
parent 5baddd5a84
commit 7c7ca3e8f1
7 changed files with 47 additions and 22 deletions

View File

@ -38,10 +38,10 @@
</Image_Sorter.Properties.Settings>
<Mk0.Software.ImageSorter.Properties.Settings>
<setting name="targetPath" serializeAs="String">
<value/>
<value />
</setting>
<setting name="lastPath" serializeAs="String">
<value/>
<value />
</setting>
<setting name="singleInstance" serializeAs="String">
<value>True</value>
@ -73,6 +73,9 @@
<setting name="fadingSpeed" serializeAs="String">
<value>3</value>
</setting>
<setting name="fullScreen" serializeAs="String">
<value>False</value>
</setting>
</Mk0.Software.ImageSorter.Properties.Settings>
</userSettings>
</configuration>

View File

@ -693,7 +693,7 @@
this.MinimumSize = new System.Drawing.Size(983, 605);
this.Name = "Main";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Image Sorter v1.48 | © 2015-2020 by mk0.at";
this.Text = "Image Sorter v1.49 | © 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);

View File

@ -146,21 +146,28 @@ namespace Mk0.Software.ImageSorter
/// <param name="e"></param>
private void Main_Shown(object sender, EventArgs e)
{
if (Properties.Settings.Default.lastHeight >= MinimumSize.Height)
if (Properties.Settings.Default.fullScreen)
{
Height = Properties.Settings.Default.lastHeight;
WindowState = FormWindowState.Maximized;
}
if (Properties.Settings.Default.lastWidth >= MinimumSize.Width)
else
{
Width = Properties.Settings.Default.lastWidth;
}
if (Properties.Settings.Default.lastTop <= Screen.PrimaryScreen.Bounds.Height && Properties.Settings.Default.lastTop >= 0)
{
Top = Properties.Settings.Default.lastTop;
}
if (Properties.Settings.Default.lastLeft <= Screen.PrimaryScreen.Bounds.Width && Properties.Settings.Default.lastLeft >= 0)
{
Left = Properties.Settings.Default.lastLeft;
if (Properties.Settings.Default.lastHeight >= MinimumSize.Height)
{
Height = Properties.Settings.Default.lastHeight;
}
if (Properties.Settings.Default.lastWidth >= MinimumSize.Width)
{
Width = Properties.Settings.Default.lastWidth;
}
if (Properties.Settings.Default.lastTop <= Screen.PrimaryScreen.Bounds.Height && Properties.Settings.Default.lastTop >= 0)
{
Top = Properties.Settings.Default.lastTop;
}
if (Properties.Settings.Default.lastLeft <= Screen.PrimaryScreen.Bounds.Width && Properties.Settings.Default.lastLeft >= 0)
{
Left = Properties.Settings.Default.lastLeft;
}
}
groupBoxInformationen.Visible = Properties.Settings.Default.showInfo;
if (!groupBoxInformationen.Visible)
@ -1189,6 +1196,7 @@ namespace Mk0.Software.ImageSorter
Properties.Settings.Default.lastTop = Top;
Properties.Settings.Default.lastLeft = Left;
Properties.Settings.Default.showInfo = groupBoxInformationen.Visible;
Properties.Settings.Default.fullScreen = (WindowState == FormWindowState.Maximized ? true : false);
Properties.Settings.Default.Save();
}

View File

@ -33,7 +33,7 @@
<PublisherName>manuelkamper.com</PublisherName>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.48.0.0</ApplicationVersion>
<ApplicationVersion>1.49.0.0</ApplicationVersion>
<UseApplicationTrust>true</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<ExcludeDeploymentUrl>true</ExcludeDeploymentUrl>
@ -79,6 +79,9 @@
<Reference Include="Mk0.GUI.Banner, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\mk0.gui.banner.1.0.0\lib\net461\Mk0.GUI.Banner.dll</HintPath>
</Reference>
<Reference Include="Mk0.Software.OnlineUpdater">
<HintPath>..\..\manuelkamp\Mk0.Software.OnlineUpdater\Mk0.Software.OnlineUpdater\bin\Debug\Mk0.Software.OnlineUpdater.dll</HintPath>
</Reference>
<Reference Include="Mk0.Tools.Calculation, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\mk0.tools.calculation.1.0.0\lib\net461\Mk0.Tools.Calculation.dll</HintPath>
</Reference>
@ -91,10 +94,6 @@
<Reference Include="Mk0.Tools.Randomization, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\mk0.tools.randomization.1.0.0\lib\net461\Mk0.Tools.Randomization.dll</HintPath>
</Reference>
<Reference Include="OnlineUpdater, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\Mk0.Software.OnlineUpdater\Mk0.Software.OnlineUpdater\bin\Debug\OnlineUpdater.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />

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.48.*")]
[assembly: AssemblyVersion("1.49.*")]
//[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", "16.4.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())));
@ -166,5 +166,17 @@ namespace Mk0.Software.ImageSorter.Properties {
this["fadingSpeed"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool fullScreen {
get {
return ((bool)(this["fullScreen"]));
}
set {
this["fullScreen"] = value;
}
}
}
}

View File

@ -38,5 +38,8 @@
<Setting Name="fadingSpeed" Type="System.Int32" Scope="User">
<Value Profile="(Default)">3</Value>
</Setting>
<Setting Name="fullScreen" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>