Exemple #1
0
        public void createProblemset(string name, int points, int problem, string example, PictureBox pic, string funct, int[] acceptedValues)
        {
            ProblemSet n = new ProblemSet(name, points, example, null, new Solver(new ProblemFunction(funct, acceptedValues), problem, points));

            problems.Add(n);
            Storage.problemDatabase.Add(name, n);
        }
Exemple #2
0
 private void loadProblemSet(ProblemSet problemSet)
 {
     problem_name.Text    = problemSet.problemSetName;
     problem_points.Text  = "" + problemSet.score;
     problem_details.Text = problemSet.example;
     toOpen        = problemSet.buttonName;
     problem_image = problemSet.picture;
 }
Exemple #3
0
        private static void ReadProblems()
        {
            string cr = PRBIO.Read();

            string[] ln = cr.Split('\n');
            foreach (string l in ln)
            {
                if (l.Length < 2)
                {
                    continue;
                }
                string[] r = l.Split(':');
                Console.WriteLine(l);

                ProblemSet newProblemSet = new ProblemSet(r[0], _p(r[1]), r[2], null, new Solver(new ProblemFunction(r[3], _p(r[4]), _p(r[5])), _p(r[1]), _p(r[1])));
                problemDatabase.Add(r[0], newProblemSet);
            }
        }
Exemple #4
0
 private void addToListView(ProblemSet problemSet)
 {
     problem_list.Items.Add(problemSet.problemSetName);
 }
Exemple #5
0
 public void addCompletedSet(ProblemSet completed)
 {
     completedSets.Add(completed);
 }