Пример #1
0
        private void DetailsButtonOnClick(object sender, RoutedEventArgs e)
        {
            MsgLabel.Visibility = Visibility.Collapsed;
            CustomListViewColumn column = (CustomListViewColumn)sender;
            int idx = CustomListView.ItemList.Children.IndexOf(column);
            Pit pit = DataLists.GetPits()[idx];

            PitDetailsExpander.IsExpanded = true;
            PitDetails.ShowDetails(pit);
        }
Пример #2
0
 private void UpdateList()
 {
     MsgLabel.Visibility    = Visibility.Visible;
     (string msg, bool err) = DataLists.UpdatePitList();
     MsgLabel.ShowMessage(msg, err);
     CustomListView.ItemList.Children.Clear();
     foreach (var pit in DataLists.GetPits())
     {
         CustomListViewColumn column = new CustomListViewColumn
         {
             Data1 = { Content = pit.TeamNumber },
             Data2 = { Content = pit.AutonomousOptions }
         };
         column.MouseDoubleClick += DetailsButtonOnClick;
         CustomListView.ItemList.Children.Add(column);
     }
 }