Пример #1
0
 public override void UnregisterAllEvents()
 {
     try
     {
         NativeAutomation.RemoveAllEventHandlers();
     }
     catch { }
 }
Пример #2
0
        /// <summary>
        /// Creates an <see cref="Element"/> from a given point
        /// </summary>
        public Element FromPoint(Point point)
        {
            var nativeElement = NativeAutomation.ElementFromPoint(point.ToTagPoint());

            return(nativeElement == null ? null : new Element(this, nativeElement));
        }
Пример #3
0
        /// <summary>
        /// Creates an <see cref="Element"/> from a given windows handle (HWND)
        /// </summary>
        public Element FromHandle(IntPtr hwnd)
        {
            var nativeElement = NativeAutomation.ElementFromHandle(hwnd);

            return(nativeElement == null ? null : new Element(this, nativeElement));
        }
Пример #4
0
        /// <summary>
        /// Gets the root element (desktop)
        /// </summary>
        public Element GetDesktop()
        {
            var desktop = NativeAutomation.GetRootElement();

            return(new Element(this, desktop));
        }