示例#1
0
        //Get Show Name Selection
        private void lvShowList_Selected(object sender, SelectionChangedEventArgs e)
        {
            dateSelectedDate.Visibility = System.Windows.Visibility.Visible;

            int index = lvShowList.SelectedIndex;
            Show selectedShow = new Show();
            selectedShow = showList[index];
            lblShow.Content = selectedShow.getName();
            showName = selectedShow.getName();
            if ((showName != null) || (showName != ""))
            {
                dateSelectedDate.Visibility = System.Windows.Visibility.Visible;
            }
            else
            {
                MessageBox.Show("Error on Show Name");
            }
        }
示例#2
0
 //Return all shows from XML
 private void setNPRshowList()
 {
     XDocument xmldoc = XDocument.Load("showList.xml");
     var shows = from show in xmldoc.Descendants("show")
                 select new
                 {
                     Title = show.Element("title").Value.ToString()
                 };
     foreach (var show_x in shows)
     {
         Show show = new Show(show_x.Title);
         showList.Add(show);
         lvShowList.Items.Add(show.getName());
     }
     lblShow.Visibility = System.Windows.Visibility.Visible;
     lvShowList.Visibility = System.Windows.Visibility.Visible;
     return;
 }