Exemplo n.º 1
0
        public List <T> GetSelectedObjects <T>()
        {
            List <T> tags = new List <T>();

            foreach (var obj in ObjectViewWrapperHandler.GetSelectedObjects())
            {
                if (obj == null)
                {
                    continue;
                }

                if (typeof(T).IsAssignableFrom(obj.GetType()))
                {
                    tags.Add((T)obj);
                }
            }
            return(tags);
        }
Exemplo n.º 2
0
        public List <ObjectTreeNode> GetSelectedNodes <T>()
        {
            List <ObjectTreeNode> nodes = new List <ObjectTreeNode>();

            foreach (var obj in ObjectViewWrapperHandler.GetSelectedNodes())
            {
                if (obj == null)
                {
                    continue;
                }

                if (typeof(T).IsAssignableFrom(obj.Tag.GetType()))
                {
                    nodes.Add(obj);
                }
            }
            return(nodes);
        }