コード例 #1
0
        protected void AddChildAndDeletePrevious(BComponent unit)
        {
            unit.parent          = this;
            unit.behaviorManager = behaviorManager;
            unit.KeepVisible();

            behaviors = new BComponent[] { unit };
            window.WaitFadeOffFroUnits();
        }
コード例 #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();
         }
     }
 }
コード例 #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);
        }
コード例 #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());
        }
コード例 #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);
 }
コード例 #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();
        }
コード例 #7
0
 public abstract BComponent Copy(BComponent newParent = null);