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