private void btnExit_Click(object sender, EventArgs e) { frmConfirm confirmForm = new frmConfirm(); confirmForm.SetConfirmText("Save challenge games? "); DialogResult result = confirmForm.ShowDialog(); if (result == DialogResult.Yes) { SaveChallengeGames(); } Close(); }
private void btnStartRanking_Click(object sender, EventArgs e) { frmConfirm confirmForm = new frmConfirm(); confirmForm.SetConfirmText("Are you sure you want to start the season and finalize the initial rankings? "); DialogResult result = confirmForm.ShowDialog(); if (result == DialogResult.Yes) { dataStore.SavePlayersToDataStore(playerList); appSettings.RankingSet = true; dataStore.SaveSettingsToDataStore(appSettings); SortPlayers(); EnableControls(); } }
private void btnRank_Click(object sender, EventArgs e) { try { frmConfirm confirmForm = new frmConfirm(); confirmForm.SetConfirmText("Are you sure you are ready to set the rankings? "); DialogResult result = confirmForm.ShowDialog(); if (result == DialogResult.Yes) { currentMeeting.SetRankings(); } } catch (Exception ex) { MessageBox.Show("Error setting rankings. " + ex.Message); } }
private void btnExit_Click(object sender, EventArgs e) { if (!meetingDataChanged) { return; } frmConfirm confirmForm = new frmConfirm(); confirmForm.SetConfirmText("Save checked-in players? "); DialogResult result = confirmForm.ShowDialog(); if (result == DialogResult.Yes) { SaveMeeting(true); } Close(); }
private void btnCheckIn_Click(object sender, EventArgs e) { clsPlayer checkInPlayer = (clsPlayer)listPlayers.Items[listPlayers.SelectedIndex]; frmConfirm confirmChallengeGame = new frmConfirm(); confirmChallengeGame.SetConfirmText("Would you like to play a challenge game today?"); DialogResult result = confirmChallengeGame.ShowDialog(); clsMeetingAttendee newAttendee = new clsMeetingAttendee(); newAttendee.Player = checkInPlayer; newAttendee.LastGame = new clsChallengeGame(); newAttendee.PlayChallengeGame = (result == DialogResult.Yes); bindCheckedIn.Add(newAttendee); bindPlayers.Remove(checkInPlayer); bindCheckedIn.Sort = "PlayerFullNameAndChallengeGame"; meetingDataChanged = true; }
private void btnMeetings_Click(object sender, EventArgs e) { Classes.clsSettings settings = dataStore.LoadSettingsFromDataStore(); bool newMeeting = false; if ((settings.meetingDates.Count == 0) || (settings.meetingDates.Last() < DateTime.Today)) { frmConfirm confirmNewMeeting = new frmConfirm(); confirmNewMeeting.SetConfirmText("Would you like to start a new meeting?"); DialogResult result = confirmNewMeeting.ShowDialog(); if (result == DialogResult.Yes) { newMeeting = true; } } frmCheckIn CheckInForm = new frmCheckIn(newMeeting); CheckInForm.ShowDialog(); }
private void btnStartGames_Click(object sender, EventArgs e) { frmConfirm ConfirmStartGames = new frmConfirm(); ConfirmStartGames.SetConfirmText("Are you sure you are ready to set the challenge games?"); DialogResult result = ConfirmStartGames.ShowDialog(); if (result == DialogResult.Yes) { SaveMeeting(false); meeting.PairAttendees(); ShowGames(); //List<clsChallengeGame> challengeGames = dataStore.LoadChallengeGamesFromDataStore(); //List<clsChallengeGame> newGames = meeting.PairAttendees(); //foreach (clsChallengeGame game in newGames) //{ // //listGames.Add(game); //} ////dataStore.SaveChallengeGamesToDataStore(listGames); //dataStore.SaveMeetingToDataStore(meeting); //Close(); } }