mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-18 03:12:18 +12:00
Merge pull request #178 from megalon/fix/not-closing
Force shutdown app when main window closed
This commit is contained in:
commit
6495cab513
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue