예제 #1
0
        private async void RequestVehicle()
        {
            await this.NotificateRequest();

            await _userInteraction.AlertAsync("Vehicle requested. Thanks!");

            OnVehicleRequested();
        }
        public static void Alert(this IUserInteraction userInteraction, string message, string title = "", string okButton = "OK", Action done = null)
        {
            var task = userInteraction.AlertAsync(
                message,
                title,
                okButton);

            if (done != null)
            {
                task.ContinueWith((closureTask, closureAction) => ((Action)closureAction)(), done, TaskContinuationOptions.OnlyOnRanToCompletion);
            }
        }
예제 #3
0
        private async void RequestVehicle()
        {
            this.IsLoadingVehicle = true;

            await _myShuttleClient.NotificationsService.RequestVehicleAsync(CommonAppSettings.FixedEmployeeId,
                                                                            this.CurrentVehicle.DriverId,
                                                                            this.CurrentLocation.Latitude,
                                                                            this.CurrentLocation.Longitude);

            this.IsLoadingVehicle = false;

            await _userInteraction.AlertAsync("Vehicle requested. Thanks!");
        }