public void StoreRemote(Car car) { var config = CarConfigJson.Default(); config.SetColor(car.Color == "Grün" ? "#B8F07B" : "#1872B0"); // because 3m5 already accepts hex codes instead of "Blau" or "Grün" strings. var serializer = new JsonSerializer<CarConfigJson>(); var json = serializer.Serialize(config); _storage.Save(ConfigurationManager.AppSettings.Get("storage-key-3m5"), json); }
/// <summary> /// Set new car to be displayed. /// </summary> /// <param name="car">The car information.</param> private void ChangeCar(Car.Car car) { if (car.Equals(Car.Car.Unknown)) { return; } _car = car; thumbnail_car.Children.Add(_car.CreateThumbnail()); _3DModel.Content = _car.Model3D; SetCarInformation(); }
public CarRepository() { _blueCar = new BlueCar(); _greenCar = new GreenCar(); _storage = new Storage(); }