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; }
private void DestroyEvent(object sender) { nameText.Destroy(); descriptionText.Destroy(); }