예제 #1
0
 public Artist(string name, int age, string specialty, Troupe troupe)
 {
     Name      = name;
     Age       = age;
     Specialty = specialty;
     Troupe    = troupe;
 }
예제 #2
0
 public Show(string name, Troupe troupe, string description, List <Event> events, double ticketPrice)
 {
     Name        = name;
     Troupe      = troupe;
     Description = description;
     Events      = events;
     TicketPrice = ticketPrice;
 }
예제 #3
0
 private void TroupeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (TroupeComboBox.SelectedItem != null)
     {
         string        selectedTroupeName      = TroupeComboBox.SelectedItem.ToString();
         Troupe        selectedTroupe          = TroupeList.FirstOrDefault(n => n.Name == selectedTroupeName);
         List <Artist> artistsOfSelectedTroupe = DisplayInformation.GetArtistsFromTroupe(selectedTroupe);
         ArtistListView.Visibility  = Visibility.Visible;
         ArtistListView.ItemsSource = artistsOfSelectedTroupe;
         TroupeNameTxtBlock.Text    = selectedTroupe.Name;
     }
 }
 private void ShowsComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (ShowsComboBox.SelectedItem != null)
     {
         string selectedShowName = ShowsComboBox.SelectedItem.ToString();
         Show   selectedShow     = ShowsList.FirstOrDefault(n => n.Name == selectedShowName);
         ShowTitleTxtBlock.Text = selectedShow.Name;
         Troupe troupeOfSelectedShow = DisplayInformation.GetTroupeFromShow(selectedShow);
         TroupeNameTxtBlock.Text  = troupeOfSelectedShow.Name;
         DescriptionTxtBlock.Text = selectedShow.Description;
         PriceTxtBlock.Text       = selectedShow.TicketPrice.ToString();
         List <Event> eventsFromSelectedShow = DisplayInformation.GetEventListFromShow(selectedShow);
         EventListView.ItemsSource = eventsFromSelectedShow;
     }
 }