public override void Dispose() { if (window != null) { window.PadContentShown -= Container_PadContentShown; window.PadContentHidden -= Container_PadContentHidden; window = null; } if (widget != null) { widget.DragBegin -= Widget_DragBegin; widget.DragEnd -= Widget_DragEnd; widget.Focused -= Widget_Focused; widget.KeyPressEvent -= toolbox.OnKeyPressed; widget.KeyReleaseEvent -= toolbox.KeyReleased; widget.Destroy(); widget.Dispose(); widget = null; } if (toolbox != null) { toolbox.ContentFocused -= Toolbox_ContentFocused; toolbox.DragBegin -= Toolbox_DragBegin; toolbox.DragSourceSet -= Toolbox_DragSourceSet; toolbox.Dispose(); toolbox = null; } base.Dispose(); }
public override void Dispose() { if (window != null) { window.PadContentShown -= Container_PadContentShown; window.PadContentHidden -= Container_PadContentHidden; window = null; } if (widget != null) { widget.DragDataGet -= Widget_DragDataGet; widget.DragBegin -= Widget_DragBegin; widget.DragEnd -= Widget_DragEnd; widget.Destroy(); widget.Dispose(); widget = null; } if (toolbox != null) { toolbox.DragBegin -= Toolbox_DragBegin; toolbox.DragSourceSet -= Toolbox_DragSourceSet; toolbox.Dispose(); toolbox = null; } base.Dispose(); }
public override void Dispose() { if (widget != null) { widget.KeyPressEvent -= toolbox.OnKeyPressed; widget.KeyReleaseEvent -= toolbox.KeyReleased; widget.Destroy(); widget.Dispose(); widget = null; } if (toolbox != null) { toolbox.Dispose(); toolbox = null; } base.Dispose(); }