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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GMCabsDriverAssistantSolution.ViewModels
{
public class AcceptBookingProcessPageModel : BaseViewModel
{
#region Fields
private bool isProcessing = true;
private bool isBookingConfirmed = false;
private bool isBookingUnavailable = false;
#endregion
#region Properties
public bool IsProcessing
{
get => isProcessing;
set => SetProperty(ref isProcessing, value);
}
public bool IsBookingConfirmed
{
get => isBookingConfirmed;
set => SetProperty(ref isBookingConfirmed, value);
}
public bool IsBookingUnavailable
{
get => isBookingUnavailable;
set => SetProperty(ref isBookingUnavailable, value);
}
#endregion
#region Constructor
public AcceptBookingProcessPageModel()
{
Title = "Processing";
Processing();
}
#endregion
#region Methods
private async void Processing()
{
await Task.Delay(3000);
Title = "Booking Confirmed";
IsProcessing = false;
IsBookingConfirmed = true;
await Task.Delay(4000);
Title = "Booking Unavailable";
IsBookingConfirmed = false;
IsBookingUnavailable = true;
}
#endregion
}
}