예제 #1
0
        private void buttonInsertCassettes_Click(object sender, EventArgs e)
        {
            listBoxMoney.Items.Clear();
            string pathToMoney = "PathToMoney";
            string extension   = comboBoxExtension.Text;

            _cassetteReader = ReadersCollection.GetReader(extension);
            if (_cassetteReader != null)
            {
                pathToMoney += extension;
                List <Cassette> cassettes = _cassetteReader.LoadCassettes(ConfigurationManager.AppSettings[pathToMoney]);
                if (cassettes != null)
                {
                    _atm.InsertCassettes(cassettes);
                }
                DisplayMoney(_atm.AllMoney);
            }
        }
예제 #2
0
        private void InsertCassettes()
        {
            string pathToMoney = "PathToMoney";
            string extension   = _secondParam;
            ICassetteReader <List <Cassette> > cassetteReader = ReadersCollection.GetReader(extension);

            if (cassetteReader != null)
            {
                pathToMoney += extension;
                List <Cassette> cassettes =
                    cassetteReader.LoadCassettes(ConfigurationManager.AppSettings[pathToMoney]);
                if (cassettes != null)
                {
                    _atm.InsertCassettes(cassettes);
                }
            }
            _result = true;
        }