Inheritance: AutomationEventArgs
Exemple #1
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;
		}
Exemple #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);
        }