예제 #1
0
        private async void StopTapped(object sender, System.Windows.Input.GestureEventArgs e)
        {
            var arg = await RoutePickerDialog.ShowAsync(ViewModel.Route, ViewModel.Stop);

            if (arg != null)
            {
                ViewModel.Stop  = arg.Stop;
                ViewModel.Route = arg.Route;
                if (ViewModel.Stop == null)
                {
                    NavigationService.GoBack();
                }
                App.UB.History.AddTimetableHistory(ViewModel.Route, ViewModel.Stop, 3);
                ViewModel.SetRouteStopValue();
                ViewModel.SetBodyContentAsync();
            }
            else if (ViewModel.Stop == null)
            {
                NavigationService.GoBack();
            }
        }
예제 #2
0
        private async void StopTapped(object sender, TappedRoutedEventArgs e)
        {
            var result = await RoutePickerDialog.ShowAsync(ViewModel.Route, ViewModel.Stop);

            if (result != null)
            {
                if (result.Stop == null)
                {
                    Frame.GoBack();
                }
                ViewModel.Stop  = result.Stop;
                ViewModel.Route = result.Route;
                App.UB.History.AddTimetableHistory(result.Route, result.Stop, 3);
                ViewModel.SetRouteStopValue();
                ViewModel.SetBodyContentAsync();
            }
            else if (ViewModel.Stop == null)
            {
                Frame.GoBack();
            }
        }