/// <summary>
 /// Finds the TrainController that can actually do something.
 /// </summary>
 private TrainController findController(TrainItem ti)
 {
     while (ti != null)
     {
         if (ti.controller != theInstance)
         {
             return(ti.controller);
         }
         ti = ti.ownerGroup;
     }
     // even the root controller delegates to the parent.
     // use the default one
     return(SimpleTrainControllerImpl.theInstance);
 }
Пример #2
0
 public void remove(TrainItem t)
 {
     base.List.Remove(t);
 }
Пример #3
0
 public void add(TrainItem t)
 {
     base.List.Add(t);
 }