private void _taskTrayMenu_OnObserveStateChanged(object sender, TaskTrayMenu.ObserveStateChangedEventArgs e) { AppSettingData.GetInstance().Observered = e.Observerd; AppSettingData.GetInstance().Save(); if (e.Observerd) { KeymappingHandler.Start(); } else { KeymappingHandler.Stop(); } }
private void _taskTrayMenu_OnExitClicked(object sender, EventArgs e) { KeymappingHandler.Stop(); base.Shutdown(); }
/// <summary> /// application exit event /// </summary> /// <param name="e"></param> protected override void OnExit(ExitEventArgs e) { base.OnExit(e); _taskTrayMenu.Dispose(); KeymappingHandler.Stop(); }