Exemplo n.º 1
0
        private void cmb_eloadasok_SelectedIndexChanged(object sender, EventArgs e)
        {
            selectedPlayId = getPlayId(cmb_eloadasok.Text);
            th.findOccupied(selectedPlayId);
            pn_floor.Controls.Clear();
            pn_upper.Controls.Clear();
            int i = 1;

            foreach (Seat s in th.getLowerSeats())
            {
                Button btn = s.setupButton();
                //btn.Click += new EventHandler(clickedLower);
                if (i % 10 == 0)
                {
                    pn_floor.SetFlowBreak(btn, true);
                }
                pn_floor.Controls.Add(btn);
                ++i;
            }
            i = 1;
            foreach (Seat s in th.getUpperSeats())
            {
                Button btn = s.setupButton();
                //btn.Click += new EventHandler(clickedUpper);
                if (i % 8 == 0)
                {
                    pn_upper.SetFlowBreak(btn, true);
                }
                pn_upper.Controls.Add(btn);
                ++i;
            }

            getBuyers(selectedPlayId);
            calcIncome();
        }
Exemplo n.º 2
0
        private void reset()
        {
            List <int> occupied = th.findOccupied(selectedPlayId);

            th.coronaRes(occupied);
            pn_floor.Controls.Clear();
            pn_upper.Controls.Clear();
            int i = 1;

            foreach (Seat s in th.getLowerSeats())
            {
                Button btn = s.setupButton();
                btn.Click += new EventHandler(clickedLower);
                if (i % 10 == 0)
                {
                    pn_floor.SetFlowBreak(btn, true);
                }
                pn_floor.Controls.Add(btn);
                ++i;
            }
            i = 1;
            foreach (Seat s in th.getUpperSeats())
            {
                Button btn = s.setupButton();
                btn.Click += new EventHandler(clickedUpper);
                if (i % 8 == 0)
                {
                    pn_upper.SetFlowBreak(btn, true);
                }
                pn_upper.Controls.Add(btn);
                ++i;
            }
        }