60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
|
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
|
|||
|
}
|
|||
|
}
|