private void OnKeyRelease(IItem sender, KeyArgs args) { if (args.Key == KeyCode.Enter) { _add.EventMouseClick?.Invoke(_add, new MouseArgs()); } }
public bool KeyDown(KeyArgs key) { if (key.Key == Key.Space && this.ToolService.IsControlDown) { if (this.Diagram != null && this.Diagram.SelectedItems.Count() > 1) { var sourceContainer = this.Graph.GetContainerFromItem(this.Diagram.SelectedItem) as RadDiagramShape; foreach (var item in this.Diagram.SelectedItems) { var targetContainer = this.Graph.GetContainerFromItem(item) as RadDiagramShape; if (this.AreValidShapes(sourceContainer, targetContainer)) { this.Graph.AddConnection(new RadDiagramConnection() { Source = sourceContainer, SourceConnectorPosition = "Auto", Target = targetContainer, TargetConnectorPosition = "Auto", TargetCapType = CapType.Arrow2 }); } } return true; } } return false; }
public bool KeyDown(KeyArgs key) { if (key.Key == Key.Space && this.ToolService.IsControlDown) { if (this.Diagram != null && this.Diagram.SelectedItems.Count() > 1) { var sourceContainer = this.Graph.GetContainerFromItem(this.Diagram.SelectedItem) as RadDiagramShape; foreach (var item in this.Diagram.SelectedItems) { var targetContainer = this.Graph.GetContainerFromItem(item) as RadDiagramShape; if (this.AreValidShapes(sourceContainer, targetContainer)) { this.Graph.AddConnection(new RadDiagramConnection() { Source = sourceContainer, SourceConnectorPosition = "Auto", Target = targetContainer, TargetConnectorPosition = "Auto", TargetCapType = CapType.Arrow2 }); } } return(true); } } return(false); }
private void KeyChange(object sender, KeyArgs args) { if (args.KeyEventType == KeyActType.KeyUp) { if (CancelSignificantKey && _keyKode != null && _keyKode == args.KeyCode) { args.Cancel = true; } return; } if (_sequenceMachine.Input(args.KeyCode)) { if (CancelSignificantKey) { _keyKode = args.KeyCode; args.Cancel = CancelSignificantKey; } if (_sequenceMachine.Coincided.Any()) { _sequenceMachine.Coincided.Cast <Shortcut>().ForEach(shortcut => _pool.Invoke(shortcut.Callback)); } } }
private void OnKeyRelease(IItem sender, KeyArgs args) { if (args.Key == KeyCode.Space) { AddButton.EventMouseClick?.Invoke(AddButton, new MouseArgs()); } }
public void HandleEvent(KeyEventActions a, Keycode key, bool shift, string characters) { KeyArgs k = new KeyArgs(AndroidKeyToGenericKey(key), shift); if (k.Key != Keys.None) { InputController.IC.ProcessExternalKey(k, AndroidActionToGenericAction(a)); } }
private void OnKeyChange(KeyChangeArgs args, KeyActType keyActType) { //туда сюда var e = new KeyArgs { KeyEventType = keyActType }; OnKeyChange(Mapper.Map(args, e)); Mapper.Map(e, args); }
// ReSharper disable once RedundantOverriddenMember protected override bool OnKey(SciterElement element, KeyArgs args) { //Console.WriteLine($"{args.Event} | {args.KeyboardState} | {(char)args.KeyCode}"); return(base.OnKey(element, args)); }
private void KeyboardKeyChange(object sender, KeyArgs args) { _macro.Add(new KeySequence(args.KeyCode, args.KeyEventType)); }
public bool KeyUp(KeyArgs key) { return false; }
private void OnKeyPress(IItem sender, KeyArgs args) { if (args.Key == KeyCode.Escape) { if (menu.IsVisible()) { Close(); } else { _stop.Stop(); _stop = null; menu.SetVisible(true); } } if (args.Key == KeyCode.Space) { if (_stop == null) { header.ResetLevel(); menu.SetVisible(false); time_limit.SetValue(15); ResetTimer(); cards_board.RandomHand(); next.Play(); } } if (menu.IsVisible()) { return; } if (args.Key == KeyCode.Left) { key.Play(); hand.MoveLeft(); } if (args.Key == KeyCode.Right) { key.Play(); hand.MoveRight(); } if (args.Key == KeyCode.Up) { key.Play(); hand.SetChosen(CardType.Top); } if (args.Key == KeyCode.Down) { key.Play(); hand.SetChosen(CardType.Bottom); } if (args.Key == KeyCode.Enter) { if (Common.CompareMatrices(cards_board.GetCard(CardType.Top), hand.GetCard(CardType.Top)) && Common.CompareMatrices(cards_board.GetCard(CardType.Bottom), hand.GetCard(CardType.Bottom)) ) { _stop.Stop(); time_limit.SetValue(15); ResetTimer(); if (cards_board.GetSelected() == 6) { cards_board.RandomHand(); header.LevelUp(); if (header.GetLevel() % 5 == 0) { time_limit.SetMaxValue(time_limit.GetMaxValue() - 1); } } else { cards_board.SetSelected(cards_board.GetSelected() + 1); } next.Play(); } else { wrong.Play(); header.LevelDown(); } } }
public bool KeyUp(KeyArgs key) { return(false); }
private void OnKeyUp(KeyArgs args) { _keyCount--; }