public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context != null && context.Instance != null && provider != null) { Settings settings = context.Instance as Settings; WinLIRCMappingEditorForm dlg = new WinLIRCMappingEditorForm(settings); if (dlg.ShowDialog() == DialogResult.OK) { return(dlg.WinLIRCCommandMapping); } else { return(settings.WinLIRCCommandMapping); } } return(null); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context != null && context.Instance != null && provider != null) { Settings settings = context.Instance as Settings; WinLIRCMappingEditorForm dlg = new WinLIRCMappingEditorForm(settings); if(dlg.ShowDialog() == DialogResult.OK) return dlg.WinLIRCCommandMapping; else return settings.WinLIRCCommandMapping; } return null; }