private void Refresh() { customer.Refresh(); ListViewUpdate(customer.ItemsList); vmachine.Refresh(); ListViewUpdate(vmachine.ItemsList); vmwallet.Refresh(); ListViewUpdate(vmwallet.ItemsList); }
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(); }
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(); }