private void HookToKeyboardEvents() { Task.Run(() => { api.CreateKeyboardHook((character) => { if (character.KeyCode == (KeyCode)Settings.KeyCodeToggle) { Logger.LogInfo($"Captured Toggle!"); OnToggleEvent?.Invoke(this, null); } if (character.KeyCode == (KeyCode)Settings.KeyCodeExit) { Logger.LogInfo($"Quiting.."); OnExitEvent?.Invoke(this, null); System.Windows.Forms.Application.Exit(); } }); System.Windows.Forms.Application.Run(); }); }
public void OnGestureExit() { if (OnExitEvent != null) { OnExitEvent.Invoke(); } }
private void ActionExit(object sender, EventArgs e) { var actionsRemaining = Actions.Any(x => !x.IsFinished && x.Status != Status.Skipped); if (!actionsRemaining) { OnExitEvent?.Invoke(this, EventArgs.Empty); } }
internal void SkipStep() { foreach (var a in Actions.Where(a => a.Status == Status.None)) { a.Update(Status.Skipped); } OnExitEvent?.Invoke(this, EventArgs.Empty); }
private void Screen_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (keyboardListener != null) { keyboardListener.KeyEvent -= KeyboardListener_KeyEvent; keyboardListener.IsBlockKeyboard = false; keyboardListener.Dispose(); keyboardListener = null; } if (trtcCloud != null) { RenderMapView.RemoveEngine(trtcCloud); trtcCloud?.exitRoom(); e.Cancel = true; } OnExitEvent?.Invoke(this, null); }
public override void OnExitAbility() { base.OnExitAbility(); OnExitEvent?.Invoke(); }
public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { OnExitEvent?.Invoke(); }
public virtual void OnPointerExit(PointerEventData data) { m_OnExit.Invoke( ); }
public virtual void OnExit() { OnExitEvent.Invoke(); }
protected virtual void OnExit(T info) { m_onExitEvent?.Invoke(); OnExitEvent?.Invoke(info); }
public void OnExitButtonClick() { OnExitEvent?.Invoke(); SceneManager.UnloadSceneAsync(SceneManager.GetSceneByName("Pause")); }