private void getAllScenarioTestResults(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;
            List<String> results = new List<String>();
            for (int i = 1; i < 10; i++)
            {
                new SQLDeleter();
                Persistence offLinePersistence = new Persistence();
                this.persistence = new Persistence();

                //string loc = "C:\\TEMP\\set1.txt";
                string loc = "C:\\TEMP\\RScen" + i + ".txt";
                RandomScenarioGenerator randGen = new RandomScenarioGenerator();
                // Scenario generatedScenario = randGen.generateRandomScenario(2000);
                //randGen.ObjectToFile(generatedScenario, loc);
                Scenario temp = (Scenario)randGen.FileToObject(loc);
                //generatedScenario.playEvents(this.persistence, tempPersistence);
                ScenarioAnalyser analyser = new ScenarioAnalyser(loc);
                //Scenario temp = new CustomScenario();

                //CustomOBScenario obScen = new CustomOBScenario();
                temp.playEvents(this.persistence, offLinePersistence);

                results.Add("Testset: " + i +"\n"
                                + "Commited : " + this.persistence.getLatestStreamRevision() + " \n"
                                + "BaseConflicts : " + analyser.baseConflictAmount + " \n"
                                + "FOund conflicts " + offLinePersistence.allConflicts.Count + " \n"
                                + "Percentage solved" + (1 - (float)offLinePersistence.allConflicts.Count / (float)analyser.baseConflictAmount) + " \n"
                                + "" + "" + " \n");

                worker.ReportProgress(0, results[i-1]);

            }
        }
 public ScenarioAnalyser(string scenarioLocation)
 {
     RandomScenarioGenerator randGen = new RandomScenarioGenerator();
     currentScenario = (Scenario)randGen.FileToObject(scenarioLocation);
     analyseScenario();
 }