protected void AddChildAndDeletePrevious(BComponent unit) { unit.parent = this; unit.behaviorManager = behaviorManager; unit.KeepVisible(); behaviors = new BComponent[] { unit }; window.WaitFadeOffFroUnits(); }
public virtual void RemoveChild(BComponent child) { if (behaviors != null) { List <BComponent> result = new List <BComponent>(behaviors); if (result.Remove(child)) { behaviors = result.ToArray(); } } }
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); }
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()); }
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); }
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(); }
public abstract BComponent Copy(BComponent newParent = null);