예제 #1
0
 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;
 }
예제 #2
0
        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);
        }