diff --git a/UI_Engine/Compute/LogUsage.cs b/UI_Engine/Compute/LogUsage.cs index 64862d1..5b6d60b 100644 --- a/UI_Engine/Compute/LogUsage.cs +++ b/UI_Engine/Compute/LogUsage.cs @@ -151,6 +151,8 @@ private static void OnProcessExit(object sender, EventArgs e) // The file seems to be writable after the UI closed even without this but better safe than sorry. if (m_UsageLog != null) m_UsageLog.Close(); + + TriggerUIClose(); } /*************************************/ @@ -171,6 +173,14 @@ private static void TriggerUsageLog(TriggerLogUsageArgs e) m_UsageLogTriggered.Invoke(null, e); } + /*************************************/ + + private static void TriggerUIClose() + { + if (m_UIClosed != null) + m_UIClosed.Invoke(null, null); + } + /*************************************/ /**** Static Fields ****/ /*************************************/ @@ -184,6 +194,7 @@ private static void TriggerUsageLog(TriggerLogUsageArgs e) private static Dictionary m_ProjectIDPerFile = new Dictionary(); public static event EventHandler m_UsageLogTriggered; + public static event EventHandler m_UIClosed; /*************************************/ }