Inheritance: AutomationEventArgs
コード例 #1
0
ファイル: KeyFilter.cs プロジェクト: mono/uia2atk
		public bool PreFilterKey (KeyFilterData key)
		{
			bool alt = (key.ModifierKeys & Keys.Alt) != 0;
			bool control = (key.ModifierKeys & Keys.Control) != 0;
			bool shift = (key.ModifierKeys & Keys.Shift) != 0;
			System.Windows.Automation.KeyEventArgs eventArgs = new System.Windows.Automation.KeyEventArgs (key.Down, key.keycode, key.keysym, key.str, alt, control, shift);
			AutomationInteropProvider.RaiseAutomationEvent (AutomationElementIdentifiers.KeyEvent, null, eventArgs);
			return eventArgs.SuppressKeyPress;
		}
コード例 #2
0
        public bool PreFilterKey(KeyFilterData key)
        {
            bool alt     = (key.ModifierKeys & Keys.Alt) != 0;
            bool control = (key.ModifierKeys & Keys.Control) != 0;
            bool shift   = (key.ModifierKeys & Keys.Shift) != 0;

            System.Windows.Automation.KeyEventArgs eventArgs = new System.Windows.Automation.KeyEventArgs(key.Down, key.keycode, key.keysym, key.str, alt, control, shift);
            AutomationInteropProvider.RaiseAutomationEvent(AutomationElementIdentifiers.KeyEvent, null, eventArgs);
            return(eventArgs.SuppressKeyPress);
        }