public override bool EditComponent(ITypeDescriptorContext context, object obj, IWin32Window parent)
 {
     bool flag = false;
     bool inTemplateModeInternal = false;
     IComponent component = (IComponent) obj;
     ISite site = component.Site;
     if (site != null)
     {
         IDesignerHost service = (IDesignerHost) site.GetService(typeof(IDesignerHost));
         TemplatedControlDesigner designer = (TemplatedControlDesigner) service.GetDesigner(component);
         inTemplateModeInternal = designer.InTemplateModeInternal;
     }
     if (!inTemplateModeInternal)
     {
         System.Type[] componentEditorPages = this.GetComponentEditorPages();
         if ((componentEditorPages != null) && (componentEditorPages.Length != 0))
         {
             ComponentEditorForm form = new ComponentEditorForm(obj, componentEditorPages);
             if (!string.Equals(System.Design.SR.GetString("RTL"), "RTL_False", StringComparison.Ordinal))
             {
                 form.RightToLeft = RightToLeft.Yes;
                 form.RightToLeftLayout = true;
             }
             if (form.ShowForm(parent, this.GetInitialComponentEditorPageIndex()) == DialogResult.OK)
             {
                 flag = true;
             }
         }
         return flag;
     }
     System.Windows.Forms.Design.RTLAwareMessageBox.Show(null, System.Design.SR.GetString("BDL_TemplateModePropBuilder"), System.Design.SR.GetString("BDL_PropertyBuilder"), MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1, 0);
     return flag;
 }
Ejemplo n.º 2
0
		public virtual bool EditComponent (ITypeDescriptorContext context, object component, IWin32Window owner)
		{
			ComponentEditorForm f = new ComponentEditorForm (component, GetComponentEditorPages ());
			if (f.ShowForm (owner, GetInitialComponentEditorPageIndex ()) == DialogResult.OK)
				return true;
			return false;
		}
        public virtual bool EditComponent(ITypeDescriptorContext context, object component, IWin32Window owner)
        {
            ComponentEditorForm f = new ComponentEditorForm(component, GetComponentEditorPages());

            if (f.ShowForm(owner, GetInitialComponentEditorPageIndex()) == DialogResult.OK)
            {
                return(true);
            }
            return(false);
        }
Ejemplo n.º 4
0
        /// <summary>
        ///  Activates the advanced UI used to edit the component.
        /// </summary>
        public virtual bool EditComponent(ITypeDescriptorContext context, object component, IWin32Window owner)
        {
            Type[] pageControlTypes = GetComponentEditorPages();
            if (pageControlTypes == null || pageControlTypes.Length == 0)
            {
                return(false);
            }

            ComponentEditorForm form = new ComponentEditorForm(component, pageControlTypes);

            return(form.ShowForm(owner, GetInitialComponentEditorPageIndex()) == DialogResult.OK);
        }
 public virtual bool EditComponent(ITypeDescriptorContext context, object component, IWin32Window owner)
 {
     bool flag = false;
     System.Type[] componentEditorPages = this.GetComponentEditorPages();
     if ((componentEditorPages != null) && (componentEditorPages.Length != 0))
     {
         ComponentEditorForm form = new ComponentEditorForm(component, componentEditorPages);
         if (form.ShowForm(owner, this.GetInitialComponentEditorPageIndex()) == DialogResult.OK)
         {
             flag = true;
         }
     }
     return flag;
 }
        /// <include file='doc\WinFormsComponentEditor.uex' path='docs/doc[@for="WindowsFormsComponentEditor.EditComponent2"]/*' />
        /// <devdoc>
        ///    <para> 
        ///       Activates the advanced UI used to edit the component.</para>
        /// </devdoc>
        public virtual bool EditComponent(ITypeDescriptorContext context, object component, IWin32Window owner) {
            bool changed = false;
            Type[] pageControlTypes = GetComponentEditorPages();

            if ((pageControlTypes != null) && (pageControlTypes.Length != 0)) {
                ComponentEditorForm form = new ComponentEditorForm(component,
                                                                   pageControlTypes);

                if (form.ShowForm(owner, GetInitialComponentEditorPageIndex()) == DialogResult.OK)
                    changed = true;
            }

            return changed;
        }
Ejemplo n.º 7
0
        public virtual bool EditComponent(ITypeDescriptorContext context, object component, IWin32Window owner)
        {
            bool flag = false;

            System.Type[] componentEditorPages = this.GetComponentEditorPages();
            if ((componentEditorPages != null) && (componentEditorPages.Length != 0))
            {
                ComponentEditorForm form = new ComponentEditorForm(component, componentEditorPages);
                if (form.ShowForm(owner, this.GetInitialComponentEditorPageIndex()) == DialogResult.OK)
                {
                    flag = true;
                }
            }
            return(flag);
        }
Ejemplo n.º 8
0
        /// <include file='doc\WinFormsComponentEditor.uex' path='docs/doc[@for="WindowsFormsComponentEditor.EditComponent2"]/*' />
        /// <devdoc>
        ///    <para>
        ///       Activates the advanced UI used to edit the component.</para>
        /// </devdoc>
        public virtual bool EditComponent(ITypeDescriptorContext context, object component, IWin32Window owner)
        {
            bool changed = false;

            Type[] pageControlTypes = GetComponentEditorPages();

            if ((pageControlTypes != null) && (pageControlTypes.Length != 0))
            {
                ComponentEditorForm form = new ComponentEditorForm(component,
                                                                   pageControlTypes);

                if (form.ShowForm(owner, GetInitialComponentEditorPageIndex()) == DialogResult.OK)
                {
                    changed = true;
                }
            }

            return(changed);
        }