Save window location when relaunching

This commit is contained in:
2022-11-18 00:25:18 +01:00
parent a3e09c2407
commit 5a8a5baa33
5 changed files with 125 additions and 2 deletions

View File

@ -27,6 +27,8 @@ namespace unison
InitializeComponent();
DefaultState(true);
WindowState = WindowState.Minimized;
Top = Properties.Settings.Default.MainWindowTop;
Left = Properties.Settings.Default.MainWindowLeft;
_settingsWin = new Settings();
_radiosWin = new Radios();
@ -336,5 +338,12 @@ namespace unison
WindowState = WindowState.Minimized;
Hide();
}
private void Window_LocationChanged(object sender, EventArgs e)
{
Properties.Settings.Default.MainWindowTop = Top;
Properties.Settings.Default.MainWindowLeft = Left;
Properties.Settings.Default.Save();
}
}
}