Bugfix für gleichzeitiges Schließen / Ändern von Dialogen
..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.
This commit is contained in:
parent
bbecdcaffa
commit
4bc142ffc6
@ -11,7 +11,7 @@
|
|||||||
<section name="ENI2.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
<section name="ENI2.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
</configSections>
|
</configSections>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
|
||||||
</startup>
|
</startup>
|
||||||
<applicationSettings>
|
<applicationSettings>
|
||||||
@ -38,6 +38,12 @@
|
|||||||
<setting name="MainWindowPlacement" serializeAs="String">
|
<setting name="MainWindowPlacement" serializeAs="String">
|
||||||
<value/>
|
<value/>
|
||||||
</setting>
|
</setting>
|
||||||
|
<setting name="W3Left" serializeAs="String">
|
||||||
|
<value>0</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="W3Top" serializeAs="String">
|
||||||
|
<value>0</value>
|
||||||
|
</setting>
|
||||||
</ENI2.Properties.Settings>
|
</ENI2.Properties.Settings>
|
||||||
</userSettings>
|
</userSettings>
|
||||||
<system.serviceModel>
|
<system.serviceModel>
|
||||||
|
|||||||
@ -14,7 +14,7 @@ namespace ENI2.Controls
|
|||||||
{
|
{
|
||||||
|
|
||||||
[TemplatePart(Name = "buttonRefresh", Type = typeof(Button))]
|
[TemplatePart(Name = "buttonRefresh", Type = typeof(Button))]
|
||||||
[TemplatePart(Name = "buttonClose", Type = typeof(Button))]
|
[TemplatePart(Name = "buttonClose", Type = typeof(Button))]
|
||||||
public class StatusWindowBase : Window
|
public class StatusWindowBase : Window
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -36,13 +36,22 @@ namespace ENI2.Controls
|
|||||||
closeButton.Click += (s, e) => { if (this.IsModal()) DialogResult = true; CloseClicked?.Invoke(); this.Close(); };
|
closeButton.Click += (s, e) => { if (this.IsModal()) DialogResult = true; CloseClicked?.Invoke(); this.Close(); };
|
||||||
refreshButton.Click += (s, e) => { RefreshClicked?.Invoke(); };
|
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);
|
this.SetBinding(Window.TopProperty, stBinding);
|
||||||
|
|
||||||
SettingBindingExtension slBinding = new SettingBindingExtension("W2Left");
|
SettingBindingExtension slBinding = new SettingBindingExtension(leftProperty);
|
||||||
this.SetBinding (Window.LeftProperty, slBinding);
|
this.SetBinding (Window.LeftProperty, slBinding);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RefreshVisible
|
public bool RefreshVisible
|
||||||
{
|
{
|
||||||
|
|||||||
@ -36,8 +36,8 @@
|
|||||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||||
<WebPage>publish.html</WebPage>
|
<WebPage>publish.html</WebPage>
|
||||||
<ApplicationRevision>8</ApplicationRevision>
|
<ApplicationRevision>9</ApplicationRevision>
|
||||||
<ApplicationVersion>7.2.2.8</ApplicationVersion>
|
<ApplicationVersion>7.2.2.9</ApplicationVersion>
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||||
|
|||||||
26
ENI2/Properties/Settings.Designer.cs
generated
26
ENI2/Properties/Settings.Designer.cs
generated
@ -12,7 +12,7 @@ namespace ENI2.Properties {
|
|||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[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 {
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
@ -161,5 +161,29 @@ namespace ENI2.Properties {
|
|||||||
this["W2Top"] = value;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,5 +41,11 @@
|
|||||||
<Setting Name="W2Top" Type="System.String" Scope="User">
|
<Setting Name="W2Top" Type="System.String" Scope="User">
|
||||||
<Value Profile="(Default)">0</Value>
|
<Value Profile="(Default)">0</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="W3Left" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)">0</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="W3Top" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)">0</Value>
|
||||||
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
Loading…
Reference in New Issue
Block a user