/* * 读取所有方案到内存 */ public void ReadResultToMemory(string outputPath) { string strJson = FileUtil.LoadFile(outputPath + "\\" + FOLDER_NAME_RESULTS_CONFIG, FILE_NAME_PRE + StrTaskWord); TaskResultsGroup g = JsonUtility.FromJson <TaskResultsGroup>(strJson); ListTaskResult = g.ListResults; }
/* * 保存可行方案到本地 */ public void SaveResultToLocalByOutPutPath(string outputPath) { TaskResultsGroup g = new TaskResultsGroup(); g.ListResults = ListTaskResult; string strJson = JsonUtility.ToJson(g); FileUtil.CreateFile( outputPath + "\\" + FOLDER_NAME_RESULTS_CONFIG , FILE_NAME_PRE + StrTaskWord, strJson); }