UI decorator base class
Inheritance: BaseDecorator
Example #1
0
        /// <summary>
        /// Removes the specified UI.
        /// </summary>
        /// <param name="ui">The UI.</param>
        /// <exception cref="System.ArgumentNullException">UI component is null.</exception>
        public void Remove(UIBase ui)
        {
            if (ui == null)
            {
                throw new ArgumentNullException("UI component is null.");
            }

            this.entity.RemoveChild(ui.Entity.Name);
        }
Example #2
0
        /// <summary>
        /// Adds the specified UI.
        /// </summary>
        /// <param name="ui">The UI.</param>
        /// <exception cref="System.ArgumentNullException">UI component is null.</exception>
        public void Add(UIBase ui)
        {
            if (ui == null)
            {
                throw new ArgumentNullException("UI component is null.");
            }

            this.entity.AddChild(ui.Entity);
        }