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.

59 lines
1.5 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace GMCabsDriverAssistantSolution.ViewModels
  7. {
  8. public class AcceptBookingProcessPageModel : BaseViewModel
  9. {
  10. #region Fields
  11. private bool isProcessing = true;
  12. private bool isBookingConfirmed = false;
  13. private bool isBookingUnavailable = false;
  14. #endregion
  15. #region Properties
  16. public bool IsProcessing
  17. {
  18. get => isProcessing;
  19. set => SetProperty(ref isProcessing, value);
  20. }
  21. public bool IsBookingConfirmed
  22. {
  23. get => isBookingConfirmed;
  24. set => SetProperty(ref isBookingConfirmed, value);
  25. }
  26. public bool IsBookingUnavailable
  27. {
  28. get => isBookingUnavailable;
  29. set => SetProperty(ref isBookingUnavailable, value);
  30. }
  31. #endregion
  32. #region Constructor
  33. public AcceptBookingProcessPageModel()
  34. {
  35. Title = "Processing";
  36. Processing();
  37. }
  38. #endregion
  39. #region Methods
  40. private async void Processing()
  41. {
  42. await Task.Delay(3000);
  43. Title = "Booking Confirmed";
  44. IsProcessing = false;
  45. IsBookingConfirmed = true;
  46. await Task.Delay(4000);
  47. Title = "Booking Unavailable";
  48. IsBookingConfirmed = false;
  49. IsBookingUnavailable = true;
  50. }
  51. #endregion
  52. }
  53. }