public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { //object o = base.EditValue(context, provider, value); //return o; PropertyEditors.AliasItem it = value as PropertyEditors.AliasItem; return(PropertyEditors.AliasTable.EditorInterface.Edit(it)); }
AliasItem IAliasEditorInteface.Edit(AliasItem item) { FormStandardAliasEditor form = new FormStandardAliasEditor(item); form.ShowDialog(); return(item); }
public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(string) & value is AliasItem) { AliasItem it = value as AliasItem; return(AliasTable.EditorInterface.GetText(it.Alias, it.Name)); } return(base.ConvertTo(context, culture, value, destinationType)); }
/// <summary> /// Consructor /// </summary> /// <param name="item">The item</param> public FormStandardAliasEditor(PropertyEditors.AliasItem item) : this() { this.LoadControlResources(ControlUtilites.Resources); this.item = item; Text = Text + " [" + item.Name + "]"; bt = AliasTypeDetector.Detector.DetectType(item.Value); dim = AliasTypeDetector.Detector.GetDimension(bt); if (dim != null) { bt = AliasTypeDetector.Detector.GetBaseType(bt); } Set(); fill(); }
internal AliasItemDescriptor(AliasItem item, bool isDouble) : base(item.Name + ((isDouble) ? " (real)": ""), null) { this.item = item; this.isDouble = isDouble; }