//public Boolean mappingSet = false; public Config(UL_PROCESSOR_SETTINGS s, UL_PROCESSOR_CLASS_SETTINGS cs) { settings = s; classSettings = cs; gOfR = cs.gOfR; gOfRMin = cs.gOfRMin; classroom = cs.classroom; root = s.dir; freePlayTimesFile = root + classroom + freePlayTimesFile; extractTimesFile = root + classroom + extractTimesFile; mappingFile = root + classroom + mappingFile + "_" + classroom + ".CSV"; adjustFile = root + classroom + adjustFile + "_" + classroom + ".csv"; ubisenseFileDir = root + classroom + ubisenseFileDir; lenaFileDir = root + classroom + lenaFileDir; lenaFile = root + classroom + lenaFile; syncFilePre = root + classroom + syncFilePre; lenaVersion = cs.lenaVersion; }
static void Main(string[] arguments) { //readLenaItsFiles("D://ADOS//"); //PythonRunner pr = new PythonRunner(); //pr.runScript(); //ItsReader r = new ItsReader(); // r.read(); //FileComparer fc = new FileComparer(); //fc.compareFiles(new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59 }, // "C://LVL//LADYBUGS1//SYNC//ADEX_07242018_267290963_2_PAIRACTIVITY_ALL_LADYBUGS1_TOTALSALL.CSV", "C://LVL//LADYBUGS1//SYNC//ITS_07242018_900772189_2_PAIRACTIVITY_ALL_LADYBUGS1_TOTALSALL.CSV", false,80,false); // napOnset(); foreach (String szArgs in arguments) { String[] args = szArgs.Split(' '); Console.WriteLine(args[0]); // Console.ReadLine(); UL_PROCESSOR_SETTINGS settingParams = new UL_PROCESSOR_SETTINGS(); settingParams.from(args); String[] settings = args;//[0].Split(' '); for (int a = 1; a < settings.Length; a++) { if (settings[a].Split('|').Length > 1) { /******** A)FOR EACH CLASSROOM:********/ UL_PROCESSOR_CLASS_SETTINGS classSettings = new UL_PROCESSOR_CLASS_SETTINGS(); classSettings.from(settings[a].Split('|')); UL_PROCESSOR_Program pc = new UL_PROCESSOR_Program(); pc.processClassroom(settingParams, classSettings); } } } Console.ReadLine(); }
public void processClassroom(UL_PROCESSOR_SETTINGS settings, UL_PROCESSOR_CLASS_SETTINGS classSettings) { ClassroomDay.first = true; List <DateTime> dateChunks = new List <DateTime>(); List <DateTime> lastDateChunks = new List <DateTime>(); List <String> fileNames = new List <string>(); int count = 0; int total = 0; Console.WriteLine(classSettings.szDates); Console.WriteLine("PROCESS " + classSettings.classroom); foreach (String szDay in classSettings.szDates.Split(',')) { Console.WriteLine(szDay); //Console.ReadLine(); if (count >= settings.chunkSize) { if (lastDateChunks.Count > 0 && UL_PROCESSOR_Program.doLeads) { dateChunks.Insert(0, lastDateChunks[lastDateChunks.Count - 1]); } Console.WriteLine("PROCESSING LB" + total); UL_CLASS_PROCESSOR_Program ul0 = new UL_CLASS_PROCESSOR_Program(new Config(settings, classSettings), dateChunks); Console.WriteLine("PROCESSING LB1 1"); ul0.process(false, total); lastDateChunks = dateChunks; dateChunks = new List <DateTime>(); count = 1; fileNames = fileNames.Concat(ul0.fileNames).ToList(); } dateChunks.Add(Convert.ToDateTime(szDay)); count++; total++; } if (lastDateChunks.Count > 0 && UL_PROCESSOR_Program.doLeads) { dateChunks.Insert(0, lastDateChunks[lastDateChunks.Count - 1]); } UL_CLASS_PROCESSOR_Program ull = new UL_CLASS_PROCESSOR_Program(new Config(settings, classSettings), dateChunks); ull.process(true, total); fileNames = fileNames.Concat(ull.fileNames).ToList(); if (settings.doSumAllFiles) { MergeCsvs(fileNames, fileNames[fileNames.Count - 1].Replace(".", "ALL.")); } Console.WriteLine("BID, DAY, VD, VC, TC, AC,OLN,NO, OC"); foreach (String szKey in ClassroomDay.sum.Keys) { Console.WriteLine(szKey + "," + ClassroomDay.sum[szKey].vd + "," + ClassroomDay.sum[szKey].vc + "," + ClassroomDay.sum[szKey].tc + "," + ClassroomDay.sum[szKey].ac + "," + ClassroomDay.sum[szKey].oln + "," + ClassroomDay.sum[szKey].no + "," + ClassroomDay.sum[szKey].otherChild); } }