public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { // Get the help attribute item collection MSHelpAttrCollection items = value as MSHelpAttrCollection; if(context == null || provider == null || context.Instance == null || items == null) return base.EditValue(context, provider, value); bool isTopic = (context.Instance.GetType() == typeof(Topic)); using(MSHelpAttrEditorDlg dlg = new MSHelpAttrEditorDlg(items, isTopic)) { dlg.ShowDialog(); } return value; }
public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) { // Get the help attribute item collection MSHelpAttrCollection items = value as MSHelpAttrCollection; if (context == null || provider == null || context.Instance == null || items == null) { return(base.EditValue(context, provider, value)); } bool isTopic = (context.Instance.GetType() == typeof(Topic)); using (MSHelpAttrEditorDlg dlg = new MSHelpAttrEditorDlg(items, isTopic)) { dlg.ShowDialog(); } return(value); }