private void PayInShop(ShopCasher casher) { m_state = BuyerState.PayEnter; BuyerStateChengedEvent(this, new BuyerStateEventArgs(m_state)); casher.Pay(); m_state = BuyerState.PayLeave; BuyerStateChengedEvent(this, new BuyerStateEventArgs(m_state)); }
private void btnStart_Click(object sender, EventArgs e) { timer.Enabled = true; ShopCasher shopCasger = new ShopCasher(int.Parse(tbxCasher.Text), int.Parse(tbxCount.Text)); CaffeCasher caffeCasher = new CaffeCasher(int.Parse(tbxCaffe.Text)); Shop shop = new Shop(shopCasger, caffeCasher); shopControl = new ShopControl(shop, dtpOpen.Value, dtpClose.Value, int.Parse(tbxMaxCount.Text)); shopControl.UpdateEvent += UpdateInfo; }