Пример #1
0
        private void CreateNewButton_Click(object sender, EventArgs e)
        {
            Tournament             temp = new Tournament(x.Next(0, 100000));
            TournamentCreationForm a    = new TournamentCreationForm(temp);

            a.FormClosed += new FormClosedEventHandler(Form1_FormClosed);

            void Form1_FormClosed(object s, FormClosedEventArgs el)
            {
                // Do something
                if (temp.GetFlag())
                {
                    t.Add(temp);
                }
                UpdateUserTournaments();
            }
        }