Ejemplo n.º 1
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (edSvc == null)
            {
                return(null);
            }

            using (FormatterSettingsForm form = new FormatterSettingsForm(value as RecordFormatterSettings))
            {
                if (edSvc.ShowDialog(form) == DialogResult.OK)
                {
                    return(form.FormatterSettings);
                }
            }

            return(value);
        }
Ejemplo n.º 2
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
            if (edSvc == null)
            {
                return null;
            }

            using (FormatterSettingsForm form = new FormatterSettingsForm(value as RecordFormatterSettings))
            {
                if (edSvc.ShowDialog(form) == DialogResult.OK)
                {
                    return form.FormatterSettings;
                }
            }

            return value;
        }