/// <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(); }
/// <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(); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_csmStateManager">The install state manager.</param> /// <param name="p_lstGroups">The option groups to display.</param> public OptionFormStep(ConditionStateManager p_csmStateManager, IList<OptionGroup> p_lstGroups) { m_csmStateManager = p_csmStateManager; InitializeComponent(); LoadOptions(p_lstGroups); if (lvwPlugins.Items.Count > 0) lvwPlugins.Items[0].Selected = true; }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_csmStateManager">The install state manager.</param> /// <param name="p_lstGroups">The option groups to display.</param> public OptionFormStep(ConditionStateManager p_csmStateManager, IList <OptionGroup> p_lstGroups) { m_csmStateManager = p_csmStateManager; InitializeComponent(); LoadOptions(p_lstGroups); if (lvwPlugins.Items.Count > 0) { lvwPlugins.Items[0].Selected = true; } }
/// <summary> /// Gets a message describing whether or not the condition is fulfilled. /// </summary> /// If the dependency is fulfilled the message is "Passed." If the dependency is not fulfilled the /// message informs the user of the installed version. /// <param name="p_csmStateManager">The manager that tracks the currect install state.</param> /// <returns>A message describing whether or not the condition is fulfilled.</returns> /// <seealso cref="ICondition.GetMessage(ConditionStateManager)"/> public override string GetMessage(ConditionStateManager p_csmStateManager) { Version verInstalledVersion = ((SkyrimGameMode)p_csmStateManager.GameMode).ScriptExtenderVersion; if (verInstalledVersion == null) { return(String.Format("This mod requires SKSE v{0} or higher. Please download from http://skse.silverlock.org", MinimumVersion)); } else if (verInstalledVersion < MinimumVersion) { return(String.Format("This mod requires SKSE v{0} or higher. You have {1}. Please update from http://skse.silverlock.org", MinimumVersion, verInstalledVersion)); } else { return("Passed"); } }
/// <summary> /// Gets whether or not the condition is fulfilled. /// </summary> /// <remarks> /// The dependency is fulfilled if the specified minimum version of /// SKSE is installed. /// </remarks> /// <param name="p_csmStateManager">The manager that tracks the currect install state.</param> /// <returns><c>true</c> if the condition is fulfilled; /// <c>false</c> otherwise.</returns> /// <seealso cref="ICondition.GetIsFulfilled(ConditionStateManager)"/> public override bool GetIsFulfilled(ConditionStateManager p_csmStateManager) { Version verInstalledVersion = ((SkyrimGameMode)p_csmStateManager.GameMode).ScriptExtenderVersion; return((verInstalledVersion != null) && (verInstalledVersion >= MinimumVersion)); }