public MainViewModel() { _coffeeStrength = Strength.Normal; _sugarAmount = Amount.Normal; _milkAmount = Amount.Normal; LogText = new ObservableCollection <string> { "Starting up...", "Done, what would you like to drink?" }; cardPaymentController = new CardPaymentController(); cashPaymentController = new CashPaymentController(); PaymentCardUsernames = new ObservableCollection <string>(cardPaymentController.GetCardKeys()); SelectedPaymentCardUsername = PaymentCardUsernames[0]; teaBlendRepository = new TeaBlendRepository(); TeaBlendNames = new ObservableCollection <string>(teaBlendRepository.BlendNames); SelectedTeaBlend = TeaBlendNames[0]; //Puts euro sign at the front of the numbers instead of behind them. currentCulture = new CultureInfo("nl-NL"); currentCulture.NumberFormat.CurrencyPositivePattern = 0; currentCulture.NumberFormat.CurrencyNegativePattern = 2; currentCulture.NumberFormat.CurrencyDecimalSeparator = "."; }
public MainViewModel() { _coffeeStrength = Strength.Normal; additionals = new Dictionary <string, Amount>(); additionals.Add("milk", Amount.Normal); additionals.Add("sugar", Amount.Normal); LogText = new ObservableCollection <string> { "Starting up...", "Done, what would you like to drink?" }; cardPaymentController = new CardPaymentController(); cashPaymentController = new CashPaymentController(); PaymentCardUsernames = new ObservableCollection <string>(cardPaymentController.GetCardKeys()); SelectedPaymentCardUsername = PaymentCardUsernames[0]; teaBlendRepository = new TeaBlendRepository(); TeaBlendNames = new ObservableCollection <string>(teaBlendRepository.BlendNames); SelectedTeaBlend = TeaBlendNames[0]; SpecialDrinkRepo = new SpecialDrinkRepo(); List <string> specials = SpecialDrinkRepo.GetSpecialDrinkNames(); SpecialDrinks = new ObservableCollection <string>(); foreach (var item in specials) { SpecialDrinks.Add(item); } SelectedSpecialDrink = SpecialDrinks[0]; currentCulture = new CultureInfo("nl-NL"); currentCulture.NumberFormat.CurrencyPositivePattern = 0; currentCulture.NumberFormat.CurrencyNegativePattern = 2; currentCulture.NumberFormat.CurrencyDecimalSeparator = "."; }