protected override TControl Create(PropertyManagerPageGroupBase group, IAttributeSet atts, IMetadata[] metadata, ref int numberOfUsedIds)
        {
            var opts = GetControlOptions(atts);

            TControlSw swCtrl;
            IPropertyManagerPageLabel label;

            if (group is PropertyManagerPageGroupControl)
            {
                var grp = (group as PropertyManagerPageGroupControl).Group;
                AddLabelIfNeeded(grp, atts, ref numberOfUsedIds, out label);
                swCtrl = CreateSwControl(grp, opts, atts) as TControlSw;
            }
            else if (group is PropertyManagerPageTabControl)
            {
                var tab = (group as PropertyManagerPageTabControl).Tab;
                AddLabelIfNeeded(tab, atts, ref numberOfUsedIds, out label);
                swCtrl = CreateSwControl(tab, opts, atts) as TControlSw;
            }
            else
            {
                throw new NotSupportedException("Type of group is not supported");
            }

            AssignControlAttributes(swCtrl, opts, atts);

            return(CreateControl(swCtrl, atts, metadata, group.Handler, opts.Height, label));
        }
Пример #2
0
        protected override TControl Create(PropertyManagerPageGroupBase group, IAttributeSet atts)
        {
            var opts = GetControlOptions(atts);

            TControlSw swCtrl = null;

            if (group is PropertyManagerPageGroupControl)
            {
                swCtrl = CreateSwControlInGroup((group as PropertyManagerPageGroupControl).Group, opts, atts) as TControlSw;
            }
            else if (group is PropertyManagerPageTabControl)
            {
                swCtrl = CreateSwControlInTab((group as PropertyManagerPageTabControl).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));
        }
 protected override PropertyManagerPageOptionBoxControl Create(PropertyManagerPageGroupBase group, IAttributeSet atts, ref int idRange)
 {
     idRange = EnumExtension.GetEnumFields(atts.BoundType).Count;
     return(base.Create(group, atts));
 }
Пример #4
0
 protected override PropertyManagerPageOptionBoxControl Create(PropertyManagerPageGroupBase group, IAttributeSet atts, IMetadata[] metadata, ref int numberOfUsedIds)
 {
     numberOfUsedIds = EnumExtension.GetEnumFields(atts.ContextType).Count;
     return(base.Create(group, atts, metadata, ref numberOfUsedIds));
 }