예제 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposedValue)
     {
         if (disposing && this._EnumList != null)
         {
             this._EnumList.Dispose();
             this._EnumList = null;
         }
     }
     this.disposedValue = true;
 }
예제 #2
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.PropertyDescriptor == null)) || (context.PropertyDescriptor.PropertyType == null))
         {
             return(value);
         }
         if (this._EnumList == null)
         {
             this._EnumList = new EnumListBox(this);
         }
         this._EnumList.Start(edSvc, context.PropertyDescriptor.PropertyType, value);
         edSvc.DropDownControl(this._EnumList);
         if (this._EnumList.Value != null)
         {
             value = this._EnumList.Value;
         }
         this._EnumList.End();
     }
     return(value);
 }