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); }
public override bool SetSegmentState(PathElementPassive.PathState st) { this.m_State = st; return true; }
protected virtual bool IsPathSelected(PathElementPassive.PathState ps) { return (ps == PathElementPassive.PathState.White); }
protected virtual bool IsPathOccupied(PathElementPassive.PathState ps) { return ((ps == PathElementPassive.PathState.Red) || (ps == PathElementPassive.PathState.Invalid)); }
protected virtual bool IsPathBlack(PathElementPassive.PathState ps) { return (!this.IsPathOccupied(ps) && !this.IsPathSelected(ps)); }
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; } }
private Color GetColor4State(PathElementPassive.PathState p) { return base.ForeColor; }