示例#1
0
 protected void RemoveModalPanelAndWindow(IPanel panel)
 {
     panel.OnUnload();
     if (panel is Gtk.Dialog dialog)
     {
         dialog.Response -= HandleModalWindowResponse;
         dialog.Destroy();
     }
     else if (panel is Bin bin)
     {
         bin.Toplevel.DeleteEvent -= HandleModalWindowDeleteEvent;
         bin.Toplevel.Destroy();
     }
     System.GC.Collect();
 }