Esempio n. 1
0
 private void eventsListBox_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
 {
     ListPage.playersListView.ItemsSource           = PlayersHelper.EventSelectionChangedPlayers(eventsListBox.SelectedItem as Event);
     ListPage.tournamentPlayersListView.ItemsSource =
         TornamentPlayersHelper.EventSelectionChangedTournament(eventsListBox.SelectedItem as Event);
     DrawsPage.EventChangedDrawing();
     ListPage.cmbBoxCategory.SelectedIndex = ListPage.cmbBoxCategory.Items.Count - 1;
 }
Esempio n. 2
0
 public DoublesAdd(BadmintonContext context, Event selectedEvent, Player player, TornamentPlayersHelper tornamentPlayersHelper)
 {
     InitializeComponent();
     Context       = context;
     CurrentPlayer = player;
     TitleChanger(player, selectedEvent);
     TornamentPlayersHelper = tornamentPlayersHelper;
     PlayersHelper          = new PlayersHelper(Context);
     PlayersHelper.PlayersLoad();
     SelectedEvent = selectedEvent;
     if (!SelectedEvent.Type.TypeName.Equals("Микст"))
     {
         playersListView.ItemsSource = PlayersHelper.EventSelectionChangedPlayers(SelectedEvent).Where(p => p.PlayerSurName != player.PlayerSurName && p.PlayerName != player.PlayerName);
     }
     else if (player.Sex.Equals("Мужской"))
     {
         playersListView.ItemsSource = PlayersHelper.EventSelectionChangedPlayers(SelectedEvent).Where(p => p.Sex.Equals("Женский"));
     }
     else
     {
         playersListView.ItemsSource = PlayersHelper.EventSelectionChangedPlayers(SelectedEvent).Where(p => p.Sex.Equals("Мужской"));
     }
 }