Esempio n. 1
0
        /// <summary>
        /// Adds a row for a float property
        /// </summary>
        /// <param name="obj">preferences object</param>
        /// <param name="property">the float property</param>
        /// <param name="attr">descriptor for the property</param>
        private void addFloatRow(object obj, PropertyInfo property, FloatDescriptorAttribute attr)
        {
            String range = attr.MinValue + " to " + attr.MaxValue;

            int rowNum = dataGridView.Rows.Add(property.Name,
                                               attr.Description,
                                               property.GetValue(obj, null).ToString(),
                                               getDefaultValue(property.Name),
                                               range);

            dataGridView.Rows[rowNum].Tag = property;
        }
Esempio n. 2
0
        /// <summary>
        /// Adds a row for a float field
        /// </summary>
        /// <param name="obj">preferences object</param>
        /// <param name="fieldInfo">the float field</param>
        /// <param name="attr">descriptor for the field</param>
        private void addFloatRow(object obj, FieldInfo fieldInfo, FloatDescriptorAttribute attr)
        {
            String range = attr.MinValue + " to " + attr.MaxValue;

            int rowNum = dataGridView.Rows.Add(fieldInfo.Name,
                                               attr.Description,
                                               fieldInfo.GetValue(obj).ToString(),
                                               getDefaultValue(fieldInfo.Name),
                                               range);

            dataGridView.Rows[rowNum].Tag = fieldInfo;
        }