コード例 #1
0
ファイル: wnd_find.cs プロジェクト: qmgindi/Au
#pragma warning restore CS1573 // Parameter has no matching param tag in the XML comment (but other parameters do)

        //rejected: probably most users will not understand/use it. It's easy and more clear to create and use wndFinder instances.
        ///// <summary>
        ///// Gets arguments and result of this thread's last call to <see cref="Find"/> or <see cref="FindAll"/>.
        ///// </summary>
        ///// <remarks>
        ///// <b>wnd.wait</b> and similar functions don't change this property. <see cref="FindOrRun"/> and some other functions of this library change this property because they call <see cref="Find"/> internally.
        ///// </remarks>
        ///// <example>
        ///// This example is similar to what <see cref="FindOrRun"/> does.
        ///// <code><![CDATA[
        ///// wnd w = wnd.find("*- Notepad", "Notepad");
        ///// if(w.Is0) { run.it("notepad.exe"); w = wnd.waitAny(60, true, wnd.LastFind).w; }
        ///// ]]></code>
        ///// </example>
        //[field: ThreadStatic]
        //public static wndFinder lastFind { get; set; }

        //CONSIDER: add property: [field: ThreadStatic] public static wnd last { get; set; }

        /// <summary>
        /// Finds all matching windows.
        /// Returns array containing 0 or more window handles as wnd.
        /// Parameters etc are the same as <see cref="find"/>.
        /// </summary>
        /// <exception cref="Exception">Exceptions of <see cref="find"/>.</exception>
        /// <remarks>
        /// The list is sorted to match the Z order, however hidden windows (when using <see cref="WFlags.HiddenToo"/>) and IME windows are always after visible windows.
        /// </remarks>
        /// <seealso cref="getwnd.allWindows"/>
        /// <seealso cref="getwnd.mainWindows"/>
        /// <seealso cref="getwnd.threadWindows"/>
        public static wnd[] findAll(
            [ParamString(PSFormat.Wildex)] string name = null,
            [ParamString(PSFormat.Wildex)] string cn   = null,
            [ParamString(PSFormat.Wildex)] WOwner of   = default,
            WFlags flags = 0, Func <wnd, bool> also = null, WContains contains = default)
        {
            var f = new wndFinder(name, cn, of, flags, also, contains);
            var a = f.FindAll();

            //LastFind = f;
            return(a);
        }
コード例 #2
0
ファイル: wndFinder.cs プロジェクト: qmgindi/Au
 internal TProps(wndFinder f)
 {
     _f = f;
 }