예제 #1
0
 public LiveRatesVM(ICurrencyBusinessLogic logic, AppPreferences prefs)
 {
     this.logic          = logic;
     AvailableCurrencies = logic.AvailableCurrencies.ToArray();
     SourceCurrencies    = AvailableCurrencies;
     TargetCurrency      = prefs.MainTargetCurrency;
 }
예제 #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;
        }
예제 #3
0
 public AppPreferences(ICurrencyBusinessLogic logic)
 {
     this.logic = logic;
 }
예제 #4
0
 public ViewModelInjection(ICurrencyBusinessLogic logic, AppPreferences settings)
 {
     this.logic    = logic;
     this.settings = settings;
 }