コード例 #1
0
        internal static new object Wrap(AutomationElement el, object pattern, bool cached)
        {
            TextPattern2 result = null;

            if (pattern != null)
            {
                UIAutomationClient.IUIAutomationTextPattern basePattern =
                    (UIAutomationClient.IUIAutomationTextPattern)el.GetRawPattern(TextPattern.Pattern, cached);
                if (basePattern != null)
                {
                    result = new TextPattern2(el, (UIAutomationClient.IUIAutomationTextPattern2)pattern,
                                              basePattern, cached);
                }
            }
            return(result);
        }
コード例 #2
0
 protected TextPattern(AutomationElement el, UIAutomationClient.IUIAutomationTextPattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
コード例 #3
0
 private TextPattern2(AutomationElement el, UIAutomationClient.IUIAutomationTextPattern2 pattern, UIAutomationClient.IUIAutomationTextPattern basePattern, bool cached)
     : base(el, basePattern, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
コード例 #4
0
 protected TextPattern(AutomationElement el, UIAutomationClient.IUIAutomationTextPattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }