public void RemoveChild(IScnObj child) { if (Children.Remove(child)) { child.Owner = null; } }
public ScnPrm(string name, IScnObj owner, double val = 0.0) { Name = name; Owner = owner; _value = val; Owner?.AddParam(this); GetVal = this.GetValMethod; SetVal = this.SetValMethod; }
public void AddChild(IScnObj newChild) { IScnObj hasWThisName = null; int ind = 0; do { hasWThisName = Children.FirstOrDefault(ch => ch.Name == newChild.Name); newChild.Name = hasWThisName != null? Regex.Replace(hasWThisName.Name, @"\d+$", "") + (++ind).ToString() : newChild.Name; } while(hasWThisName != null); Children.Add(newChild); newChild.Owner = this; }
public void RemoveChild(IScnObj child) { throw new NotImplementedException(); }
public void AddChildUnsafe(IScnObj newChild) { Children.Add(newChild); newChild.Owner = this; }