Exemplo n.º 1
0
        private void FillVehicules()
        {
            SelectedVehicule = null;
            Vehicules.Clear();

            if (!IsConnected)
            {
                return;
            }

            var vehicules = Enumerable.Empty <IVehicule>();

            using (var service = ServiceFactories.CreateETLService())
            {
                service.ErrorOccured += OnErrorOccured;
                vehicules             = service.GetVehicules(Token);
            }

            if (vehicules == null)
            {
                return;
            }
            foreach (var vehicule in vehicules)
            {
                Vehicules.Add(new VehiculeViewModel(vehicule));
            }
        }
Exemplo n.º 2
0
 public MainViewModel()
 {
     Vehicules.Add(new VeloViewModel()
     {
         Nom = "Velo II"
     });
     Vehicules.Add(new VoitureViewModel()
     {
         Nom = "Voiture  I", Immatriculation = "AA 123 AA"
     });
     Vehicules.Add(new VeloViewModel()
     {
         Nom = "Velo III"
     });
     Vehicules.Add(new VeloViewModel()
     {
         Nom = "Velo V"
     });
 }