示例#1
0
        protected override void InitLayout()
        {
            base.InitLayout();

            try
            {
                WizardForm wizard = this.WizardPage.Wizard;
                for (int i = 0; i < wizard.PageCount; i++)
                {
                    Microsoft.WizardFramework.WizardPage page = wizard.GetPage(i);
                    page.InfoRTBoxIcon = null;
                }
            }
            catch { }

            try
            {
                WizardForm wizard = this.WizardPage.Wizard;
                Control    header = wizard.Controls["_headerBannerPanel"];
                header.BackColor = Color.White;
                //header.BackgroundImage = SPALM.SPSF.Library.Properties.Resources.SPSFBannerTitle;
                Image  title = SPALM.SPSF.Library.Properties.Resources.SPSFBannerTitle;
                double width = (double)header.Height / (double)title.Height * (double)title.Width;
                header.BackgroundImage       = (Image) new Bitmap(title, new Size((int)width, header.Height));
                header.BackgroundImageLayout = ImageLayout.None;
                header.Visible = true;

                PictureBox pictureBox = header.Controls["_pageLogo"] as PictureBox;
                pictureBox.Dock     = DockStyle.Right;
                pictureBox.SizeMode = PictureBoxSizeMode.AutoSize;
                // resize not working, for whatever reason, taking two images for now to support VisualStyles (Win8)
                //Image logo = header.Height < 74?SPALM.SPSF.Library.Properties.Resources.SPSFBannerLogoSmall:SPALM.SPSF.Library.Properties.Resources.SPSFBannerLogo;
                Image logo = SPALM.SPSF.Library.Properties.Resources.SPSFBannerLogo;
                width                   = (double)header.Height / (double)logo.Height * (double)logo.Width;
                logo                    = (Image) new Bitmap(logo, new Size((int)width, header.Height));
                pictureBox.Image        = logo;
                pictureBox.InitialImage = logo;
                pictureBox.Visible      = true;
                //pictureBox.Visible = false;

                Label headlineLabel = header.Controls["_headlineLabel"] as Label;
                headlineLabel.Visible = false;
                //headlineLabel.ForeColor = Color.Red;
                //headlineLabel.TextAlign = ContentAlignment.MiddleRight;
                //headlineLabel.Font = new Font(this.Font.FontFamily, 11);
                //headlineLabel.BringToFront();

                pictureBox.SendToBack();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Ex" + ex.ToString());
            }

            //hide the argumentpanelcontrol
            this.Visible = false;
        }
示例#2
0
 /// <summary>
 /// Everytime the panel is displayed then the Helpbox in the WizardPage is updated
 /// </summary>
 /// <param name="e"></param>
 protected override void OnEnter(EventArgs e)
 {
     base.OnEnter(e);
     if (this.Parent != null && this.Parent is Microsoft.WizardFramework.WizardPage)
     {
         Microsoft.WizardFramework.WizardPage page = this.Parent as Microsoft.WizardFramework.WizardPage;
         if (page == null)
         {
             return;
         }
         if (FieldConfig != null && !string.IsNullOrEmpty(FieldConfig.Help))
         {
             page.ShowInfoPanel = true;
             page.InfoRTBoxText = this.FieldConfig.Help;
         }
         else if (page is WizardPage)
         {
             (page as WizardPage).SetInfoTextHelp();
         }
     }
 }
        void ConditionPanelType_TextChanged(object sender, EventArgs e)
        {
            if (this.Parent != null)
            {
                string p  = this.Parent.GetType().ToString();
                string va = ((TextBox)sender).Text;


                int        i = 0;
                WizardForm f = FindWizardForm(this);
                if (f != null)
                {
                    Microsoft.WizardFramework.WizardPage nextpage = f.NextPage;
                    if (f != null)
                    {
                        foreach (Control c in nextpage.Controls)
                        {
                            if (va == "Text")
                            {
                                c.Visible = true;
                            }
                            else
                            {
                                string c1 = c.GetType().ToString();
                                if ((i == 1) || (i == 3))
                                {
                                    Type t = c.GetType();
                                    c.Visible = false;
                                }
                            }

                            i++;
                        }
                    }
                }
            }
        }