internal static SurveyFolder DeserializeSurveyFolderFromFile(string _path, string _name) { string content = File.ReadAllText(_path + "\\" + _name); SurveyFolder obj = JsonConvert.DeserializeObject <SurveyFolder>(content); return(obj); }
public ProjectFolder(string _title, string _location) { this.title = _title; this.location = _location; playlists = new AudioFolder(ContentLocation, AUDIO_FOLDER_NAME); movies = new VideoFolder(ContentLocation, VIDEO_FOLDER_NAME); articles = new PDFFolder(ContentLocation, PDF_FOLDER_NAME); announces = new VideoFolder(ContentLocation, ANNOUNC_FOLDER_NAME); questions = new SurveyFolder(ContentLocation, SURVEY_FOLDER_NAME); }
internal static SurveyFolder SerializeFromJSON(string _surLocation, string _surFolderName, string _fileName) { SurveyFolder retVal = new SurveyFolder(_surLocation, _surFolderName); if (DiskIO.IsFileExist(_surLocation + "\\" + _surFolderName, _fileName)) { retVal = DiskIO.DeserializeSurveyFolderFromFile(_surLocation + "\\" + _surFolderName, _fileName); } retVal.SetLocationTitle(_surLocation, _surFolderName); return(retVal); }
public ProjectFolder(string _mcmFilePath) { string mcmContent = DiskIO.ReadTextFile(_mcmFilePath); string[] tempArr = mcmContent.Split(';'); this.title = tempArr[0]; this.location = tempArr[1]; playlists = new AudioFolder(ContentLocation, AUDIO_FOLDER_NAME); playlists = AudioFolder.SerializeFromJSON(ContentLocation, AUDIO_FOLDER_NAME, "index.en.json"); movies = new VideoFolder(ContentLocation, VIDEO_FOLDER_NAME); movies = VideoFolder.SerializeFromJSON(ContentLocation, VIDEO_FOLDER_NAME, "index.en.json"); announces = new VideoFolder(ContentLocation, ANNOUNC_FOLDER_NAME); announces = VideoFolder.SerializeFromJSON(ContentLocation, ANNOUNC_FOLDER_NAME, "index.en.json"); articles = new PDFFolder(ContentLocation, PDF_FOLDER_NAME); articles = PDFFolder.SerializeFromJSON(ContentLocation, PDF_FOLDER_NAME, "index.en.json"); questions = new SurveyFolder(ContentLocation, SURVEY_FOLDER_NAME); questions = SurveyFolder.SerializeFromJSON(ContentLocation, SURVEY_FOLDER_NAME, "index.en.json"); }