Merge pull request #178 from megalon/fix/not-closing

Force shutdown app when main window closed
This commit is contained in:
megalon 2020-06-01 19:28:29 -07:00 committed by GitHub
commit 6495cab513
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,6 +95,21 @@ namespace ModAssistant
}
}
/* Force the app to shutdown when The main window is closed.
*
* Explaination:
* OneClickStatus is initialized as a static object,
* so the window will exist, even if it is unused.
* This would cause Mod Assistant to not shutdown,
* because technically a window was still open.
*/
protected override void OnClosed(EventArgs e)
{
base.OnClosed(e);
Application.Current.Shutdown();
}
private async void LoadVersionsAsync()
{
try