コード例 #1
0
 /// <summary>
 /// The route to base the view model on.
 /// </summary>
 public SearchRouteResultViewModel(Route route)
 {
     this.Route = route;
     this.SelectedCommand = new ObservableCommand();
     this.SelectedCommand.Executed += OnSelectedCommandExecuted;
 }
コード例 #2
0
        /// <summary>
        /// Toggles filtering by a specific route.
        /// </summary>
        public void ToggleFilterByRoute(Route route)
        {
            if (this.isFiltered)
            {
                this.filteredRouteId = null;
                this.isFiltered = false;

                foreach (var realTimeData in this.realTimeData)
                {
                    realTimeData.IsFiltered = false;
                }
            }
            else
            {
                this.filteredRouteId = route.Id;
                this.isFiltered = true;

                foreach (var realTimeData in this.realTimeData)
                {
                    realTimeData.IsFiltered = string.Equals(this.filteredRouteId, realTimeData.RouteId, StringComparison.OrdinalIgnoreCase);
                }
            }

            FirePropertyChanged("RealTimeData");
        }
コード例 #3
0
 public override int GetHashCode()
 {
     return(Stop.GetHashCode() ^ Route.GetHashCode());
 }