mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
1. Main window now stored the Left and Top positions.
2. Added global setting to set the start mode of the Main Window.
This commit is contained in:
parent
229ee09049
commit
34582ca91b
20 changed files with 286 additions and 58 deletions
|
|
@ -152,8 +152,11 @@ namespace ServerManagerTool
|
|||
}
|
||||
}
|
||||
|
||||
this.Left = Config.Default.MainWindow_Left;
|
||||
this.Top = Config.Default.MainWindow_Top;
|
||||
this.Height = Config.Default.MainWindow_Height;
|
||||
this.Width = Config.Default.MainWindow_Width;
|
||||
this.WindowState = Config.Default.MainWindow_WindowState;
|
||||
|
||||
// hook into the language change event
|
||||
GlobalizedApplication.Instance.GlobalizationManager.ResourceDictionaryChangedEvent += ResourceDictionaryChangedEvent;
|
||||
|
|
@ -197,6 +200,15 @@ namespace ServerManagerTool
|
|||
this.Activate();
|
||||
}
|
||||
|
||||
private void Window_LocationChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.WindowState == WindowState.Normal)
|
||||
{
|
||||
Config.Default.MainWindow_Left = Math.Max(0D, this.Left);
|
||||
Config.Default.MainWindow_Top = Math.Max(0D, this.Top);
|
||||
}
|
||||
}
|
||||
|
||||
private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
|
||||
{
|
||||
if (this.WindowState != WindowState.Minimized)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue