Ejemplo n.º 1
0
        protected void AddChildAndDeletePrevious(BComponent unit)
        {
            unit.parent          = this;
            unit.behaviorManager = behaviorManager;
            unit.KeepVisible();

            behaviors = new BComponent[] { unit };
            window.WaitFadeOffFroUnits();
        }
Ejemplo n.º 2
0
 public virtual void RemoveChild(BComponent child)
 {
     if (behaviors != null)
     {
         List <BComponent> result = new List <BComponent>(behaviors);
         if (result.Remove(child))
         {
             behaviors = result.ToArray();
         }
     }
 }
Ejemplo n.º 3
0
        public static BComponent GetComponent(BComponent parent, Behaviors behaviorManager, XmlNode xmlDoc)
        {
            BComponent current = null;

            foreach (XmlNode x in xmlDoc)
            {
                current = Behaviors.BuildComponent(x, parent, behaviorManager);
                if (current != null)
                {
                    return(current);
                }
            }
            return(null);
        }
Ejemplo n.º 4
0
        public static BComponent[] GetComponents(BComponent parent, Behaviors behaviorManager, XmlNode xmlDoc)
        {
            List <BComponent> components = new List <BComponent>();
            BComponent        current    = null;

            foreach (XmlNode x in xmlDoc)
            {
                current = Behaviors.BuildComponent(x, parent, behaviorManager);
                if (current != null)
                {
                    components.Add(current);
                }
            }
            return(components.ToArray());
        }
Ejemplo n.º 5
0
 public virtual BComponent[] CopyChildren(BComponent newParent)
 {
     if (behaviors != null)
     {
         BComponent[] result = new BComponent[behaviors.Length];
         for (int i = 0; i < behaviors.Length; ++i)
         {
             if (behaviors[i] != null)
             {
                 result[i] = behaviors[i].Copy(newParent);
             }
         }
         return(result);
     }
     return(null);
 }
Ejemplo n.º 6
0
        public virtual void AddChild(BComponent child, int index)
        {
            List <BComponent> result;

            if (behaviors == null)
            {
                result = new List <BComponent>();
            }
            else
            {
                result = new List <BComponent>(behaviors);
            }

            child.parent          = this;
            child.behaviorManager = behaviorManager;
            child.KeepVisible();

            result.Insert(index, child);
            behaviors = result.ToArray();

            window.WaitFadeOffFroUnits();
        }
Ejemplo n.º 7
0
 public abstract BComponent Copy(BComponent newParent = null);