//new layout
 public TheatreLayout(string name, int size)
 {
     InitializeComponent();
     name1 = name;
     number1 = size;
     oldIndex = -1;
     tempVenue = new Venue(name, size, size, new List<Point>(1), new List<Point>(1));
     this.WindowState = FormWindowState.Maximized;
 }
 public TheatreLayout(Venue currentVenue)
 {
     InitializeComponent();
     tempVenue = currentVenue;
     name1 = currentVenue.Name;
     number1 = currentVenue.Size;
     oldIndex = TheatreForm.venueList.FindIndex(i => i == currentVenue);
     this.WindowState = FormWindowState.Maximized;
 }
 private void TheatreList_SelectedIndexChanged(object sender, EventArgs e)
 {
     selectedTheatre = venueList.Find(item => item == TheatreList.SelectedItems[0]);
     textBox1.Text = selectedTheatre.Name;
     textBox2.Text = selectedTheatre.Seat_Location.Count.ToString();
 }
Exemple #4
0
        private void SeatForm_Load(object sender, EventArgs e)
        {
            //currentCustomer = UserForm.selectedCustomer;

            currentShow = UserForm.selectedShow;
            foreach (Customer q in customerList)
            {
                if (q.Name == UserForm.selectedCustomer.Name)
                    currentCustomer = q;
            }
            customerIndex = customerList.IndexOf(currentCustomer);

            foreach (Venue q in venueList)
            {
                if (q.Name == currentShow.VenueName)
                    currentVenue = q;
            }
            venueIndex = venueList.IndexOf(currentVenue);
            CreateButtons();
            panel1.SendToBack();
        }
 private void TheatreLayout_FormClosing(object sender, FormClosingEventArgs e)
 {
     toList();
     Venue temp = new Venue(name1,number1,number1,seats);
     List<Venue> newVenue = new List<Venue>();
     newVenue = Venue.LoadVenues();
     if (oldIndex != -1) newVenue[oldIndex] = temp;
     else newVenue.Add(temp);
     Venue.SaveVenues(newVenue);
 }
Exemple #6
0
 public static void XMLInit()
 {
     List<Venue> V = new List<Venue>();
     Venue Globe = new Venue("Globe Theater", 300, 300);
     Venue Ford = new Venue("Ford Theater", 200, 200);
     Venue Huntington = new Venue("Huntington Theater", 400, 400);
     Venue[] Venuez = { Globe, Ford, Huntington };
     V.AddRange(Venuez);
     using (var stream = new FileStream("../../venues.xml", FileMode.Create))
     {
         XmlSerializer XML = new XmlSerializer(typeof(List<Venue>));
         XML.Serialize(stream, V);
     }
 }