private FileManipulation(FormMain globalFormMain) { _globalFormMain = globalFormMain; CreateMainFolderAndPathsExeLocation(); MoveOldStroopVersion(); CreateSubFolders(_reactionTestFilesPath); CreateSubFolders(_stroopTestFilesPath); CreateSubFolders(_experimentTestFilesPath); CreateSubFolders(_matchingTestFilesPath); CreateFolder(_listFolderName); CreateFolder(_participantDataPath); CreateBackupFolders(); if (Directory.Exists(_defaultPath + "/StroopTestFiles")) { Directory.Delete(_defaultPath + "/StroopTestFiles", true); } // converting old implementations of file lists to new version StrList.convertFileLists(); // create default stroop and reaction programs, adding default word and color lists InitializeDefaultPrograms(); }
public void setAudioListFile(string listName) { if (listName != "false") { audioListFile = new StrList(listName, 1); } else { audioListFile = null; } }
public void setImageListFile(string listName) { if (listName != "false") { imagesListFile = new StrList(listName, 0); } else { imagesListFile = null; } }
public void setColorListFile(string listName) { if (listName != "false") { colorsListFile = new StrList(listName, 3); } else { colorsListFile = null; } }
// creates word list object in case program has one public void setWordListFile(string listName) { if (listName != "false") { wordsListFile = new StrList(listName, 2); } else { wordsListFile = null; } }
private static void convertingList(string[] lists) { foreach (string list in lists) { string[] name = Path.GetFileNameWithoutExtension(list).Split('_'); List <string> content = readListFile(list).ToList(); StrList newList = new StrList(content, name[0], "_" + name[1]); newList.saveContent(true); File.Delete(list); } }
/// <summary> /// Create default programs of tests, examples of tests configurations that can be run without needing any modification /// Currently, there are stroop program, reaction program, color list and word list. /// </summary> private void InitializeDefaultPrograms() { StroopProgram programDefault = new StroopProgram(); programDefault.writeDefaultProgramFile(_stroopTestFilesPath + _programFolderName); ReactionProgram defaultProgram = new ReactionProgram(); defaultProgram.writeDefaultProgramFile(); StrList.writeDefaultWordsList(_listFolderName); StrList.writeDefaultColorsList(_listFolderName); }
private FileManipulation(string path) { _globalFormMain = null; CreateMainFolderAndPaths(path); MoveOldStroopVersion(); CreateSubFolders(_reactionTestFilesPath); CreateSubFolders(_stroopTestFilesPath); CreateSubFolders(_experimentTestFilesPath); CreateSubFolders(_matchingTestFilesPath); /* creating Lists folder*/ CreateFolder(_listFolderName); CreateFolder(_participantDataPath); // converting old implementations of file lists to new version StrList.convertFileLists(); // create default stroop and reaction programs, adding default word and color lists InitializeDefaultPrograms(); }