예제 #1
0
 public static void FillUsersListBox(List <User> jumpers)
 {
     App.Current.Dispatcher.Invoke((Action) delegate
     {
         AdminMainPage currentPage            = App.MainWindowRef.Main.Content as AdminMainPage;
         currentPage.usersListBox.ItemsSource = jumpers;
     });
 }
예제 #2
0
 public static void FillCompetitionListBox(List <CompetitionWithUser> competitions)
 {
     App.Current.Dispatcher.Invoke((Action) delegate
     {
         AdminMainPage currentPage = App.MainWindowRef.Main.Content as AdminMainPage;
         currentPage.competitionListBox.ItemsSource = competitions;
         currentPage.competitionListBox.UnselectAll();
     });
 }
예제 #3
0
 private void DisplaySelectedContest(object sender, MouseButtonEventArgs e)
 {
     App.Current.Dispatcher.Invoke((Action) delegate
     {
         AdminMainPage currentPage = App.MainWindowRef.Main.Content as AdminMainPage;
         dynamic data = currentPage.competitionListBox.SelectedItem as dynamic;
         if (data != null)
         {
             int id = data.ID;
             List <User> jumpers = data.Users;
             List <User> judges  = data.Judges;
             Console.WriteLine(id);
             FillUsersListBox(jumpers);
             FillJudgesListBox(judges);
         }
     });
 }