Exemplo n.º 1
0
        /// <summary>
        /// Enables the updating of an UlanComponent.
        /// </summary>
        /// <param name="name">The name of the UlanComponent.</param>
        public void EnableComponent(string name)
        {
            UlanComponent comp = ValidateComponent(name);

            if (!comp.Enabled)
            {
                comp.ToggleEnabled();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Enables the drawing of a DrawableUlanComponent.
        /// </summary>
        /// <param name="name">The name of the DrawableUlanComponent.</param>
        public void RevealComponent(string name)
        {
            UlanComponent comp = ValidateComponent(name);

            if (!comp.Visable)
            {
                comp.ToggleVisable();
            }
        }
Exemplo n.º 3
0
        UlanComponent ValidateComponent(string name)
        {
            UlanComponent comp = FindComponent(name);

            if (comp == null)
            {
                throw new ArgumentNullException(string.Format("Component dosn't exist {0}", name));
            }
            else
            {
                return(comp);
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Adds an UlanComponent to this.
 /// </summary>
 /// <param name="component">The UlanComponent to be added.</param>
 public static void Add(UlanComponent component)
 {
     if (components.Count == 0)
     {
         components.Add(component);
     }
     else
     {
         for (int i = 0; i < components.Count; i++)
         {
             if (components[i].Name != component.Name)
             {
                 components.Add(component);
             }
         }
     }
 }