Exemplo n.º 1
0
        private void Initialize(ICurrencyManager currencyManager, IPersistencyManager persistencyManager)
        {
            var selectedCurrencies = persistencyManager.GetSelectedCurrencies();
            var allCurrencies      = currencyManager.Currencies;

            Currencies = new ObservableCollection <Currency>(allCurrencies.Except(selectedCurrencies));
        }
Exemplo n.º 2
0
        public CurrencySelectionViewModel(ICurrencyManager currencyManager, IPersistencyManager persistencyManager, IMessenger messenger)
        {
            Initialize(currencyManager, persistencyManager);

            _messenger          = messenger;
            _persistencyManager = persistencyManager;
            _messenger.Register <CurrencyRemovedMessage>(this, OnCurrencyRemoved);
        }
Exemplo n.º 3
0
        public OutputViewModel(ICurrencyManager currencyManager, IPersistencyManager persistencyManager, IMessenger messenger)
        {
            Currencies          = new ObservableCollection <CurrencyViewModel>();
            _currencyManager    = currencyManager;
            _persistencyManager = persistencyManager;
            _messenger          = messenger;
            _messenger.Register <CurrencyAddedMessage>(this, OnCurrencyAdded);

            Initialize();
        }