public GetPlaces(User user, Rooms Room) { InitializeComponent(); yelpManager = YelpManager.DefaultManager; yelpManager.Places.Clear(); PlacesView.ItemsSource = yelpManager.Places; yelpManager.LikeCount = 0; yelpManager.NumberOfPlaces = 0; LikedPlaces = new List <string>(); RoomManager = RoomManager.DefaultManager; this.Room = Room; //TimeSpan span = DateTime.Now.AddMinutes(.1).Subtract(DateTime.Now); TimeSpan span = Convert.ToDateTime(Room.Date).Subtract(DateTime.Now); SecLeft = span.TotalSeconds; //RequestPlaces_ClickedAsync(); RequestPlaces(this.Room); Device.StartTimer(TimeSpan.FromSeconds(1), () => { minl = (int)SecLeft / 60; secl = (int)SecLeft % 60; RoundTimer.Text = minl + ":" + secl; SecLeft--; if (SecLeft <= 0) { submitClicked(null, null); return(false); } return(true); }); }
public Nearby() { InitializeComponent(); yelpManager = YelpManager.DefaultManager; yelpManager.Places.Clear(); ViewPlaces.ItemsSource = yelpManager.Places; yelpManager.LikeCount = 0; yelpManager.NumberOfPlaces = 0; _ = RequestPlaces_ClickedAsync(); }
public NearbyRestaurants() { InitializeComponent(); PlacesView.ItemsSource = Places; yelpManager = new YelpManager(); }