private void AddGameForm_OnDataAvailable(object sender, EventArgs e) { AddedGamesEventArgs args = (AddedGamesEventArgs)e; if (args.IsNew) { _gamesList.Add(args.Result); } }
private void btnOkay_Click(object sender, EventArgs e) { if (txtName.Text != string.Empty) { this._gameKeyItem.Title = txtName.Text; AddedGamesEventArgs myCustom = new AddedGamesEventArgs(_gameKeyItem, isNew); if (OnDataAvailable != null) { OnDataAvailable(this, myCustom); } Close(); } else { MessageBox.Show("Please enter a Name for the game"); } }