[Mwinapi-commits] SF.net SVN: mwinapi:[143] trunk/ManagedWinapi/Accessibility/ SystemAccessibleObje
Status: Beta
Brought to you by:
schierlm
|
From: <zi...@us...> - 2017-12-12 11:38:05
|
Revision: 143
http://sourceforge.net/p/mwinapi/code/143
Author: ziewer
Date: 2017-12-12 11:38:03 +0000 (Tue, 12 Dec 2017)
Log Message:
-----------
Reverted modification in SystemAccessibleObject.Visible (due to incompatibility with Google Chrome)
- now 'Visible' only check state INVISIBLE (as it was before rev.142)
- new method 'IsState()' can be used to check any state (e.g. OFFSCREEN) e.g. for tabs in Firefox Quantum v.57
- catch NullReferenceException in 'State' (e.g. sometimes caused by IBM Notes)
Modified Paths:
--------------
trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs
Modified: trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs
===================================================================
--- trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs 2017-11-23 17:34:27 UTC (rev 142)
+++ trunk/ManagedWinapi/Accessibility/SystemAccessibleObject.cs 2017-12-12 11:38:03 UTC (rev 143)
@@ -327,6 +327,10 @@
{
return 0;
}
+ catch (NullReferenceException)
+ {
+ return 0;
+ }
}
}
@@ -348,12 +352,19 @@
{
get
{
- return (State & (int)AccStates.STATE_SYSTEM_INVISIBLE) == 0
- && (State & (int)AccStates.STATE_SYSTEM_OFFSCREEN) == 0;
+ return (State & (int)AccStates.STATE_SYSTEM_INVISIBLE) == 0;
}
}
/// <summary>
+ /// Whether this accessibile state is set.
+ /// </summary>
+ public bool IsState(AccStates state)
+ {
+ return (State & (int)state) > 0;
+ }
+
+ /// <summary>
/// The parent of this accessible object, or <b>null</b> if none exists.
/// </summary>
public SystemAccessibleObject Parent
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|