private void BtnAddPlayer_Click(object sender, RoutedEventArgs e) { AddEditPlayer addEditMateralWindow = new AddEditPlayer(); this.Opacity = 0.3; Filter(); addEditMateralWindow.ShowDialog(); Filter(); this.Opacity = 1; }
private void BtnEditPlayer_Click(object sender, RoutedEventArgs e) { try { if (ListViewSquad.SelectedItem is ViewAllInfo player) { VarIdPlayer = player.IdPlayer; AddEditPlayer addEditMateralWindow = new AddEditPlayer(ListViewSquad.SelectedItem as ViewAllInfo); this.Opacity = 0.3; Filter(); addEditMateralWindow.ShowDialog(); Filter(); this.Opacity = 1; } else { MessageBox.Show("You did not select player", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } catch { MessageBox.Show("Error", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }