internal void OnCurrentStepChanged(int pStep) { if (m_loaded) { if (m_currentstep >= 0 && m_currentstep < m_steps.Count) { WizardStepChangingEventArgs e = new WizardStepChangingEventArgs(pStep, m_currentstep, false); if (WizardStepChanging != null) { WizardStepChanging(this, e); } if (e.Cancel) { m_currentstep = pStep; } else { pnl_steps.Controls.Clear(); if (m_steps.Count > 0) { pnl_steps.Controls.Add(m_steps[m_currentstep]); } OnStepCountChanged(); if (WizardStepChanged != null) { WizardStepChanged(this, e); } } } } }