ACAT.Lib.Core.Utility.WindowActivityMonitor.IsDifferent C# (CSharp) Метод

IsDifferent() публичный статический Метод

Compares the two automation elements and returns if they are identical or not
public static IsDifferent ( AutomationElement ele1, AutomationElement ele2 ) : bool
ele1 System.Windows.Automation.AutomationElement first element
ele2 System.Windows.Automation.AutomationElement second element
Результат bool
        public static bool IsDifferent(AutomationElement ele1, AutomationElement ele2)
        {
            bool retVal;
            if (ele1 == null || ele2 == null)
            {
                return true;
            }

            try
            {
                retVal = !Automation.Compare(ele1.GetRuntimeId(), ele2.GetRuntimeId());
            }
            catch
            {
                retVal = true;
            }

            Log.Debug(retVal ? "YES" : "NO");
            return retVal;
        }