Example #1
0
 public void RemoveChild(IScnObj child)
 {
     if (Children.Remove(child))
     {
         child.Owner = null;
     }
 }
Example #2
0
 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;
 }
Example #3
0
        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;
        }
Example #4
0
 public void RemoveChild(IScnObj child)
 {
     throw new NotImplementedException();
 }
Example #5
0
 public void AddChildUnsafe(IScnObj newChild)
 {
     Children.Add(newChild);
     newChild.Owner = this;
 }