Beispiel #1
0
 public instaSeat(instaSeat I)
 {
     this.Reserve = I.Reserve;
     this.C = I.C;
     this.S = I.S;
     this.P = I.P;
     this.DSP = I.DSP;
     this.rCust = I.rCust;
 }
        void this_DragDrop(object sender, DragEventArgs e)
        {
            if (seatButton.Checked == true)                      //Laying Seat Buttons
            {
                Button newb = new Button();
                newb.Tag = "DESIGN";
                newb.Size = new Size(40, 20);
                newb.Text = (rowBox.Text + seatBox.Text);
                Point newP = this.PointToClient(new Point(e.X, e.Y));
                newb.Location = newP;
                this.Controls.Add(newb);
                this.Update();

                instaSeat i = new instaSeat();
                i.DSP = newb.Text;
                i.P = newb.Location;
                i.S = newb.Size;

                newV.SeatLayout.Add(i);
            }
            else if (stageButton.Checked == true)                //Laying Stage
            {
                Button newb = new Button();
                newb.Tag = "DESIGN";
                newb.Size = new Size(100, 50);
                newb.Text = "Stage";
                Point newP = this.PointToClient(new Point(e.X, e.Y));
                newb.Location = newP;
                this.Controls.Add(newb);
                this.Update();

                instaSeat i = new instaSeat();
                i.DSP = newb.Text;
                i.P = newb.Location;
                i.S = newb.Size;

                newV.SeatLayout.Add(i);
            }
            else
                MessageBox.Show("Please select which button to use!");
        }
Beispiel #3
0
        private void buyButton_Click(object sender, EventArgs e)
        {
            SelectCustomer sel = new SelectCustomer();
            sel.ShowDialog();
            Customer C = sel.reVal;
            sel.Close();
            sel.Dispose();

            //Dangerous
            subcreate.Seats.Clear();
            //

            foreach(Control b in this.Controls)
            {
                if (b.GetType() == typeof(Button))
                {
                    instaSeat i = new instaSeat();
                    i.DSP = b.Text;
                    i.C = b.BackColor;
                    i.P = b.Location;
                    i.S = b.Size;

                    if (b.BackColor == Color.Red)
                        i.Reserve = true;

                    creator.AShows.Find(item => item.Equals(subcreate)).Seats.Add(i);
                }
            }

            Checkout ck = new Checkout();
            ck.Load(C, creator, subcreate);
            ck.Show();
        }
Beispiel #4
0
        //Debug Routine
        public void demoload()
        {
            VenObj demo = new VenObj();
            demo.id = KnownVen.Count;
            demo.venname = "Cavern On The Green";

            int seat = 0, row = 0;

            for (int i = 50; i < 550; i += 30)      //X
            {
                for (int j = 25; j < 500; j += 50)   //Y
                {
                    instaSeat a = new instaSeat();
                    a.DSP = seat.ToString() + ", " + row.ToString();
                    a.P = new Point(j,i);

                    demo.SeatLayout.Add(a);
                    seat++;
                }
                seat = 0;
                row++;
            }
            instaSeat stage = new instaSeat();
            stage.DSP = "Stage";
            stage.S = new Size(100, 50);
            stage.P = new Point(225, 600);

            demo.SeatLayout.Add(stage);

            this.KnownVen.Add(demo);
        }