Exemple #1
0
        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();
     }
 }
Exemple #3
0
        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);
            }
        }
Exemple #4
0
        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();
 }
Exemple #8
0
 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"));
 }