Save all window positions
This commit is contained in:
78
Properties/Settings.Designer.cs
generated
78
Properties/Settings.Designer.cs
generated
@ -12,7 +12,7 @@ namespace unison.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.13.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@ -289,7 +289,7 @@ namespace unison.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("100")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||
public double MainWindowTop {
|
||||
get {
|
||||
return ((double)(this["MainWindowTop"]));
|
||||
@ -301,7 +301,7 @@ namespace unison.Properties {
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("100")]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||
public double MainWindowLeft {
|
||||
get {
|
||||
return ((double)(this["MainWindowLeft"]));
|
||||
@ -310,5 +310,77 @@ namespace unison.Properties {
|
||||
this["MainWindowLeft"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||
public double RadiosWindowTop {
|
||||
get {
|
||||
return ((double)(this["RadiosWindowTop"]));
|
||||
}
|
||||
set {
|
||||
this["RadiosWindowTop"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1000")]
|
||||
public double RadiosWindowLeft {
|
||||
get {
|
||||
return ((double)(this["RadiosWindowLeft"]));
|
||||
}
|
||||
set {
|
||||
this["RadiosWindowLeft"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("10")]
|
||||
public double ShuffleWindowTop {
|
||||
get {
|
||||
return ((double)(this["ShuffleWindowTop"]));
|
||||
}
|
||||
set {
|
||||
this["ShuffleWindowTop"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("330")]
|
||||
public double ShuffleWindowLeft {
|
||||
get {
|
||||
return ((double)(this["ShuffleWindowLeft"]));
|
||||
}
|
||||
set {
|
||||
this["ShuffleWindowLeft"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("330")]
|
||||
public double SettingsWindowTop {
|
||||
get {
|
||||
return ((double)(this["SettingsWindowTop"]));
|
||||
}
|
||||
set {
|
||||
this["SettingsWindowTop"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("600")]
|
||||
public double SettingsWindowLeft {
|
||||
get {
|
||||
return ((double)(this["SettingsWindowLeft"]));
|
||||
}
|
||||
set {
|
||||
this["SettingsWindowLeft"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,10 +69,28 @@
|
||||
<Value Profile="(Default)">13</Value>
|
||||
</Setting>
|
||||
<Setting Name="MainWindowTop" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">100</Value>
|
||||
<Value Profile="(Default)">10</Value>
|
||||
</Setting>
|
||||
<Setting Name="MainWindowLeft" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">100</Value>
|
||||
<Value Profile="(Default)">10</Value>
|
||||
</Setting>
|
||||
<Setting Name="RadiosWindowTop" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">10</Value>
|
||||
</Setting>
|
||||
<Setting Name="RadiosWindowLeft" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">1000</Value>
|
||||
</Setting>
|
||||
<Setting Name="ShuffleWindowTop" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">10</Value>
|
||||
</Setting>
|
||||
<Setting Name="ShuffleWindowLeft" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">330</Value>
|
||||
</Setting>
|
||||
<Setting Name="SettingsWindowTop" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">330</Value>
|
||||
</Setting>
|
||||
<Setting Name="SettingsWindowLeft" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">600</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
@ -30,7 +30,9 @@ namespace unison
|
||||
InitHwnd();
|
||||
InitializeComponent();
|
||||
DefaultState(true);
|
||||
|
||||
WindowState = WindowState.Minimized;
|
||||
|
||||
Top = Properties.Settings.Default.MainWindowTop;
|
||||
Left = Properties.Settings.Default.MainWindowLeft;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
||||
xmlns:properties="clr-namespace:unison.Resources"
|
||||
mc:Ignorable="d"
|
||||
Title="Radios" Closing="Window_Closing" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
|
||||
Title="Radios" Closing="Window_Closing" LocationChanged="Window_LocationChanged" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
|
||||
|
||||
<Grid Margin="0,5,0,0">
|
||||
<StackPanel>
|
||||
|
@ -26,6 +26,9 @@ namespace unison
|
||||
InitHwnd();
|
||||
|
||||
WindowState = WindowState.Minimized;
|
||||
|
||||
Top = Properties.Settings.Default.RadiosWindowTop;
|
||||
Left = Properties.Settings.Default.RadiosWindowLeft;
|
||||
}
|
||||
|
||||
public async void Initialize()
|
||||
|
@ -6,7 +6,7 @@
|
||||
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
||||
xmlns:properties="clr-namespace:unison.Resources" xmlns:sys="clr-namespace:System;assembly=System.Runtime"
|
||||
mc:Ignorable="d"
|
||||
Closing="Window_Closing" Title="{x:Static properties:Resources.Settings}" ResizeMode="CanMinimize" Icon="/Resources/icon-full.ico" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight">
|
||||
Title="{x:Static properties:Resources.Settings}" Closing="Window_Closing" LocationChanged="Window_LocationChanged" ResizeMode="CanMinimize" Icon="/Resources/icon-full.ico" WindowStyle="ToolWindow" SizeToContent="WidthAndHeight">
|
||||
|
||||
<Window.Resources>
|
||||
<x:Array x:Key="ShortcutItems" Type="sys:String">
|
||||
|
@ -45,11 +45,13 @@ namespace unison
|
||||
{
|
||||
InitHwnd();
|
||||
InitializeComponent();
|
||||
Initialize();
|
||||
DataContext = this;
|
||||
|
||||
WindowState = WindowState.Minimized;
|
||||
|
||||
Initialize();
|
||||
Top = Properties.Settings.Default.SettingsWindowTop;
|
||||
Left = Properties.Settings.Default.SettingsWindowLeft;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
|
@ -6,7 +6,7 @@
|
||||
xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
|
||||
xmlns:properties="clr-namespace:unison.Resources" xmlns:sys="clr-namespace:System;assembly=System.Runtime"
|
||||
mc:Ignorable="d"
|
||||
Title="Shuffle" Closing="Window_Closing" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
|
||||
Title="Shuffle" Closing="Window_Closing" LocationChanged="Window_LocationChanged" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
|
||||
|
||||
<Window.Resources>
|
||||
<x:Array x:Key="FilterType" Type="sys:String">
|
||||
|
@ -41,6 +41,9 @@ namespace unison
|
||||
|
||||
WindowState = WindowState.Minimized;
|
||||
|
||||
Top = Properties.Settings.Default.ShuffleWindowTop;
|
||||
Left = Properties.Settings.Default.ShuffleWindowLeft;
|
||||
|
||||
_mpd = (MPDHandler)Application.Current.Properties["mpd"];
|
||||
_shuffle = (ShuffleHandler)Application.Current.Properties["shuffle"];
|
||||
}
|
||||
|
Reference in New Issue
Block a user