/// <summary> /// Handles the ProcessExit event of the CurrentDomain control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> private void CurrentDomain_ProcessExit(object sender, EventArgs e) { var arg = new aceEventGeneralArgs(); callEventApplicationClosing(arg); settings.Save(); aceLog.saveAllLogs(true); }
/// <summary> The event Closing at Application caster, with optional pre-created arguments. </summary> /// <param name="e">Optional, prefabricated arguments - to provide specific information to particular cause of the event.</param> /// <remarks> /// <para>Invokes <see cref="onEventApplicationClosing"/>, with <see cref="aceEventType.Closing"/> and <see cref="aceEventOrigin.Application"/></para> /// </remarks> protected virtual void callEventApplicationClosing(aceEventGeneralArgs e = null) { if (e == null) { e = new aceEventGeneralArgs(); } if (e.type == aceEventType.unknown) { e.type = aceEventType.Closing; } if (e.Origin == aceEventOrigin.unknown) { e.Origin = aceEventOrigin.Application; } if (e.RelatedObject == null) { e.RelatedObject = null; } e.Message = ""; if (onEventApplicationClosing != null) { onEventApplicationClosing(this, e); } }