public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context != null && context.Instance != null && provider != null) { edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { frmMatEditor matEdit = new frmMatEditor(); matEdit.Init(); matEdit.Material = (Material)value; matEdit.ShowDialog(); if (matEdit.DialogResult == DialogResult.OK) { return(matEdit.Material); } } } return(value); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context != null && context.Instance != null && provider != null) { edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { frmMatEditor matEdit = new frmMatEditor(); matEdit.Init(); matEdit.Material = (Material)value; matEdit.ShowDialog(); if (matEdit.DialogResult == DialogResult.OK) { return matEdit.Material; } } } return value; }