Example #1
0
        /// -----------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="ControlGroup"/> class.
        /// </summary>
        /// -----------------------------------------------------------------------------------
        public ChoiceGroup(Mediator mediator, IUIAdapter adapter, XmlNode configurationNode, ChoiceGroup parent)
            : base(mediator, adapter, configurationNode)
        {
            m_parent = parent;

            //allow for a command to be attached to a group (todo: should be for tree groups only)
            //as it doesn't make sense for some menus or command bars to have an associated command.
            //for now, leave it to the schema to prevent anything but the right element from having the command attribute.
            if (XmlUtils.GetAttributeValue(m_configurationNode, "command") != null)
            {
                m_treeGroupCommandChoice = new CommandChoice(mediator, configurationNode, adapter, this);
            }
        }
Example #2
0
        /// -----------------------------------------------------------------------------------
        /// <summary>
        /// Initializes a new instance of the <see cref="ControlGroup"/> class.
        /// </summary>
        /// -----------------------------------------------------------------------------------
        public ChoiceGroup(Mediator mediator, IUIAdapter adapter, XmlNode configurationNode, ChoiceGroup parent)
            : base(mediator, adapter, configurationNode)
        {
            m_parent = parent;

            //allow for a command to be attached to a group (todo: should be for tree groups only)
            //as it doesn't make sense for some menus or command bars to have an associated command.
            //for now, leave it to the schema to prevent anything but the right element from having the command attribute.
            if (XmlUtils.GetAttributeValue(m_configurationNode,"command") != null)
            {
                m_treeGroupCommandChoice = new CommandChoice(mediator, configurationNode, adapter, this);
            }
        }