private void CreateVending()
        {
            vmachine = new ViewVending("vmachine");
            vmachine.MessageEvent += (s, e) =>
            {
                MessageBox.Show(e.Message);
            };

            vmachine.GoodsStorage.AddGoods("Чай", 13, 10);
            vmachine.GoodsStorage.AddGoods("Кофе", 18, 20);
            vmachine.GoodsStorage.AddGoods("Кофе с молоком", 21, 20);
            vmachine.GoodsStorage.AddGoods("Сок", 35, 15);

            vmachine.Wallet.AddCoins(1, 100);
            vmachine.Wallet.AddCoins(2, 100);
            vmachine.Wallet.AddCoins(5, 100);
            vmachine.Wallet.AddCoins(10, 100);

            vmachine.Refresh();

            vmwallet = new ViewCustomer(vmachine);
            vmwallet.Refresh();
        }
Exemplo n.º 2
0
        private void CreateVending()
        {
            vmachine = new ViewVending("vmachine");
            vmachine.MessageEvent += (s,e) =>
            {
                MessageBox.Show(e.Message);
            };

            vmachine.GoodsStorage.AddGoods("Чай",13,10);
            vmachine.GoodsStorage.AddGoods("Кофе",18,20);
            vmachine.GoodsStorage.AddGoods("Кофе с молоком",21,20);
            vmachine.GoodsStorage.AddGoods("Сок",35,15);

            vmachine.Wallet.AddCoins(1,100);
            vmachine.Wallet.AddCoins(2, 100);
            vmachine.Wallet.AddCoins(5, 100);
            vmachine.Wallet.AddCoins(10, 100);
            
            vmachine.Refresh();

            vmwallet = new ViewCustomer(vmachine);
            vmwallet.Refresh();
        }