Esempio n. 1
0
 /// <summary>
 /// Invokes the menu item by access key.
 /// </summary>
 /// <param name="extension">The extension.</param>
 /// <param name="control">The menu item element.</param>
 /// <param name="keyCombination">The key combination.</param>
 internal static void InvokeByAccessKeyBridge(this InvokeAdapter extension, BaseProdControl control, string keyCombination)
 {
     try
     {
         UiaInvokeByAccessKey(control, keyCombination);
     }
     catch (ArgumentNullException err)
     {
         throw new ProdOperationException(err);
     }
     catch (ElementNotAvailableException err)
     {
         throw new ProdOperationException(err);
     }
     catch (InvalidOperationException err)
     {
         throw new ProdOperationException(err);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Handles The extended interface. event
 /// </summary>
 /// <param name="extension">The extension interface.</param>
 /// <param name="control">The base ProdUI control.</param>
 public static void InvokeHook(this InvokeAdapter extension, BaseProdControl control)
 {
     try
     {
         /* Try UIA First */
         UiaInvoke(control);
     }
     catch (ArgumentNullException err)
     {
         throw new ProdOperationException(err);
     }
     catch (ElementNotAvailableException err)
     {
         throw new ProdOperationException(err);
     }
     catch (InvalidOperationException)
     {
         /* now try a native SendMessage */
         NativeInvoke(control);
     }
 }