Пример #1
0
        /// <summary>
        /// Binds the properties from the MSBuild project file to the controls on the property page.
        /// </summary>
        protected internal override void BindProperties()
        {
            base.BindProperties();

            WixOutputType projectType = this.ParentPropertyPage.ProjectMgr.OutputType;

            this.linkerLibrarianLabel.Text   = (projectType == WixOutputType.Library ? WixStrings.Librarian : WixStrings.Linker);
            this.linkerTextBox.Visible       = (projectType != WixOutputType.Library);
            this.librarianTextBox.Visible    = (projectType == WixOutputType.Library);
            this.suppressIceCheckbox.Enabled = (projectType != WixOutputType.Library && projectType != WixOutputType.Bundle);
            this.specificIceTextBox.Enabled  = (projectType != WixOutputType.Library && projectType != WixOutputType.Bundle);
        }
        // =========================================================================================
        // Methods
        // =========================================================================================

        /// <summary>
        /// Binds the properties from the MSBuild project file to the controls on the property page.
        /// </summary>
        protected internal override void BindProperties()
        {
            base.BindProperties();

            WixOutputType projectType = this.ParentPropertyPage.ProjectMgr.OutputType;

            this.defineVariablesTextBox.Enabled = (projectType != WixOutputType.Library);
            this.culturesTextBox.Enabled        = (projectType != WixOutputType.Library && projectType != WixOutputType.Bundle);
            this.leaveTempFilesCheckBox.Enabled = (projectType != WixOutputType.Library);
            this.suppressWixPdbCheckBox.Enabled = (projectType != WixOutputType.Library);
            this.bindFilesCheckBox.Enabled      = (projectType == WixOutputType.Library);

            this.suppressedWarningsText.Enabled   = this.warningLevelCombo.SelectedIndex != 0;
            this.warningsAsErrorsCheckBox.Enabled = this.warningLevelCombo.SelectedIndex != 0;
        }
Пример #3
0
 /// <summary>
 /// Sets a project property.
 /// </summary>
 /// <param name="propertyName">Name of the property to set.</param>
 /// <param name="value">Value of the property.</param>
 public override void SetProperty(string propertyName, string value)
 {
     if (propertyName == WixProjectFileConstants.OutputType)
     {
         WixOutputType outputType = (WixOutputType)Int32.Parse(value, CultureInfo.InvariantCulture);
         if (Enum.IsDefined(typeof(WixOutputType), outputType) && outputType != this.ProjectMgr.OutputType)
         {
             base.SetProperty(propertyName, outputType.ToString());
             this.IsDirty = true;
             this.ProjectMgr.OnOutputTypeChanged();
         }
     }
     else
     {
         base.SetProperty(propertyName, value);
     }
 }
Пример #4
0
        // =========================================================================================
        // Methods
        // =========================================================================================

        /// <summary>
        /// Gets a project property.
        /// </summary>
        /// <param name="propertyName">The name of the property to get.</param>
        /// <returns>
        /// Value of the property, or null if the property is unset or inconsistent across configurations.
        /// </returns>
        public override string GetProperty(string propertyName)
        {
            string value = base.GetProperty(propertyName);

            if (propertyName == WixProjectFileConstants.OutputType && value != null)
            {
                try
                {
                    WixOutputType outputType = (WixOutputType)Enum.Parse(typeof(WixOutputType), value, true);
                    value = ((int)outputType).ToString(CultureInfo.InvariantCulture);
                }
                catch (ArgumentException)
                {
                    value = null;
                }
            }

            return(value);
        }
Пример #5
0
        void RefreshOutputFileNameTextBox(object sender, EventArgs e)
        {
            WixOutputType outputType = (WixOutputType)(Get <ComboBox>("outputType").SelectedIndex);

            Get <TextBox>("outputFileName").Text = Get <TextBox>("outputName").Text + WixProject.GetInstallerExtension(outputType.ToString());
        }