Beispiel #1
0
 public JavaTreeElement(treeelement parent, bool expanded, JavaElement element) : base(parent)
 {
     JavaElement = element;
     IsExpanded  = expanded;
     Element     = element;
     Name        = element.title;
 }
Beispiel #2
0
        public WindowsTreeElement(treeelement parent, bool expanded, AutomationBase automation, AutomationElement element, ITreeWalker treeWalker) : base(parent)
        {
            Element         = new UIElement(element);
            _treeWalker     = treeWalker;
            this.automation = automation;
            RawElement      = element;
            IsExpanded      = expanded;

            string controltype  = "";
            string name         = "unknown";
            string automationid = "";

            ControlType = ControlType.Window;
            if (element.Properties.ControlType.IsSupported)
            {
                ControlType = element.Properties.ControlType.Value;
            }
            if (element.Properties.ControlType.IsSupported)
            {
                controltype = element.Properties.ControlType.Value.ToString();
            }
            if (element.Properties.Name.IsSupported)
            {
                name = element.Properties.Name.Value;
            }
            if (element.Properties.AutomationId.IsSupported)
            {
                automationid = element.Properties.AutomationId.Value;
            }
            Name = (controltype + " " + name + " " + automationid).Trim();
        }
Beispiel #3
0
 public SAPTreeElement(treeelement parent, bool expanded, SAPElement element) : base(parent)
 {
     SAPElement = element;
     IsExpanded = expanded;
     Element    = element;
     Name       = element.Name;
 }
Beispiel #4
0
 public NMTreeElement(treeelement parent, bool expanded, NMElement element) : base(parent)
 {
     NMElement  = element;
     IsExpanded = expanded;
     Element    = element;
     Name       = element.Name;
     Name       = element.ToString();
 }
Beispiel #5
0
        public Selector GetSelector(Selector anchor, treeelement item)
        {
            var             windowsitem = item as WindowsTreeElement;
            WindowsSelector winanchor   = anchor as WindowsSelector;

            if (winanchor == null && anchor != null)
            {
                winanchor = new WindowsSelector(anchor.ToString());
            }
            return(new WindowsSelector(windowsitem.RawElement, winanchor, PluginConfig.enum_selector_properties));
        }
Beispiel #6
0
        public Selector GetSelector(Selector anchor, treeelement item)
        {
            var             windowsitem = item as WindowsTreeElement;
            WindowsSelector winanchor   = anchor as WindowsSelector;

            if (winanchor == null && anchor != null)
            {
                winanchor = new WindowsSelector(anchor.ToString());
            }
            return(new WindowsSelector(windowsitem.RawElement, winanchor, true));
        }
Beispiel #7
0
        public Selector GetSelector(Selector anchor, treeelement item)
        {
            var        nmitem   = item as NMTreeElement;
            NMSelector nmanchor = anchor as NMSelector;

            if (nmitem == null && anchor != null)
            {
                nmanchor = new NMSelector(anchor.ToString());
            }
            return(new NMSelector(nmitem.NMElement, nmanchor, true));
        }
Beispiel #8
0
 public NMTreeElement(treeelement parent, bool expanded, NMElement element) : base(parent)
 {
     NMElement  = element;
     IsExpanded = expanded;
     Element    = element;
     Name       = element.Name;
     Name       = element.ToString();
     if (parent == null)
     {
         if (element.message != null && element.message.frameId > 0)
         {
             Name += " (" + element.message.frameId + ")";
         }
     }
 }
Beispiel #9
0
        public IETreeElement(treeelement parent, bool expanded, IEElement element) : base(parent)
        {
            IEElement  = element;
            IsExpanded = expanded;
            Element    = element;
            string controltype  = "";
            string name         = element.ToString();
            string automationid = "";

            //if (element.Properties.ControlType.IsSupported) ControlType = element.Properties.ControlType.Value;
            //if (element.Properties.ControlType.IsSupported) controltype = element.Properties.ControlType.Value.ToString();
            //if (element.Properties.Name.IsSupported) name = element.Properties.Name.Value;
            //if (element.Properties.AutomationId.IsSupported) automationid = element.Properties.AutomationId.Value;
            Name = (controltype + " " + name + " " + automationid).Trim();
        }
Beispiel #10
0
        public Selector GetSelector(Selector anchor, treeelement item)
        {
            var        nmitem   = item as NMTreeElement;
            NMSelector nmanchor = anchor as NMSelector;

            if (nmitem == null && anchor != null)
            {
                nmanchor = new NMSelector(anchor.ToString());
            }
            if (nmanchor != null)
            {
                var element = GetElementsWithSelector(nmanchor);
                return(new NMSelector(nmitem.NMElement, nmanchor, true, (NMElement)element.FirstOrDefault()));
            }
            return(new NMSelector(nmitem.NMElement, nmanchor, true, null));
        }
Beispiel #11
0
        public WindowsTreeElement(treeelement parent, bool expanded, AutomationBase automation, AutomationElement element, ITreeWalker treeWalker) : base(parent)
        {
            Element         = new UIElement(element);
            _treeWalker     = treeWalker;
            this.automation = automation;
            RawElement      = element;
            IsExpanded      = expanded;

            string controltype  = "";
            string name         = "unknown";
            string automationid = "";

            ControlType = ControlType.Window;
            if (element.Properties.ControlType.IsSupported)
            {
                ControlType = element.Properties.ControlType.Value;
            }
            if (element.Properties.ControlType.IsSupported)
            {
                controltype = element.Properties.ControlType.Value.ToString();
            }
            if (element.Properties.Name.IsSupported)
            {
                name = element.Properties.Name.Value;
            }
            if (element.Properties.AutomationId.IsSupported)
            {
                automationid = element.Properties.AutomationId.Value;
            }
            Name = (controltype + " " + name + " " + automationid).Trim();
            if (string.IsNullOrEmpty(Name))
            {
                try
                {
                    var c = element.Properties.ControlType.ValueOrDefault;
                    controltype = c.ToString();
                    Name        = (controltype + " " + name + " " + automationid).Trim();
                }
                catch (Exception)
                {
                    throw;
                }
                var b = true;
            }
        }
Beispiel #12
0
 public Selector GetSelector(Selector anchor, treeelement item)
 {
     throw new NotImplementedException();
 }
Beispiel #13
0
 public Selector GetSelector(Selector anchor, treeelement item)
 {
     return(null);
 }