public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            var svc = provider.GetService(typeof (IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            var lines = (List<string>)value;
            if (svc != null && lines != null)
            {
                using (var form = new AssemblyReferenceListEditForm())
                {
                    form.Lines = lines.ToArray();
                    if (svc.ShowDialog(form) == DialogResult.OK)
                    {
                        lines = new List<string>(form.Lines);
                    }
                }
            }

            return lines;            
        }
Esempio n. 2
0
        public override object EditValue(ITypeDescriptorContext context, System.IServiceProvider provider, object value)
        {
            var svc   = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            var lines = (List <string>)value;

            if (svc != null && lines != null)
            {
                using (var form = new AssemblyReferenceListEditForm())
                {
                    form.Lines = lines.ToArray();
                    if (svc.ShowDialog(form) == DialogResult.OK)
                    {
                        lines = new List <string>(form.Lines);
                    }
                }
            }

            return(lines);
        }