public override void Dispose() { if ((_flags & Flags.Disposed) != 0) { return; } _editing = false; if (_caret != null) { _caret.Dispose(); _selectionShape.Dispose(); } base.Dispose(); }
static new public void ClearStatic() { if (_caret != null) { _caret.Dispose(); } if (_selectionShape != null) { _selectionShape.Dispose(); } _caret = null; _selectionShape = null; _nextBlink = 0; onCopy = null; onPaste = null; }
/// <summary> /// 设置内容为一个原生对象。这个图形对象相当于一个占位的用途。 /// </summary> /// <param name="obj">原生对象</param> public void SetNativeObject(DisplayObject obj) { if (displayObject == obj) { return; } if (_shape != null) { if (_shape.parent != null) { _shape.parent.RemoveChild(displayObject, true); } else { _shape.Dispose(); } _shape.gOwner = null; _shape = null; } displayObject = obj; if (displayObject != null) { displayObject.alpha = this.alpha; displayObject.rotation = this.rotation; displayObject.visible = this.visible; displayObject.touchable = this.touchable; displayObject.gOwner = this; } if (parent != null) { parent.ChildStateChanged(this); } HandlePositionChanged(); }