Exemplo n.º 1
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (provider != null)
     {
         IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
         if (edSvc == null || context == null)
         {
             return(value);
         }
         if ((context.Instance == null) || !(context.Instance is IField))
         {
             return(base.EditValue(context, provider));
         }
         if (this._dataFieldList == null)
         {
             this._dataFieldList = new CurrencyIdListBox(this);
         }
         this._dataFieldList.Start(edSvc, value);
         edSvc.DropDownControl(this._dataFieldList);
         if (this._dataFieldList.Value != null)
         {
             value = this._dataFieldList.Value;
         }
         this._dataFieldList.End();
     }
     return(value);
 }
Exemplo n.º 2
0
 protected virtual void Dispose(bool disposing)
 {
     if ((!this.disposedValue && disposing) && (this._dataFieldList != null))
     {
         this._dataFieldList.Dispose();
         this._dataFieldList = null;
     }
     this.disposedValue = true;
 }