Ejemplo n.º 1
0
        /// <summary>
        /// Gets a property value as a tri-state checkbox value.
        /// </summary>
        /// <param name="propertyName">Name of the property to get.</param>
        /// <returns>Boolean check state, or Indeterminate if the property is
        /// inconsistent across configurations.</returns>
        public virtual CheckState GetPropertyCheckState(string propertyName)
        {
            ProjectProperty property = new ProjectProperty(this.ProjectMgr, propertyName);
            bool?           value    = property.GetBooleanValue(this.projectConfigs);

            if (!value.HasValue)
            {
                return(CheckState.Indeterminate);
            }
            else
            {
                return(value.Value ? CheckState.Checked : CheckState.Unchecked);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets a property value as a tri-state checkbox value.
        /// </summary>
        /// <param name="propertyName">Name of the property to get.</param>
        /// <returns>Boolean check state, or Indeterminate if the property is
        /// inconsistent across configurations.</returns>
        public virtual CheckState GetPropertyCheckState(string propertyName)
        {
            ProjectProperty property = new ProjectProperty(this.ProjectMgr, propertyName);
            bool? value = property.GetBooleanValue(this.projectConfigs);

            if (!value.HasValue)
            {
                return CheckState.Indeterminate;
            }
            else
            {
                return value.Value ? CheckState.Checked : CheckState.Unchecked;
            }
        }