示例#1
0
 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));
 }
示例#2
0
        AliasItem IAliasEditorInteface.Edit(AliasItem item)
        {
            FormStandardAliasEditor form = new FormStandardAliasEditor(item);

            form.ShowDialog();
            return(item);
        }
示例#3
0
 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();
 }
示例#5
0
 internal AliasItemDescriptor(AliasItem item, bool isDouble)
     : base(item.Name + ((isDouble) ? " (real)": ""), null)
 {
     this.item     = item;
     this.isDouble = isDouble;
 }