示例#1
0
        public override bool Equals(object obj)
        {
            PropertyValueDisplayedAsAttribute attribute = obj as PropertyValueDisplayedAsAttribute;

            if (attribute == null)
            {
                return(false);
            }

            if (_childPropertyName.CompareTo(attribute._childPropertyName) != 0)
            {
                return(false);
            }

            if (_displayedStrings != null)
            {
                if (_displayedStrings.Length != attribute._displayedStrings.Length)
                {
                    return(false);
                }

                for (int i = 0; i < _displayedStrings.Length; i++)
                {
                    if (_displayedStrings[i] != attribute._displayedStrings[i])
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }
示例#2
0
        /// <summary>
        /// Clears any previously associated set of displayed strings for this value and reassociates a
        /// new set of strings.
        /// </summary>
        /// <param name="displayedValues">The array of new displayed strings for this value.</param>
        public void ResetDisplayedValues(string[] displayedValues)
        {
            PropertyValueDisplayedAsAttribute attr = new PropertyValueDisplayedAsAttribute(displayedValues);
            SetSingleAttribute(attr);
            ClearStandardValues();

            ExtractDisplayedValues(true);

            if (_look != null)
                _look.ControlHeightMultiplier();
        }