protected override PropertyManagerPageGroupBaseEx <THandler> Create(
            PropertyManagerPageGroupBaseEx <THandler> group, IAttributeSet atts)
        {
            if (group is PropertyManagerPageTabEx <THandler> )
            {
                var grp = (group as PropertyManagerPageTabEx <THandler>).Tab.AddGroupBox(atts.Id, atts.Name,
                                                                                         (int)(swAddGroupBoxOptions_e.swGroupBoxOptions_Expanded
                                                                                               | swAddGroupBoxOptions_e.swGroupBoxOptions_Visible)) as SolidWorks.Interop.sldworks.IPropertyManagerPageGroup;

                return(new PropertyManagerPageGroupEx <THandler>(atts.Id, atts.Tag,
                                                                 group.Handler, grp, group.App, group.ParentPage));
            }
            //NOTE: nested groups are not supported in SOLIDWORKS, creating the group in page instead
            else if (group is PropertyManagerPageGroupEx <THandler> )
            {
                return(Create(group.ParentPage, atts));
            }
            else
            {
                throw new NullReferenceException("Not supported group type");
            }
        }
        protected override TControl Create(PropertyManagerPageGroupBaseEx <THandler> group, IAttributeSet atts)
        {
            var opts = GetControlOptions(atts);

            TControlSw swCtrl = null;

            if (group is PropertyManagerPageGroupEx <THandler> )
            {
                swCtrl = CreateSwControlInGroup((group as PropertyManagerPageGroupEx <THandler>).Group, opts, atts) as TControlSw;
            }
            else if (group is PropertyManagerPageTabEx <THandler> )
            {
                swCtrl = CreateSwControlInTab((group as PropertyManagerPageTabEx <THandler>).Tab, opts, atts) as TControlSw;
            }
            else
            {
                throw new NotSupportedException("Type of group is not supported");
            }

            AssignControlAttributes(swCtrl, opts, atts);

            return(CreateControl(swCtrl, atts, group.Handler, opts.Height));
        }
示例#3
0
 protected override PropertyManagerPageGroupBaseEx <THandler> Create(PropertyManagerPageGroupBaseEx <THandler> group, IAttributeSet atts)
 {
     //NOTE: nested tabs are not supported in SOLIDWORKS, creating the group in page instead
     return(Create(group.ParentPage, atts));
 }
示例#4
0
 protected override PropertyManagerPageOptionBoxEx Create(PropertyManagerPageGroupBaseEx <THandler> group, IAttributeSet atts, ref int idRange)
 {
     idRange = Helper.GetEnumFields(atts.BoundType).Count;
     return(base.Create(group, atts));
 }