using System; using CMS.ExtendedControls; using CMS.UIControls; public partial class CMSInstall_Controls_StepNavigation : CMSUserControl { #region "Properties" /// /// Indicates if control should display table before and after button's panel. /// public bool NextPreviousVisible { get; set; } /// /// Previous button. /// public LocalizedButton PreviousButton { get { return StepPrevButton; } } /// /// Next button. /// public LocalizedButton NextButton { get { return StepNextButton; } } /// /// Gets or sets if JS for next/previous buttons should be included. /// public bool NextPreviousJS { get; set; } /// /// Indicates if current step is finish step. /// public bool FinishStep { get; set; } #endregion #region "Page events" protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (NextPreviousVisible) { ltlTableBefore.Text = @"
"; ltlTableBefore.Visible = true; ltlTableAfter.Text = @"
"; ltlTableAfter.Visible = true; StepPrevButton.Visible = true; } else { ltlTableBefore.Visible = false; ltlTableAfter.Visible = false; StepPrevButton.Visible = false; } if (NextPreviousJS) { StepPrevButton.OnClientClick = "PrevStep(this,document.getElementById('buttonsDiv')); return false;"; StepNextButton.OnClientClick = "NextStep(this,document.getElementById('buttonsDiv')); return false;"; } if (FinishStep) { StepNextButton.CommandName = "Finish"; } } #endregion }