Ejemplo n.º 1
0
 public bool UpdateStations(List <StationWebData> listStations)
 {
     base.m_alStations.InitAfterLoad(this, listStations);
     foreach (Element element in base.m_alElements)
     {
         if (element is PathElementPassive)
         {
             PathElementPassive passive = (PathElementPassive)element;
             if (passive.StationArea.Length != 0)
             {
                 Station stationByID = base.m_alStations.GetStationByID(passive.StationArea);
                 if (stationByID != null)
                 {
                     stationByID.InitAfterLoad(this);
                 }
                 passive.m_StationArea = stationByID;
             }
         }
         element.InitAfterLoad(this);
     }
     return(true);
 }
Ejemplo n.º 2
0
 public override bool SetSegmentState(PathElementPassive.PathState st)
 {
     this.m_State = st;
     return true;
 }
Ejemplo n.º 3
0
 protected virtual bool IsPathSelected(PathElementPassive.PathState ps)
 {
     return (ps == PathElementPassive.PathState.White);
 }
Ejemplo n.º 4
0
 protected virtual bool IsPathOccupied(PathElementPassive.PathState ps)
 {
     return ((ps == PathElementPassive.PathState.Red) || (ps == PathElementPassive.PathState.Invalid));
 }
Ejemplo n.º 5
0
 protected virtual bool IsPathBlack(PathElementPassive.PathState ps)
 {
     return (!this.IsPathOccupied(ps) && !this.IsPathSelected(ps));
 }
Ejemplo n.º 6
0
 private void SetState(byte nState, int nIndex, ref byte[] state, ref PathElementPassive.PathState pa)
 {
     state[nIndex] = nState;
     byte num = (byte) (state[0] + state[1]);
     if (num == 0)
     {
         pa = PathElementPassive.PathState.Black;
     }
     else if (num == 1)
     {
         pa = (state[0] == 0) ? PathElementPassive.PathState.Red : PathElementPassive.PathState.White;
     }
     else
     {
         pa = PathElementPassive.PathState.Invalid;
     }
 }
Ejemplo n.º 7
0
 private Color GetColor4State(PathElementPassive.PathState p)
 {
     return base.ForeColor;
 }