private void btnStation_Click(object sender, RoutedEventArgs e) { TVMUtility.PlayClick(); int selectedStationId = 0; selectedStationId = Convert.ToInt32(((Button)sender).Tag.ToString());//Stations.GetStation().id; //if (Stations.stationList.ContainsKey(selectedStationId)) // SetStation(selectedStationId); Ticket.endStation = Stations.GetStation(selectedStationId); Ticket.startStation = Stations.currentStation; ElectronicJournal.DestinationSelected(Ticket.endStation.name.ToString()); Constants.IsMapPageActive = false; NavigationService.Navigate(new Pages.TicketCountPage()); //PageControl.ShowPage(Pages.journeyPage); }
private void SetEndStation(int selectedStationId) { if (selectedStationId != Stations.currentStation.id) { Ticket.endStation = Stations.GetStation(selectedStationId); Ticket.startStation = Stations.currentStation; ElectronicJournal.DestinationSelected(Ticket.endStation.name.ToString()); Constants.IsMapPageActive = true; NavigationService.Navigate(new Pages.TicketCountPage()); //PageControl.ShowPage(Pages.journeyPage); } else { lblWarning.Visibility = Visibility.Visible; lblWarning.Content = "This station can not be selected!"; } }