From c7e502d6580bf79b827ed9fe756c5f7f99b16745 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Tue, 26 Mar 2024 12:04:29 +0100 Subject: [PATCH] =?UTF-8?q?Bugfix=20f=C3=BCr=20gleichzeitiges=20Schlie?= =?UTF-8?q?=C3=9Fen=20/=20=C3=84ndern=20von=20Dialogen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ..führt offenbar zu Placement Problemen (Timing). Für Error/Validation habe ich daher unterschiedliche Position genommen. Im Grunde ist das aber immer noch ein gräßlicher Häck der von der Tatsache ablenkt, dass jedes Fenster seinen Position separat gespeichert haben sollte. --- ENI2/App.config | 8 +++++++- ENI2/Controls/StatusWindowBase.cs | 21 +++++++++++++++------ ENI2/ENI2.csproj | 4 ++-- ENI2/Properties/Settings.Designer.cs | 26 +++++++++++++++++++++++++- ENI2/Properties/Settings.settings | 6 ++++++ bsmd.database/bsmd.database.csproj | 4 ++-- bsmd.database/packages.config | 2 +- 7 files changed, 58 insertions(+), 13 deletions(-) diff --git a/ENI2/App.config b/ENI2/App.config index 74c08f09..e2844eac 100644 --- a/ENI2/App.config +++ b/ENI2/App.config @@ -11,7 +11,7 @@
- + @@ -59,6 +59,12 @@ 0 + + 0 + + + 0 + diff --git a/ENI2/Controls/StatusWindowBase.cs b/ENI2/Controls/StatusWindowBase.cs index e461435a..dc7f5358 100644 --- a/ENI2/Controls/StatusWindowBase.cs +++ b/ENI2/Controls/StatusWindowBase.cs @@ -14,7 +14,7 @@ namespace ENI2.Controls { [TemplatePart(Name = "buttonRefresh", Type = typeof(Button))] - [TemplatePart(Name = "buttonClose", Type = typeof(Button))] + [TemplatePart(Name = "buttonClose", Type = typeof(Button))] public class StatusWindowBase : Window { @@ -36,13 +36,22 @@ namespace ENI2.Controls closeButton.Click += (s, e) => { if (this.IsModal()) DialogResult = true; CloseClicked?.Invoke(); this.Close(); }; refreshButton.Click += (s, e) => { RefreshClicked?.Invoke(); }; - SettingBindingExtension stBinding = new SettingBindingExtension("W2Top"); + string topProperty = "W2Top"; + string leftProperty = "W2Left"; + if(this.GetType().Name == "ViolationListDialog") + { + topProperty = "W3Top"; + leftProperty = "W3Left"; + } + + + SettingBindingExtension stBinding = new SettingBindingExtension(topProperty); this.SetBinding(Window.TopProperty, stBinding); - SettingBindingExtension slBinding = new SettingBindingExtension("W2Left"); - this.SetBinding (Window.LeftProperty, slBinding); - }; - } + SettingBindingExtension slBinding = new SettingBindingExtension(leftProperty); + this.SetBinding (Window.LeftProperty, slBinding); + }; + } public bool RefreshVisible { diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index 297743b8..4d156b13 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -36,8 +36,8 @@ 5.4.0.0 true publish.html - 8 - 7.2.2.8 + 9 + 7.2.2.9 false true true diff --git a/ENI2/Properties/Settings.Designer.cs b/ENI2/Properties/Settings.Designer.cs index af2170c4..1767a0a9 100644 --- a/ENI2/Properties/Settings.Designer.cs +++ b/ENI2/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace ENI2.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -161,5 +161,29 @@ namespace ENI2.Properties { this["W2Top"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("0")] + public string W3Left { + get { + return ((string)(this["W3Left"])); + } + set { + this["W3Left"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("0")] + public string W3Top { + get { + return ((string)(this["W3Top"])); + } + set { + this["W3Top"] = value; + } + } } } diff --git a/ENI2/Properties/Settings.settings b/ENI2/Properties/Settings.settings index b0a6c47a..b0c246d1 100644 --- a/ENI2/Properties/Settings.settings +++ b/ENI2/Properties/Settings.settings @@ -41,5 +41,11 @@ 0 + + 0 + + + 0 + \ No newline at end of file diff --git a/bsmd.database/bsmd.database.csproj b/bsmd.database/bsmd.database.csproj index 887e6b1c..67be48e7 100644 --- a/bsmd.database/bsmd.database.csproj +++ b/bsmd.database/bsmd.database.csproj @@ -83,8 +83,8 @@ ..\code.ruleset - - ..\packages\log4net.2.0.16\lib\net45\log4net.dll + + ..\ENI2\packages\log4net.2.0.15\lib\net45\log4net.dll ..\ENI2\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll diff --git a/bsmd.database/packages.config b/bsmd.database/packages.config index 0cdd327e..5360e337 100644 --- a/bsmd.database/packages.config +++ b/bsmd.database/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file