void WorstResponseReleaseCheck(object sender, RoutedEventArgs e) { string fileDir = null; if (worstResponseList.FileName != null) { fileDir = Path.Combine(Path.GetDirectoryName(worstResponseList.FileName), "TDWorstResponse"); } for (int i = 0, end = worstResponseList.Count; i < end; ++i) { for (int j = i + 1; j < end; ++j) { if (worstResponseList[i].ID == worstResponseList[j].ID) { WorstResponses.ResponseIssue(string.Format("There are multiple {0} IDs.", worstResponseList[i].ID)); return; } } if (worstResponseList.FileName != null && !Parsing.CheckAudio(fileDir, worstResponseList[i].ID)) { WorstResponses.ResponseIssue(string.Format("Audio files are missing for response ID {0}.", worstResponseList[i].ID)); return; } } MessageBox.Show("Release check successful. This response set is compatible with the game.", "Release check result"); }
void QuestionReleaseCheck(object sender, RoutedEventArgs e) { string questionFileDir = null; if (questionList.FileName != null) { questionFileDir = Path.Combine(Path.GetDirectoryName(questionList.FileName), "TDQuestion"); } for (int i = 0, end = questionList.Count; i < end; ++i) { for (int j = i + 1; j < end; ++j) { if (questionList[i].ID == questionList[j].ID) { Questions.QuestionIssue(string.Format("There are multiple {0} IDs.", questionList[i].ID)); return; } } if (questionList.FileName != null && !Parsing.CheckAudio(questionFileDir, questionList[i].ID)) { Questions.QuestionIssue(string.Format("Audio files are missing for question ID {0}.", questionList[i].ID)); return; } } MessageBox.Show("Release check successful. This question set is compatible with the game.", "Release check result"); }
void FinalRoundReleaseCheck(object sender, RoutedEventArgs e) { string finalRoundFileDir = null; if (finalRoundList.FileName != null) { finalRoundFileDir = Path.Combine(Path.GetDirectoryName(finalRoundList.FileName), "TDFinalRound"); } for (int i = 0, end = finalRoundList.Count; i < end; ++i) { for (int j = i + 1; j < end; ++j) { if (finalRoundList[i].ID == finalRoundList[j].ID) { FinalRounders.FinalRoundIssue(string.Format("There are multiple {0} IDs.", finalRoundList[i].ID)); return; } } if (finalRoundList[i].Items.Count < 3) { FinalRounders.FinalRoundIssue(string.Format("{0} has less than 3 answers.", finalRoundList[i].Text)); return; } if (finalRoundList.FileName != null && !Parsing.CheckAudio(finalRoundFileDir, finalRoundList[i].ID)) { FinalRounders.FinalRoundIssue(string.Format("Audio files are missing for topic ID {0}.", finalRoundList[i].ID)); return; } } MessageBox.Show("Release check successful. This topic set is compatible with the game.", "Release check result"); }