public new virtual void Clear()
        {
            if (FirstNode != null)
            {
                TextObject first = FirstNode;

                while (first?.DLeft != null)
                {
                    first = first.DLeft;
                }

                while (first != null)
                {
                    TextObject next = first.DRight;

                    first.Destroy();
                    first.Clear();

                    first = next;
                }
            }

            if (DrawPointer != null)
            {
                TextObject first = DrawPointer;

                while (first?.DLeft != null)
                {
                    first = first.DLeft;
                }

                while (first != null)
                {
                    TextObject next = first.DRight;

                    first.Destroy();
                    first.Clear();

                    first = next;
                }
            }

            FirstNode        = this;
            FirstNode.DLeft  = null;
            FirstNode.DRight = null;
            DrawPointer      = null;
        }
示例#2
0
文件: Item.cs 项目: luxkun/Futuridium
 private void DestroyEvent(object sender)
 {
     nameText.Destroy();
     descriptionText.Destroy();
 }