Esempio n. 1
0
        internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild)
        {
            IRawElementProviderSimple rawElementProviderSimple = null;

            try
            {
                ProxyFragment parent = null;

                WindowsAltTab altTab = new WindowsAltTab(hwnd, parent, 0);
                if (idChild == 0)
                {
                    rawElementProviderSimple = altTab;
                }
                else
                {
                    rawElementProviderSimple = altTab.CreateAltTabItem(idChild - 1);
                }
            }
            catch (ElementNotAvailableException)
            {
                rawElementProviderSimple = null;
            }

            return(rawElementProviderSimple);
        }
Esempio n. 2
0
            // ------------------------------------------------------
            //
            // Constructors
            //
            // ------------------------------------------------------

            #region Constructors

            // Constructor.
            internal WindowsAltTabItem(IntPtr hwnd, WindowsAltTab parent, int item)
                : base(hwnd, parent, item)
            {
                _cControlType         = ControlType.ListItem;
                _fIsKeyboardFocusable = true;
                _altTab = parent;
            }
Esempio n. 3
0
 // Static Create method called by the event tracker system
 internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
 {
     if (idObject != NativeMethods.OBJID_VSCROLL && idObject != NativeMethods.OBJID_HSCROLL)
     {
         ProxySimple el = (ProxyHwnd)WindowsAltTab.Create(hwnd, 0);
         if (el != null)
         {
             el.DispatchEvents(eventId, idProp, idObject, idChild);
         }
     }
 }
Esempio n. 4
0
        internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild)
        {
            IRawElementProviderSimple rawElementProviderSimple = null;
            try
            {
                ProxyFragment parent = null;

                WindowsAltTab altTab = new WindowsAltTab(hwnd, parent, 0);
                if (idChild == 0)
                {
                    rawElementProviderSimple = altTab;
                }
                else
                {
                    rawElementProviderSimple = altTab.CreateAltTabItem(idChild - 1);
                }
            }
            catch (ElementNotAvailableException)
            {
                rawElementProviderSimple = null;
            }

            return rawElementProviderSimple;
        }
Esempio n. 5
0
            // ------------------------------------------------------
            //
            // Constructors
            //
            // ------------------------------------------------------

            #region Constructors

            // Constructor.
            internal WindowsAltTabItem(IntPtr hwnd, WindowsAltTab parent, int item)
                : base(hwnd, parent, item)
            {
                _cControlType = ControlType.ListItem;
                _fIsKeyboardFocusable = true;
                _altTab = parent;
            }