private void OnApplicationExit(object sender, EventArgs e) { // Clean up things on exit _TrayIcon.Visible = false; _RefreshTimer.Enabled = false; // Clean up continuous state, if required if (ExecutionMode.HasFlag(EXECUTION_STATE.ES_CONTINUOUS)) { WinU.SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS); } }
private void _RefreshTimer_Tick(object sender, EventArgs e) { WinU.SetThreadExecutionState(ExecutionMode); }