Пример #1
0
 public PathResultsModel(Address location, Address destination, IEnumerable<PathOption> pathOptions, IBumbleApiService BumbleApi, User user)
 {
     this.BumbleApi = BumbleApi;
     this.user = user;
     this.Location = location;
     this.Destination = destination;
     this.PathOptions = pathOptions;
     int numResults = pathOptions.Where(x => !x.IsUber).Count();
     if (numResults > 0)
     {
         TripAVisibility = Visibility.Visible;
     }
     if (numResults > 1)
     {
         TripBVisibility = Visibility.Visible;
     }
     if (numResults > 2)
     {
         TripCVisibility = Visibility.Visible;
     }
     if (numResults > 3)
     {
         TripDVisibility = Visibility.Visible;
     }
     if (numResults > 4)
     {
         TripEVisibility = Visibility.Visible;
     }
 }
Пример #2
0
 public void SetAsAddress(Address address)
 {
     SearchCategory = Enums.SearchCategory.Address;
     this.Address = address;
 }