void CreateComparison(object instance, PropertyInfo propertyInfo, DesignTimePropertyAttributes propertyAttributes)
        {
            PropertyValueData propertyValueData = new PropertyValueData(instance, propertyInfo, propertyAttributes.DisplayText, propertyAttributes.NumDigits, propertyAttributes.DependentProperty);

            propertyValueData.FirstInstance = instance;
            Comparisons.Add(propertyValueData);
        }
Ejemplo n.º 2
0
 public virtual void Initialize(PropertyValueData propertyValueData)
 {
     PropertyName = propertyValueData.Name;
     PropertyType = propertyValueData.Type;
     AddLabel(propertyValueData.DisplayText);
     DependentProperty = propertyValueData.DependentProperty;
 }
        public void Compare(object stampProperties)
        {
            PropertyInfo[] properties = stampProperties.GetType().GetProperties();
            foreach (PropertyInfo propertyInfo in properties)
            {
                if (!ReflectionHelper.IsEditable(propertyInfo))
                {
                    continue;
                }

                DesignTimePropertyAttributes designTimePropertyAttributes = GetDesignTimePropertyAttributes(propertyInfo);

                PropertyValueData existingComparison = GetComparison(propertyInfo.Name);
                if (existingComparison == null)
                {
                    CreateComparison(stampProperties, propertyInfo, designTimePropertyAttributes);
                }
                else
                {
                    existingComparison.Compare(stampProperties, propertyInfo);
                }
            }
        }
Ejemplo n.º 4
0
 public override void Initialize(PropertyValueData propertyValueData)
 {
     base.Initialize(propertyValueData);
     DecimalPoints = propertyValueData.NumDecimalPlaces;
 }