Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
        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;
        }