public MpeItemManager(MpeItemManager manager) : this() { values = new MpeItemCollection(manager.values); first = manager.first; last = manager.last; interval = manager.interval; digits = manager.digits; }
public MpeItemCollection(MpeItemCollection items) { type = items.type; for (int i = 0; i < items.Count; i++) { Add(new MpeItem(items[i])); } }
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destType) { if (destType == typeof(string) && value is MpeItemCollection) { MpeItemCollection c = (MpeItemCollection)value; if (c.Count > 0) { return("(Collection)"); } return("(Empty)"); } return(base.ConvertTo(context, culture, value, destType)); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (value is MpeItemCollection) { MpeItemCollection c = (MpeItemCollection)value; if (c.Type == MpeItemType.Text) { return(base.EditValue(context, provider, value)); } else { MpeLog.Warn("To edit this collection set the First, Last, Interval, and Digits properties."); } } return(value); }
public MpeItemManager() { values = new MpeItemCollection(); values.Type = MpeItemType.Text; Type = MpeItemType.Integer; }