private void LoadProblemsDirectory(string dir) { if (IsGrading) { throw new JudgeIsGradingException(); } judgeModel.RemoveAllProblems(); problemModel.LoadProblemsDirectory(dir); List <string> problems = problemModel.GetListProblemnames(); judgeModel.BeginTransaction(); foreach (string problem in problems) { judgeModel.InsertProblem(problem); } judgeModel.EndTransaction(); RemoveAllSubmission(); }