/// <summary>
 /// Edits the given value, returning the editing results.
 /// </summary>
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (provider != null)
     {
         IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
         if (edSvc != null)
         {
             if (_editorUI == null)
             {
                 _editorUI = new MultilineStringEditorUI();
             }
             _editorUI.BeginEdit(edSvc, value);
             edSvc.DropDownControl(_editorUI);
             object newValue = _editorUI.Value;
             if (_editorUI.EndEdit())
             {
                 value = newValue;
             }
         }
     }
     return(value);
 }
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (provider != null)
     {
         IWindowsFormsEditorService editorService = (IWindowsFormsEditorService) provider.GetService(typeof(IWindowsFormsEditorService));
         if (editorService == null)
         {
             return value;
         }
         if (this._editorUI == null)
         {
             this._editorUI = new MultilineStringEditorUI();
         }
         this._editorUI.BeginEdit(editorService, value);
         editorService.DropDownControl(this._editorUI);
         object obj2 = this._editorUI.Value;
         if (this._editorUI.EndEdit())
         {
             value = obj2;
         }
     }
     return value;
 }
Exemple #3
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (provider != null)
     {
         IWindowsFormsEditorService editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
         if (editorService == null)
         {
             return(value);
         }
         if (this._editorUI == null)
         {
             this._editorUI = new MultilineStringEditorUI();
         }
         this._editorUI.BeginEdit(editorService, value);
         editorService.DropDownControl(this._editorUI);
         object obj2 = this._editorUI.Value;
         if (this._editorUI.EndEdit())
         {
             value = obj2;
         }
     }
     return(value);
 }