public SymbolRule Add(string name) { SymbolRule symbolRule = new SymbolRule(); symbolRule.Name = name; this.Add(symbolRule); return(symbolRule); }
public override object GetValue(object component) { SymbolRule symbolRule = (SymbolRule)component; if (this.Name == "FromValue") { return(this.field.Parse(symbolRule.FromValue)); } return(this.field.Parse(symbolRule.ToValue)); }
public override void SetValue(object component, object value) { SymbolRule symbolRule = (SymbolRule)component; if (this.Name == "FromValue") { symbolRule.FromValue = Field.ToStringInvariant(value); } else { symbolRule.ToValue = Field.ToStringInvariant(value); } }
public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(value, false); SymbolRule symbolRule = (SymbolRule)value; symbolRule.GetField(); PropertyDescriptorCollection propertyDescriptorCollection = new PropertyDescriptorCollection(null); for (int i = 0; i < properties.Count; i++) { if (properties[i].IsBrowsable) { if (properties[i].Name == "LegendText" && symbolRule.ShowInLegend == "(none)") { propertyDescriptorCollection.Add(TypeDescriptor.CreateProperty(value.GetType(), properties[i], new ReadOnlyAttribute(true))); } else { propertyDescriptorCollection.Add(properties[i]); } } } return(propertyDescriptorCollection); }
protected override void OnInsertComplete(int index, object value) { base.OnInsertComplete(index, value); SymbolRule symbolRule = (SymbolRule)value; }
public void Remove(SymbolRule value) { base.List.Remove(value); }
public int Add(SymbolRule value) { return(base.List.Add(value)); }