You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
952 B

  1. using GMCabsDriverAssistantSolution.ViewModels;
  2. namespace GMCabsDriverAssistantSolution.Views;
  3. public partial class CancelledBookingPage : ContentPage
  4. {
  5. #region Fields
  6. private readonly CancelledBookingViewModel _viewModel;
  7. #endregion
  8. #region Properties
  9. #endregion
  10. #region Constructor
  11. public CancelledBookingPage()
  12. {
  13. BindingContext = _viewModel = new CancelledBookingViewModel();
  14. InitializeComponent();
  15. }
  16. #endregion
  17. public void OnCancelledOkClicked(object sender, EventArgs e)
  18. {
  19. NavigateToHomePage();
  20. }
  21. protected override bool OnBackButtonPressed()
  22. {
  23. NavigateToHomePage();
  24. base.OnBackButtonPressed();
  25. return true;
  26. }
  27. protected override void OnDisappearing()
  28. {
  29. NavigateToHomePage();
  30. base.OnDisappearing();
  31. }
  32. private async void NavigateToHomePage()
  33. {
  34. await Shell.Current.GoToAsync("..");
  35. }
  36. }