Exemplo n.º 1
0
 private void TourListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if (TourListBox.SelectedItem is Tournaments tour)
     {
         TournamentWindow tournamentWindow = new TournamentWindow(PlayersViewModel, TeamViewModel, TournamentViewModel, tour);
         tournamentWindow.Show();
     }
 }
Exemplo n.º 2
0
        public static void OpenTournamentWindow(ITournamentGameModel game)
        {
            /**
             * Sprawdz czy stol uruchomiony
             * jesli tak podswietl go jesli nie - utworz nowe okno stolu
             * */
            if (Application.Current.Windows.OfType <TournamentWindow>().Any(t => t.GameModel.TournamentModel.ID == game.TournamentModel.ID))
            {
                return;
            }

            TournamentWindow gameWindow = new TournamentWindow(game);

            gameWindow.Owner = MainWindow.Instance;
            gameWindow.Show();
            gameWindow.Owner = null;
        }