public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { // Uses the IWindowsFormsEditorService to display a // drop-down UI in the Properties window. IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService) provider.GetService(typeof (IWindowsFormsEditorService)); if (edSvc != null) { CubeMapEditorForm view = new CubeMapEditorForm(value as CubeMap); if (view.ShowDialog() == DialogResult.OK) { return view.CubeMap; } } return value; }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { // Uses the IWindowsFormsEditorService to display a // drop-down UI in the Properties window. IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { CubeMapEditorForm view = new CubeMapEditorForm(value as CubeMap); if (view.ShowDialog() == DialogResult.OK) { return(view.CubeMap); } } return(value); }