Example #1
0
        protected virtual void DisplayPage(IWizardControl page)
        {
            PageChangedArgs args = new PageChangedArgs(this, this.Pages.IndexOf(page) == this.Pages.Count - 1, m_isBack ? PageChangedDirection.Back : PageChangedDirection.Next);

            page.Control.Visible = false;
            page.Enter(this, args);

            InfoPanel.Visible = !page.FullSize;
            TitleLabel.Text = page.Title;
            InfoLabel.Text = page.HelpText;
            PageIcon.Image = page.Image == null ? DefaultImage : page.Image;
            ContentPanel.Controls.Clear();
            ContentPanel.Controls.Add(page.Control);
            page.Control.Dock = DockStyle.Fill;
            m_isLastPage = args.TreatAsLast;

            //Not sure this works under Mono...
            //TODO: The scaling sucks...
            /*try { this.Icon = System.Drawing.Icon.FromHandle(new System.Drawing.Bitmap(PageIcon.Image).GetHicon()); }
            catch { }*/

            UpdateButtons();

            page.Control.Visible = true;
            page.Display(this, args);
        }