private void mniPlayersImportGalakta_Click(object sender, RoutedEventArgs e) { GalaktaPlayersWindow frmPlayers = new GalaktaPlayersWindow() { Owner = this }; if (frmPlayers.ShowDialog() == true) { foreach (var item in GalaktaPlayersWindow.GalaktaPlayersList.Where(p => p.Selected == true)) { if (string.IsNullOrEmpty(item.Player.Alias)) { item.Player.Alias = item.Player.NameSurname; } if (this.tournament.PointsTable.Where(p => p.Alias == item.Player.Alias).Count() > 0) { new PMW(StringTable.MainWindow_PlayerExists); continue; } this.tournament.AddPlayer(item.Player); } } }
/* private void mniCorpoHB_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceCorpo = RaceCorpo.HaasBioroid; } private void mniCorpoJinteki_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceCorpo = RaceCorpo.Jinteki; } private void mniCorpoNBN_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceCorpo = RaceCorpo.NBN; } private void mniCorpoWeyland_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceCorpo = RaceCorpo.WeylandConsortium; } private void mniRunnerAnarch_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceRunner = RaceRunner.Anarch; } private void mniRunnerCriminal_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceRunner = RaceRunner.Criminal; } private void mniRunnerShaper_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceRunner = RaceRunner.Shaper; } private void mniRunnerApex_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceRunner = RaceRunner.Apex; } private void mniRunnerAdam_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceRunner = RaceRunner.Adam; } private void mniRunnerSunny_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; playerToEdit.RaceRunner = RaceRunner.Sunny; } */ private void mniGalaktaSynchro_Click(object sender, RoutedEventArgs e) { Player playerToEdit = this.dgPointsTable.SelectedItem as Player; if (playerToEdit == null) return; GalaktaPlayersWindow players = new GalaktaPlayersWindow() { Owner = this }; if (players.ShowDialog() == true) { if (GalaktaPlayersWindow.GalaktaPlayersList.Count(p => p.Selected == true) > 0) { playerToEdit.IdGalakta = GalaktaPlayersWindow.GalaktaPlayersList.First(p => p.Selected == true).Player.IdGalakta; } } }