internal void BindNextClickedEvent(ConfigWizardPanel pcwPanel, bool pbBind) { buttonNext.Click -= pcwPanel.WizardButtonNextClicked; if (pbBind) buttonNext.Click += pcwPanel.WizardButtonNextClicked; }
private void ShowPanel(ConfigWizardPanel pcwpPanel) { //Delete NextClickEvent on the old panel if (mcwpCurrentPanel != null) BindNextClickedEvent(mcwpCurrentPanel, false); //Bind NextClickEvent on the new Panel mcwpCurrentPanel = pcwpPanel; BindNextClickedEvent(mcwpCurrentPanel, false); //Show the new panel panelMain.Controls.Clear(); panelMain.Controls.Add(pcwpPanel); pcwpPanel.OnShow(); }