Esempio n. 1
0
 public LiveRatesVM(ICurrencyBusinessLogic logic, AppPreferences prefs)
 {
     this.logic          = logic;
     AvailableCurrencies = logic.AvailableCurrencies.ToArray();
     SourceCurrencies    = AvailableCurrencies;
     TargetCurrency      = prefs.MainTargetCurrency;
 }
Esempio n. 2
0
        public HistoryVM(ICurrencyBusinessLogic logic, AppPreferences prefs)
        {
            this.logic = logic;
            this.FlipCurrenciesCommand = new AbstractCommand(_ =>
            {
                var oldSource  = SourceCurrency;
                var oldTarget  = TargetCurrency;
                SourceCurrency = oldTarget;
                TargetCurrency = oldSource;
            });
            this.AvailableCurrencies = logic.AvailableCurrencies.ToArray();

            SourceCurrency = prefs.DefaultSourceCurrency;
            TargetCurrency = prefs.MainTargetCurrency;

            WeekChecked = true;
        }
Esempio n. 3
0
 public AppPreferences(ICurrencyBusinessLogic logic)
 {
     this.logic = logic;
 }
Esempio n. 4
0
 public ViewModelInjection(ICurrencyBusinessLogic logic, AppPreferences settings)
 {
     this.logic    = logic;
     this.settings = settings;
 }