protected void OnDlManager(object sender, EventArgs args) { if (this.dlWindow == null) { this.dlWindow = new GUI.Window(); this.dlWindow.DeleteEvent += new DeleteEventHandler(OnDlWinClose); this.guiGlue = new GUI.Glue(this.dlWindow); } this.dlWindow.ShowAll(); }
protected void OnDlWinClose(object sender, DeleteEventArgs args) { if (this.guiGlue != null) { this.guiGlue.Dispose(); this.guiGlue = null; } if (this.dlWindow != null) { this.dlWindow.DeleteEvent -= new DeleteEventHandler(OnDlWinClose); this.dlWindow.Destroy(); this.dlWindow = null; } }