예제 #1
0
            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);
            }
예제 #2
0
파일: Settings.cs 프로젝트: dgis/CodeTV
            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;
            }