Ejemplo n.º 1
0
        public void Click(string itemText)
        {
            MsoCommandBarItem target = null;

            foreach (MsoCommandBarItem item in ItemList)
            {
                if (item != null && item.Name.Equals(itemText))
                {
                    target = item;
                    break;
                }
            }
            if (target != null)
            {
                target.Click();
            }
        }
Ejemplo n.º 2
0
 private void InitToolBar()
 {
     if (this.WindowHandle != null)
     {
         CurAccessibile = new SUIAccessibility(WindowHandle, AccType.NativeOM);
         int count = CurAccessibile.ChildCount;
         itemList = new MsoCommandBarItem[count];
         int index = 0;
         for (int i = 1; i < count; i++)
         {
             if (CurAccessibile.Children[i].IsVisible)
             {
                 itemList[index] = new MsoCommandBarItem(CurAccessibile.Children[i]);
                 index++;
             }
         }
     }
 }
Ejemplo n.º 3
0
        public SUIMsoCommandBarPopup PopupMenu(string itemText)
        {
            MsoCommandBarItem target = null;

            foreach (MsoCommandBarItem item in ItemList)
            {
                if (item != null && item.Name.Equals(itemText))
                {
                    target = item;
                    break;
                }
            }
            if (target != null)
            {
                target.Click();
                SUISleeper.Sleep(500);
                SUIWinAPIs.EnumWindows(new EnumSMARTUIWindowsProc(this.FindPopupMenu), 0);
                return(popupedMenu);
            }
            return(null);
        }
Ejemplo n.º 4
0
 private void InitToolBar()
 {
     if(this.WindowHandle != null)
     {
         CurAccessibile = new SUIAccessibility(WindowHandle,AccType.NativeOM);
         int count = CurAccessibile.ChildCount;
         itemList = new MsoCommandBarItem[count];
         int index = 0;
         for (int i = 1; i < count; i++)
         {
             if (CurAccessibile.Children[i].IsVisible)
             {
                 itemList[index] = new MsoCommandBarItem(CurAccessibile.Children[i]);
                 index++;
             }
         }
     }
 }