public void LaunchRegressionControl(Constants.EnPITypes type) { if (Globals.ThisAddIn.wizardPane.Visible) { Globals.ThisAddIn.hideWizard(); } RegressionControl newControl = new RegressionControl(type); Globals.ThisAddIn.CustomTaskPanes.Remove(Globals.ThisAddIn.wizardPane); Globals.ThisAddIn.wizardPane = Globals.ThisAddIn.CustomTaskPanes.Add(newControl, "Select Energy Sources"); newControl.Open(); if (!Globals.ThisAddIn.wizardPane.Visible) { Globals.ThisAddIn.showWizard(); } }