Пример #1
0
 private void OnKeyPressHandled(ClickerEventArgs args)
 {
     IsKeyBindWorking = false;
     BindedKey        = args.Data.ToString();
     _eventBroker.Raise(EventNames.KeyBindingStop, new ClickerEventArgs
     {
         Data   = args.Data,
         Sender = this
     });
 }
Пример #2
0
        private void OnToggleClickerState(ClickerEventArgs args)
        {
            if (args.Data.ToString() == BindedKey)
            {
                if (!IsClickerWorking)
                {
                    if (Start.CanExecute(null))
                    {
                        Start.Execute(null);
                    }

                    return;
                }

                if (Stop.CanExecute(null))
                {
                    Stop.Execute(null);
                }
            }
        }