Ejemplo n.º 1
0
        private void RefreshValues(object sender, EventArgs e)
        {
            E_StockProcessor.RefreshTable(_stocksStore, _gainModel, this);

            V_StockProcessor.RefreshTable(_stockCollection, _getStockPrice, _listViewStocks);

            M_StockProcessor.RefreshTable(_stocksStore, this);
        }
Ejemplo n.º 2
0
        public Form1(StocksStore stocksStore, GainModel gainModel, V_GetStockPriceDelegate getStockPrice)
        {
            _stocksStore = stocksStore;
            InitializeComponent();

            _stocksRepository         = stocksStore;
            _gainModel                = gainModel;
            _getStockPrice            = getStockPrice;
            _stockCollection          = stocksStore.LoadStocks();
            _stockCollection.Changed += (sender, e) => V_StockProcessor.RefreshTable(_stockCollection, _getStockPrice, _listViewStocks);
            _stockCollection.Changed += (sender, e) => SaveStocks();

            V_StockProcessor.RefreshTable(_stockCollection, _getStockPrice, _listViewStocks);
        }