public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { var editSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); ClusterEnvironment env = (ClusterEnvironment)value; ClusterSelector selector = new ClusterSelector(env); if (editSvc.ShowDialog(selector) == DialogResult.OK) { return new ClusterEnvironment(selector.Description); } return value; }
public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { var editSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); ClusterEnvironment env = (ClusterEnvironment)value; ClusterSelector selector = new ClusterSelector(env); if (editSvc.ShowDialog(selector) == DialogResult.OK) { return(new ClusterEnvironment(selector.Description)); } return(value); }