public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context != null && context.Instance != null && provider != null) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { SubMeshCollection subMeshes = value as SubMeshCollection; if (subMeshes != null) { SubMeshDialog subMeshEditor = new SubMeshDialog(subMeshes); if ( edSvc.ShowDialog(subMeshEditor) == DialogResult.OK ) { return subMeshEditor.SubMeshCollection; } } } } return value; }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context != null && context.Instance != null && provider != null) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { SubMeshCollection subMeshes = value as SubMeshCollection; if (subMeshes != null) { SubMeshDialog subMeshEditor = new SubMeshDialog(subMeshes); if (edSvc.ShowDialog(subMeshEditor) == DialogResult.OK) { return(subMeshEditor.SubMeshCollection); } } } } return(value); }