コード例 #1
0
ファイル: UIA3Automation.cs プロジェクト: csuffyy/FlaUI
 public override void UnregisterAllEvents()
 {
     try
     {
         NativeAutomation.RemoveAllEventHandlers();
     }
     catch { }
 }
コード例 #2
0
ファイル: UIA3Automation.cs プロジェクト: csuffyy/FlaUI
        /// <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
ファイル: UIA3Automation.cs プロジェクト: csuffyy/FlaUI
        /// <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
ファイル: UIA3Automation.cs プロジェクト: csuffyy/FlaUI
        /// <summary>
        /// Gets the root element (desktop)
        /// </summary>
        public Element GetDesktop()
        {
            var desktop = NativeAutomation.GetRootElement();

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