Beispiel #1
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (provider != null)
     {
         IWindowsFormsEditorService winFormsService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
         if (winFormsService == null)
         {
             return(value);
         }
         if (this._colorUI == null)
         {
             this._colorUI = new ColorHlsUI(this);
         }
         this._colorUI.Start(winFormsService, value);
         winFormsService.DropDownControl(this._colorUI);
         value = this._colorUI.Value;
         this._colorUI.End();
     }
     return(value);
 }
Beispiel #2
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (provider != null)
     {
         IWindowsFormsEditorService winFormsService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
         if (winFormsService == null)
         {
             return value;
         }
         if (this._colorUI == null)
         {
             this._colorUI = new ColorHlsUI(this);
         }
         this._colorUI.Start(winFormsService, value);
         winFormsService.DropDownControl(this._colorUI);
         value = this._colorUI.Value;
         this._colorUI.End();
     }
     return value;
 }