コード例 #1
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;            
        }
コード例 #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);
        }