コード例 #1
0
		private void HandleProviderKeyPressEvent (object o, KeyEventArgs args)
		{
			if (FocusedElement == null)
				return;
			
			RaisePreviewKeyPressEvent (args);
			RaiseKeyPressEvent (args);			
		}	
コード例 #2
0
		private void HandleKeyPressEvent (object o, KeyEventArgs args)
		{
			if (!NeedToProcess (args.Key))
				return;

			if (Region.InsertCharacterCommand != null) {
				Region.InsertCharacterCommand.Execute (args.Key);
			}
		}
コード例 #3
0
		private void HandleKeyPressEvent (object o, KeyEventArgs args)
		{
			switch (args.Key) {
			case Key.LeftShift:
			case Key.RightShift:
				Modifiers |= ModifierKeys.Shift;
				break;
			}

			if (FocusedElement == null)
				return;
			
			RaisePreviewKeyPressEvent (args);
			RaiseKeyPressEvent (args);			
		}
コード例 #4
0
		private void RaiseKeyPressEvent (KeyEventArgs args)
		{
			if (FocusedElement == null)
				return;

			KeyPressEvent.RaiseEvent (FocusedElement, args);
		}
コード例 #5
0
		private void HandleKeyReleaseEvent (object sender, KeyEventArgs args)
		{
			switch (args.Key) {
			case Key.LeftShift:
			case Key.RightShift:
				Modifiers ^= ModifierKeys.Shift;
				break;
			}
		}
コード例 #6
0
ファイル: DocumentView.cs プロジェクト: Octavio/moro.fkalc
		private void HandlePreviewKeyPressEvent (object o, KeyEventArgs args)
		{
			ProcessKey ();
		}
		private void RaiseKeyPressEventHandler (KeyEventArgs args)
		{
			if (KeyPressEvent != null) {
				KeyPressEvent (this, args);
			}
		}
コード例 #8
0
		private void RaisePreviewKeyPressEvent (KeyEventArgs args)
		{
			if (PreviewKeyPressEvent != null) {
				PreviewKeyPressEvent (this, args);
			}
		}
コード例 #9
0
		protected virtual void OnKeyPressEvent (object o, KeyEventArgs args)
		{
			var commands = InputBindings.Where (ib => ib.Command != null && ib.Gesture.Matches (args.Key, Keyboard.Modifiers)).Select (ib => ib.Command);

			foreach (var command in commands) {
				command.Execute (null);
			}

			RaiseKeyPressEvent (args);
		}
コード例 #10
0
		protected virtual void OnPreviewKeyPressEvent (object o, KeyEventArgs args)
		{
			RaisePreviewKeyPressEvent (args);
		}
コード例 #11
0
		private void RaiseKeyReleaseEvent (KeyEventArgs args)
		{
			if (KeyReleaseEvent != null) {
				KeyReleaseEvent (this, args);
			}
		}