Ejemplo n.º 1
0
        public override Object EditValue(ITypeDescriptorContext context, IServiceProvider provider, Object value)
        {
            if ((context != null) && (provider != null))
            {
                System.Windows.Forms.Design.IWindowsFormsEditorService svc = (System.Windows.Forms.Design.IWindowsFormsEditorService)
                  provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

                if (svc != null)
                {
                    using (StringEditorWindow ipfrm = new StringEditorWindow((string)value))
                    {
                        ipfrm.ShowDialog();
                        value = ipfrm.Value;
                    }
                }
            }

            return base.EditValue(context, provider, value);
        }
Ejemplo n.º 2
0
        public override Object EditValue(ITypeDescriptorContext context, IServiceProvider provider, Object value)
        {
            if ((context != null) && (provider != null))
            {
                System.Windows.Forms.Design.IWindowsFormsEditorService svc = (System.Windows.Forms.Design.IWindowsFormsEditorService)
                                                                             provider.GetService(typeof(System.Windows.Forms.Design.IWindowsFormsEditorService));

                if (svc != null)
                {
                    using (StringEditorWindow ipfrm = new StringEditorWindow((string)value))
                    {
                        ipfrm.ShowDialog();
                        value = ipfrm.Value;
                    }
                }
            }

            return(base.EditValue(context, provider, value));
        }