/// <summary> /// Add a guest to the list box. /// </summary> /// <param name="sender">The object that initiated the event.</param> /// <param name="e">The event arguments for the event.</param> private void addGuestButton_Click(object sender, RoutedEventArgs e) { Guest guest = (Guest)this.guestListBox.SelectedItem; guest = new Guest(21, string.Empty, SodaFlavor.Dolt, new Wallet(WalletColor.Black, 20.00m)); GuestWindow guestWindow = new GuestWindow(guest); guestWindow.ShowDialog(); if (guestWindow.DialogResult == true) { guest.BuyConcessions(new PopcornStand(8.00m, new MoneyCollector(50.00m)), new SodaCupStand(6.00m, new MoneyCollector(50.00m)), new SodaStand()); this.marcusTheater.AddGuest(guest); this.PopulateGuestListBox(); } }