Пример #1
0
        private void updateFormVisibleChanged(object sender, EventArgs e)       //method for frmUpdateScore visibility change
        {
            frmUpdateScore updateForm = (frmUpdateScore)sender;                 //declare instance of form update score

            if (!updateForm.Visible & updateForm.DoUpdate())                    //declare new instance of frmUpdateScore
            {
                updatedList[listBoxScores.SelectedIndex] = updateForm.newScore; //update the list with new score frmUpdateScore
                FillListBoxScores();                                            //call fill list box method
                updateForm.Dispose();                                           //dispose of the form
                this.Show();
            }
        }