public void AddRange(StiWizardPageCollection pages) { foreach (StiWizardPage page in pages) { Add(page); } }
public StiWizard() { this.pages = new StiWizardPageCollection(this); #region Buttons this.nextButton = new Button(); this.NextButton.TabIndex = 1000; this.NextButton.Click += new EventHandler(OnNextClick); this.finishButton = new Button(); this.FinishButton.DialogResult = DialogResult.OK; this.FinishButton.TabIndex = 1001; this.FinishButton.Click += new EventHandler(OnFinishClick); this.cancelButton = new Button(); this.CancelButton.DialogResult = DialogResult.Cancel; this.CancelButton.TabIndex = 1002; this.CancelButton.Click += new EventHandler(OnCancelClick); this.helpButton = new Button(); this.HelpButton.TabIndex = 1003; this.HelpButton.Click += new EventHandler(OnHelpClick); this.backButton = new Button(); this.BackButton.TabIndex = 1004; this.BackButton.Enabled = false; this.BackButton.Click += new EventHandler(OnBackClick); this.Controls.Add(BackButton); this.Controls.Add(HelpButton); this.Controls.Add(CancelButton); this.Controls.Add(FinishButton); this.Controls.Add(NextButton); #endregion #region Button Text this.BackText = "< &Back"; this.NextText = "&Next >"; this.CancelText = "Cancel"; this.FinishText = "&Finish"; this.HelpText = "&Help"; #endregion #region sfHeaderTitle sfHeaderTitle = new StringFormat { HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show, LineAlignment = StringAlignment.Near, Alignment = StringAlignment.Near, FormatFlags = StringFormatFlags.NoWrap, Trimming = StringTrimming.EllipsisCharacter }; if (this.RightToLeft == RightToLeft.Yes) { sfHeaderTitle.FormatFlags |= StringFormatFlags.DirectionRightToLeft; } #endregion #region sfHeaderDescription sfHeaderDescription = new StringFormat { HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show, LineAlignment = StringAlignment.Center, Alignment = StringAlignment.Near, Trimming = StringTrimming.EllipsisCharacter }; if (this.RightToLeft == RightToLeft.Yes) { sfHeaderDescription.FormatFlags |= StringFormatFlags.DirectionRightToLeft; } #endregion #region Fonts headerTitleFont = new Font(Font.FontFamily.Name, 10, FontStyle.Bold); headerDescriptionFont = new Font(Font.FontFamily.Name, 8); treeProgressFont = new Font(Font.FontFamily.Name, 8); #endregion this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); SetLayout(); }