Ejemplo n.º 1
0
        private void CreateCustomer()
        {
            customer = new ViewCustomer("customer");

            customer.Wallet.AddCoins(1, 10);
            customer.Wallet.AddCoins(2, 30);
            customer.Wallet.AddCoins(5, 20);
            customer.Wallet.AddCoins(10, 15);
            
            customer.Refresh();
        }
Ejemplo 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();
        }