private void ParentForm_FormClosed(object sender, FormClosedEventArgs e) { // maybe we need to save the project ToolBars.SaveToolbarPositions(toolStripContainer); Settings.SaveGlobalSettings(); // ToolStripManager.SaveSettings(this); // save the positions of the toolbars (doesn't work correctly) cadFrame.Dispose(); Application.Idle -= OnIdle; }
protected override void OnFormClosed(FormClosedEventArgs e) { cadFrame.Dispose(); Menu.Dispose(); this.Dispose(); cadCanvas.Dispose(); propertiesExplorer.Dispose(); topToolStripContainer.Dispose(); splitContainer.Dispose(); if (progressForm != null) { progressForm.Dispose(); } Menu = null; cadFrame = null; cadCanvas = null; propertiesExplorer = null; topToolStripContainer = null; splitContainer = null; progressForm = null; base.OnFormClosed(e); }