private async void Navigate() { await CarsHandler.Update(); MainMenuViewModel.IsPcCheck = true; Frame.Navigate(typeof(EVMPage)); }
private async void UpdateSource() { if (CarsHandler.Cars.Count == 0) { await CarsHandler.Update(); } //if (SelectedCar == null) // SelectedCar = CarsHandler.Cars.Count == 0 ? new CarListBaseDataModel() : CarsHandler.Cars[0]; Cars.Clear(); foreach (var el in CarsHandler.Cars) { Cars.Add(new CarViewModel(el)); } _selectedCar = Cars.FirstOrDefault(o => o.DID.Equals(CarsHandler.SelectedCar.DID)); }