コード例 #1
0
ファイル: ToolboxPad.cs プロジェクト: dgjbss/MonoDevelopWin
        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();
        }
コード例 #2
0
ファイル: ToolboxPad.cs プロジェクト: wzq0621/monodevelop
        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();
        }
コード例 #3
0
ファイル: GtkSharpDriver.cs プロジェクト: ventor3000/guppy
        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();
                }
            }
        }
コード例 #4
0
 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;
             }
         }
     }
 }
コード例 #5
0
ファイル: MainWindow.cs プロジェクト: GNOME/longomatch
 void DestroyPanel(Widget panel)
 {
     if (panel is IPanel) {
         (panel as IPanel).BackEvent -= BackClicked;
     }
     panel.Destroy ();
     panel.Dispose ();
     System.GC.Collect ();
 }
コード例 #6
0
 public override void Dispose()
 {
     design.Dispose();
     actionbox.Dispose();
     base.Dispose();
 }