Пример #1
0
        /// <summary>
        /// Tab constructor
        /// </summary>
        /// <param name="ribbon">the Ribbon that created this Tab and that it is a part of</param>
        /// <param name="id">Component id of the Tab</param>
        /// <param name="title">Title of the Tab</param>
        /// <param name="description">Description of the Tab</param>
        /// <param name="contextual">whether this Tab is a contextual Tab or not</param>
        /// <param name="command">the command for this Tab.  Used in enabling or disabling the tab.</param>
        /// <param name="contextualGroupId">the id of the ContextualGroup that this Tab is a part of.</param>
        internal Tab(SPRibbon ribbon,
                     string id,
                     string title,
                     string description,
                     string command,
                     bool contextual,
                     string contextualGroupId,
                     string cssClass)
            : base(ribbon, id, title, description)
        {
            _lastScalingIndex  = -1;
            _scalingInfo       = new Scaling();
            _contextual        = contextual;
            _contextualGroupId = CUIUtility.SafeString(contextualGroupId);
            _command           = CUIUtility.SafeString(command);
            _cssClass          = CUIUtility.SafeString(cssClass);

            // Contextual tabs are invisible by default
            if (contextual)
            {
                VisibleInternal = false;
            }
#if DEBUG
            if (command == "DEBUG_ALWAYS_ENABLED")
            {
                VisibleInternal = true;
            }
#endif
        }
Пример #2
0
        /// <summary>
        /// Tab constructor
        /// </summary>
        /// <param name="ribbon">the Ribbon that created this Tab and that it is a part of</param>
        /// <param name="id">Component id of the Tab</param>
        /// <param name="title">Title of the Tab</param>
        /// <param name="description">Description of the Tab</param>
        /// <param name="contextual">whether this Tab is a contextual Tab or not</param>
        /// <param name="command">the command for this Tab.  Used in enabling or disabling the tab.</param>
        /// <param name="contextualGroupId">the id of the ContextualGroup that this Tab is a part of.</param>
        internal Tab(SPRibbon ribbon,
                     string id,
                     string title,
                     string description,
                     string command,
                     bool contextual,
                     string contextualGroupId,
                     string cssClass)
            : base(ribbon, id, title, description)
        {
            _lastScalingIndex = -1;
            _scalingInfo = new Scaling();
            _contextual = contextual;
            _contextualGroupId = CUIUtility.SafeString(contextualGroupId);
            _command = CUIUtility.SafeString(command);
            _cssClass = CUIUtility.SafeString(cssClass);

            // Contextual tabs are invisible by default
            if (contextual)
                VisibleInternal = false;
#if DEBUG
            if (command == "DEBUG_ALWAYS_ENABLED")
                VisibleInternal = true;
#endif
        }
Пример #3
0
 internal void SetParent(Scaling parent)
 {
     _scalingInfo = parent;
 }
Пример #4
0
 internal void SetParent(Scaling parent)
 {
     _scalingInfo = parent;
 }