public void ExecuteSaveVehicleCommand(Object obj)
        {
            var result = socket.ChangeVehicle(vehiclesViewModel.SelectedVehicle);

            if (result == false)
            {
                System.Windows.MessageBox.Show("Fehler beim Ändern der Fahrzeuge!");
            }

            parent.restartVehicleCommand();
        }
 public void ExecuteSaveVehicleCommand(Object obj)
 {
     if (vehiclesViewModel.SelectedVehicle != null)
     {
         //If Lists are equaly long
         if (vehiclesViewModel.Vehicles.Count == vehiclesViewModel.entryVehicles.Count)
         {
             //Change every Input
             for (int i = 0; i < vehiclesViewModel.Vehicles.Count; i++)
             {
                 if (vehiclesViewModel.entryVehicles[i] != vehiclesViewModel.Vehicles[i])
                 {
                     var result = socket.ChangeVehicle(vehiclesViewModel.entryVehicles[i], vehiclesViewModel.Vehicles[i]);
                     if (result == false)
                     {
                         System.Windows.MessageBox.Show("Fehler beim Ändern der Fahrzeuge!");
                     }
                 }
             }
             parent.restartVehicleCommand();
         }
     }
 }