コード例 #1
0
ファイル: AAcc_find.cs プロジェクト: alexfordc/Au
 /// <summary>
 /// Finds accessible object (AO) in another AO.
 /// The same as <see cref="Find(AAcc)"/>, but waits until the AO is found or the given time expires.
 /// </summary>
 /// <param name="secondsTimeout">Timeout, seconds. Can be 0 (infinite), &gt;0 (exception) or &lt;0 (no exception). More info: [](xref:wait_timeout).</param>
 /// <param name="a">Direct or indirect parent AO.</param>
 /// <returns>Returns true. On timeout returns false if <i>secondsTimeout</i> is negative; else exception.</returns>
 /// <exception cref="TimeoutException"><i>secondsTimeout</i> time has expired (if &gt; 0).</exception>
 /// <exception cref="Exception">Exceptions of <see cref="Find(AAcc)"/>.</exception>
 public bool Wait(double secondsTimeout, AAcc a)
 {
     return(_FindOrWait(a, secondsTimeout, true));
 }
コード例 #2
0
ファイル: AAcc_find.cs プロジェクト: alexfordc/Au
 /// <summary>
 /// Finds accessible object (AO) in another AO, like <see cref="AAcc.Find(string, string, string, AFFlags, Func{AAcc, bool}, int, string)"/>.
 /// Returns true if found. The <see cref="Result"/> property will be the found AO.
 /// </summary>
 /// <param name="a">Direct or indirect parent AO.</param>
 /// <exception cref="ArgumentNullException">a is null.</exception>
 /// <exception cref="ArgumentException">
 /// - <i>role</i> is "" or invalid or has a prefix ("web:" etc).
 /// - <i>name</i> is invalid wildcard expression (<c>"**options "</c> or regular expression).
 /// - <i>prop</i> has invalid format or contains unknown property names or invalid wildcard expressions.
 /// - flag <see cref="AFFlags.UIA"/>.
 /// - <see cref="SimpleElementId"/> is not 0.
 /// </exception>
 /// <exception cref="AuException">Failed. For example, window of a higher [](xref:uac) integrity level process.</exception>
 public bool Find(AAcc a)
 {
     return(_FindOrWait(a, 0, false));
 }