Exemple #1
0
 public void Delete(TEntity entity)
 {
     if (userInteraction.Confirm("Are you shure you wnt to delete this entity?"))
     {
         decoratedDelete.Delete(entity);
     }
 }
Exemple #2
0
 private void ShowVehicleOnMap(VehicleForecastViewModel vehicleViewModel)
 {
     _userInteraction.Confirm(
         AppResources.show_vehicle_on_map_confirm_format,
         () => vehicleViewModel.ShowOnMapCommand.Execute(),
         string.Empty,
         AppResources.yes,
         AppResources.no);
 }
 private void ShowVehicleOnMap(RouteStopForecastViewModel routeStopForecastViewModel)
 {
     _userInteraction.Confirm(
         AppResources.show_vehicle_on_map_confirm_format,
         () => _messenger.Publish(new ShowVehicleForecastOnMapMessage(this, routeStopForecastViewModel.VehicleId)),
         string.Empty,
         AppResources.yes,
         AppResources.no);
 }
 public static void Confirm(this IUserInteraction userInteraction, string message, Action okClicked, string title = null, string okButton = "OK", string cancelButton = "Cancel")
 {
     userInteraction.Confirm(
         message,
         confirmed =>
     {
         if (confirmed)
         {
             okClicked();
         }
     },
         title,
         okButton,
         cancelButton);
 }
Exemple #5
0
        private void OnAreaLocatingFailed(object sender, EventArgs args)
        {
            lock (_lockObject)
            {
                this.CleanUp();

                _userInteraction.Confirm(
                    AppResources.unknown_location_dialog_text,
                    answer =>
                {
                    if (answer)
                    {
                        this.ShowViewModel <SetAreaViewModel>();
                    }
                    else
                    {
                        this.ShowViewModel <HomeViewModel>();
                    }
                },
                    AppResources.unknown_location_dialog_title,
                    AppResources.yes,
                    AppResources.no_thanks);
            }
        }