Пример #1
0
        public void addIncomingLine(Line line, Actor origin)
        {
            this.incomingLine.Add(line);
            this.origins.Add(origin);
            line.setPowerIn(origin.power);
            this.Links.Add(line, origin);

            UpdatePower();
        }
Пример #2
0
 public void addIncomingLine(Line line, Actor origin)
 {
     if (this.incomingLine.Count == 0)
     {
         line.setPowerIn(origin.power);
         this.incomingLine.Add(line);
         this.origin = origin;
         this.Links.Add(line, origin);
         UpdatePower();
     }
     else
     {
         throw new ArgumentException("Parameter cannot be null");
     }
 }