示例#1
0
 private void ResetSelectedStationsAndStationConnections()
 {
     Stations.Where(s => s.IsSelectedStationInThePath == false | true)
     .ToList().ForEach(s => { s.IsSelectedStationInThePath = null; });
     StationConnections.Where(sc => sc.IsSelectedConnection == false | true)
     .ToList().ForEach(sc => { sc.IsSelectedConnection = null; });
 }
示例#2
0
 private void HideStationsAndConnectionsThatIsNotOnTheSelectedPath()
 {
     StationConnections.Where(sc => sc.IsSelectedConnection == null)
     .ToList().ForEach(sc => { sc.IsSelectedConnection = false; });
     Stations.Where(s => s.IsSelectedStationInThePath == null)
     .ToList().ForEach(s => { s.IsSelectedStationInThePath = false; });
 }
示例#3
0
 public void MoveToPrevious(StationViewModel startStation, StationViewModel endStation)
 {
     while (startStation.ConnectedStationO.PreviousStation != endStation.Name)
     {
         startStation = Stations.ToList().Find(s => s.Name.Trim() == startStation.ConnectedStationO.PreviousStation.Trim());
         StationConnections.SingleOrDefault(s =>
         {
             if (s.NextStation != null & s.NextStation.Trim() == startStation.ConnectedStationO.NextStation.Trim())
             {
                 s.IsSelectedConnection = true;
                 return(true);
             }
             return(false);
         });
         startStation.IsSelectedStationInThePath = true;
     }
 }