mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
optimized form closing event
This commit is contained in:
@@ -407,6 +407,18 @@ namespace mRemoteNG.UI.Forms
|
||||
|
||||
private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (Runtime.WindowList != null)
|
||||
{
|
||||
foreach (BaseWindow window in Runtime.WindowList)
|
||||
{
|
||||
window.Close();
|
||||
}
|
||||
}
|
||||
|
||||
Hide();
|
||||
|
||||
IsClosing = true;
|
||||
|
||||
if (Settings.Default.CloseToTray)
|
||||
{
|
||||
if (Runtime.NotificationAreaIcon == null)
|
||||
@@ -461,18 +473,8 @@ namespace mRemoteNG.UI.Forms
|
||||
|
||||
Shutdown.Cleanup(_quickConnectToolStrip, _externalToolsToolStrip, _multiSshToolStrip, this);
|
||||
|
||||
IsClosing = true;
|
||||
|
||||
Cef.Shutdown();
|
||||
|
||||
if (Runtime.WindowList != null)
|
||||
{
|
||||
foreach (BaseWindow window in Runtime.WindowList)
|
||||
{
|
||||
window.Close();
|
||||
}
|
||||
}
|
||||
|
||||
Shutdown.StartUpdate();
|
||||
|
||||
Debug.Print("[END] - " + Convert.ToString(DateTime.Now, CultureInfo.InvariantCulture));
|
||||
|
||||
Reference in New Issue
Block a user