Esempio n. 1
0
        private void addButton_Click(object sender, EventArgs e)
        {
            PlayerForm playerForm = new PlayerForm();

            if (playerForm.ShowDialog() == DialogResult.OK)
            {
                players.Add(playerForm.NewPlayer);
                playerTable.Rows.Add(playerForm.NewPlayer.Name, playerForm.NewPlayer.Club, playerForm.NewPlayer.NumberOfGoals);
                if (events)
                {
                    logList.Items.Add("Hráč " + playerForm.NewPlayer.Name + " byl vložen.");
                }
            }
        }
Esempio n. 2
0
        private void editButton_Click(object sender, EventArgs e)
        {
            PlayerForm playerForm = new PlayerForm();

            playerForm.SetForm(players[playerTable.CurrentCell.RowIndex]);
            //playerForm.NewPlayer = players[playerTable.CurrentCell.RowIndex];
            if (playerForm.ShowDialog() == DialogResult.OK)
            {
                players[playerTable.CurrentCell.RowIndex] = playerForm.NewPlayer;
                this.RefreshList();
                if (events)
                {
                    logList.Items.Add("Hráč " + playerForm.NewPlayer.Name + " byl editován.");
                }
            }
        }