public FieldTypeWrapper(IAttributeField field) { if (field == null) { throw new ArgumentNullException("field"); } _field = field; }
public FieldAdapter(IAttributeField fld) { if (fld == null) { throw new ArgumentNullException("fld"); } Field = fld; }
public FieldOperationGridAdapter(IAttributeField field) { if (field == null) { throw new ArgumentNullException("field"); } _field = field; }
public FindReplaceFieldWrapper(IAttributeField field) { if (field == null) { throw new ArgumentNullException("field"); } Field = field; FieldType = FindReplaceFieldType.Regular; }
public RecalculateFieldWrapper(IAttributeField field) { if (field == null) { throw new ArgumentNullException("field"); } _field = field; Selected = true; Details = string.Empty; Result = RecalculateFieldResult.None; }
public FieldCalculatorModel(IAttributeTable table, IAttributeField field) { if (table == null) { throw new ArgumentNullException("table"); } if (field == null) { throw new ArgumentNullException("field"); } Table = table; Field = field; }
private bool Validate(IAttributeField field) { string errorMessage; bool nameChanged = Model.AddField || (Model.AllowEditing && !field.Name.EqualsIgnoreCase(Model.Field.Name)); if (nameChanged && !Model.Table.ValidateFieldName(field.Name, out errorMessage)) { MessageService.Current.Info(errorMessage); return(false); } return(true); }
public FieldPropertiesModel(IAttributeTable table, IAttributeField field, bool addField, bool allowEditing) { if (table == null) { throw new ArgumentNullException("table"); } if (field == null) { field = new AttributeField(); } Field = field; AddField = addField; Table = table; _allowEditing = allowEditing; }
private bool ApplyValue(AttributeTable table, IAttributeField fld, int fieldIndex, string text) { switch (fld.Type) { case AttributeType.String: { table.EditCellValue(fieldIndex, Model.ShapeIndex, text); break; } case AttributeType.Integer: { int val; if (!Int32.TryParse(text, out val)) { MessageService.Current.Info("Failed to parse integer value: " + text); return(false); } table.EditCellValue(fieldIndex, Model.ShapeIndex, val); break; } case AttributeType.Double: { double val; if (!Double.TryParse(text, out val)) { MessageService.Current.Info("Failed to parse double value: " + text); return(false); } table.EditCellValue(fieldIndex, Model.ShapeIndex, val); break; } } return(true); }
public static Field GetInternal(this IAttributeField field) { return(field.InternalObject as Field); }