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 (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 DefaultDispose(object target) { /*IDisposable disp = target as IDisposable; * if (disp != null) * disp.Dispose();*/ DriverWidget dw = target as DriverWidget; if (dw != null) { Gtk.Widget w = dw.NativeObject as Gtk.Widget; if (w != null) { w.Destroy(); w.Dispose(); } } else { IDisposable di = target as IDisposable; if (di != null) { di.Dispose(); } } }
static void CloseWindow(WidgetInfo widget) { if (widget != null) { Gtk.Widget page = (Gtk.Widget)openWindows [widget]; if (page != null) { WidgetNotebook.Remove(page); openWindows.Remove(widget); page.Dispose(); if (openWindows.Count == 0) { SteticApp.ActiveDesigner = null; } } } }
void DestroyPanel(Widget panel) { if (panel is IPanel) { (panel as IPanel).BackEvent -= BackClicked; } panel.Destroy (); panel.Dispose (); System.GC.Collect (); }
public override void Dispose() { design.Dispose(); actionbox.Dispose(); base.Dispose(); }