Пример #1
0
		/// <summary>
		/// A simple constructor that initializes the object with the given values.
		/// </summary>
		/// <param name="p_xcsScript">The install script.</param>
		/// <param name="p_hifHeaderInfo">Information describing the form header.</param>
		/// <param name="p_csmStateManager">The install state manager.</param>
		/// <param name="p_lstInstallSteps">The install steps.</param>
		public OptionsForm(XmlScript p_xcsScript, HeaderInfo p_hifHeaderInfo, ConditionStateManager p_csmStateManager, IList<InstallStep> p_lstInstallSteps)
		{
			m_xcsScript = p_xcsScript;
			m_csmStateManager = p_csmStateManager;
			InitializeComponent();
			hplTitle.Text = p_hifHeaderInfo.Title;
			hplTitle.Image = p_hifHeaderInfo.ShowImage ? p_csmStateManager.GetImage(p_hifHeaderInfo.ImagePath) : null;
			hplTitle.ShowFade = p_hifHeaderInfo.ShowFade;
			hplTitle.ForeColor = p_hifHeaderInfo.TextColour;
			hplTitle.TextPosition = p_hifHeaderInfo.TextPosition;
			if (p_hifHeaderInfo.Height > hplTitle.Height)
				hplTitle.Height = p_hifHeaderInfo.Height;

			foreach (InstallStep stpStep in p_lstInstallSteps)
			{
				OptionFormStep ofsStep = new OptionFormStep(m_csmStateManager, stpStep.OptionGroups);
				ofsStep.Dock = DockStyle.Fill;
				ofsStep.Visible = false;
				ofsStep.ItemChecked += new EventHandler(ofsStep_ItemChecked);
				pnlWizardSteps.Controls.Add(ofsStep);
				m_lstInstallSteps.Add(new KeyValuePair<InstallStep, OptionFormStep>(stpStep, ofsStep));
			}
			m_intCurrentStep = -1;
			StepForward();
		}
Пример #2
0
        /// <summary>
        /// A simple constructor that initializes the object with the given values.
        /// </summary>
        /// <param name="p_xcsScript">The install script.</param>
        /// <param name="p_hifHeaderInfo">Information describing the form header.</param>
        /// <param name="p_csmStateManager">The install state manager.</param>
        /// <param name="p_lstInstallSteps">The install steps.</param>
        public OptionsForm(XmlScript p_xcsScript, HeaderInfo p_hifHeaderInfo, ConditionStateManager p_csmStateManager, IList <InstallStep> p_lstInstallSteps)
        {
            m_xcsScript       = p_xcsScript;
            m_csmStateManager = p_csmStateManager;
            InitializeComponent();
            hplTitle.Text         = p_hifHeaderInfo.Title;
            hplTitle.Image        = p_hifHeaderInfo.ShowImage ? p_csmStateManager.GetImage(p_hifHeaderInfo.ImagePath) : null;
            hplTitle.ShowFade     = p_hifHeaderInfo.ShowFade;
            hplTitle.ForeColor    = p_hifHeaderInfo.TextColour;
            hplTitle.TextPosition = p_hifHeaderInfo.TextPosition;
            if (p_hifHeaderInfo.Height > hplTitle.Height)
            {
                hplTitle.Height = p_hifHeaderInfo.Height;
            }

            foreach (InstallStep stpStep in p_lstInstallSteps)
            {
                OptionFormStep ofsStep = new OptionFormStep(m_csmStateManager, stpStep.OptionGroups);
                ofsStep.Dock         = DockStyle.Fill;
                ofsStep.Visible      = false;
                ofsStep.ItemChecked += new EventHandler(ofsStep_ItemChecked);
                pnlWizardSteps.Controls.Add(ofsStep);
                m_lstInstallSteps.Add(new KeyValuePair <InstallStep, OptionFormStep>(stpStep, ofsStep));
            }
            m_intCurrentStep = -1;
            StepForward();
        }
Пример #3
0
 /// <summary>
 /// Handles the SelectedIndexChanged event of the list view of plugins.
 /// </summary>
 /// <remarks>
 /// This changes the displayed description to that of the selected plugin.
 /// </remarks>
 /// <param name="sender">The object that triggered the event.</param>
 /// <param name="e">An <see cref="EventArgs"/> describing the event arguments.</param>
 private void lvwPlugins_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lvwPlugins.SelectedItems.Count > 0)
     {
         Option optOption = (Option)lvwPlugins.SelectedItems[0].Tag;
         tbxDescription.Text = optOption.Description;
         pbxImage.Image      = m_csmStateManager.GetImage(optOption.ImagePath);
     }
     else
     {
         tbxDescription.Text = "";
         pbxImage.Image      = null;
     }
     sptImage.Panel2Collapsed = (pbxImage.Image == null);
 }