private static void Form_FormClosed(object sender, FormClosedEventArgs e) { try { MainAppUtils.DestroyApp(); } catch (Exception ex) { Log.ShowError(ex); } }
private static void ApplicationContext_ThreadExit(object sender, EventArgs e) { try { JobManager.Instance.AbortAllJobsAndJobBatches(); } catch (Exception ex) { Log.ShowError(ex); } MainAppUtils.DestroyApp(); }