Пример #1
0
        public bool contains(IGraphObject3D obj)
        {
            bool flag = this.m_children.Contains(obj as GraphObject3DImpl);
            bool result;

            if (flag)
            {
                result = true;
            }
            else
            {
                for (int i = 0; i < this.m_children.Count; i++)
                {
                    GraphObject3DImpl graphObject3DImpl = this.m_children[i];
                    bool flag2 = graphObject3DImpl != null && graphObject3DImpl is Container3DImpl;
                    if (flag2)
                    {
                        bool flag3 = (graphObject3DImpl as Container3DImpl).contains(obj);
                        if (flag3)
                        {
                            result = true;
                            return(result);
                        }
                    }
                }
                result = false;
            }
            return(result);
        }
Пример #2
0
        public void removeChild(IGraphObject3D child)
        {
            bool flag = child == null;

            if (!flag)
            {
                GraphObject3DImpl graphObject3DImpl = child as GraphObject3DImpl;
                bool flag2 = !this.m_children.Contains(graphObject3DImpl);
                if (!flag2)
                {
                    this.m_children.Remove(graphObject3DImpl);
                    graphObject3DImpl.parent = null;
                }
            }
        }
Пример #3
0
        public void removeChildAt(int idx)
        {
            bool flag = idx < 0 || idx >= this.m_children.Count;

            if (!flag)
            {
                GraphObject3DImpl graphObject3DImpl = this.m_children[idx];
                this.m_children.RemoveAt(idx);
                bool flag2 = graphObject3DImpl != null;
                if (flag2)
                {
                    graphObject3DImpl.parent = null;
                }
            }
        }
Пример #4
0
        public int indexOf(IGraphObject3D child)
        {
            bool flag = child == null;
            int  result;

            if (flag)
            {
                result = -1;
            }
            else
            {
                GraphObject3DImpl item = child as GraphObject3DImpl;
                result = this.m_children.IndexOf(item);
            }
            return(result);
        }
Пример #5
0
        public void addChild(IGraphObject3D child)
        {
            bool flag = child == null;

            if (!flag)
            {
                GraphObject3DImpl graphObject3DImpl = child as GraphObject3DImpl;
                bool flag2 = this.m_children.Contains(graphObject3DImpl);
                if (!flag2)
                {
                    this.m_children.Add(graphObject3DImpl);
                    bool flag3 = graphObject3DImpl.parent != null;
                    if (flag3)
                    {
                        graphObject3DImpl.parent.removeChild(child);
                    }
                    graphObject3DImpl.parent = this;
                }
            }
        }
Пример #6
0
        public void addChildAt(IGraphObject3D child, int idx)
        {
            bool flag = child == null;

            if (!flag)
            {
                GraphObject3DImpl graphObject3DImpl = child as GraphObject3DImpl;
                bool flag2 = graphObject3DImpl.parent != null;
                if (flag2)
                {
                    graphObject3DImpl.parent.removeChild(child);
                }
                bool flag3 = idx >= this.m_children.Count;
                if (flag3)
                {
                    this.m_children.Add(graphObject3DImpl);
                }
                else
                {
                    this.m_children.Insert(idx, graphObject3DImpl);
                }
                graphObject3DImpl.parent = this;
            }
        }