예제 #1
0
 private void AddToControls(CashBoxView box)
 {
     Controls.Add(box.CashDeskName);
     Controls.Add(box.FullPrice);
     Controls.Add(box.QueueLength);
     Controls.Add(box.LeaveCustomersCount);
 }
예제 #2
0
        private void ButtonStart_Click(object sender, System.EventArgs e)
        {
            var CashDesks = new List <CashBoxView>();

            for (int i = 0; i < model.CashDesks.Count; i++)
            {
                var box = new CashBoxView(model.CashDesks[i], i, 10, 30 * i + 10);

                CashDesks.Add(box);
                AddToControls(box);
            }
            model.Start();
        }