UI decorator base class
Inheritance: BaseDecorator
Esempio n. 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);
        }
Esempio n. 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);
        }