Exemplo n.º 1
0
        private static bool SaveGroup(GroupVM group, List <string> studyUnitPathNames, bool queryPathName)
        {
            if (!QuerySavePathName(group, GROUP_FILTER, queryPathName))
            {
                return(false);
            }
            string baseDir = Path.GetDirectoryName(group.PathName) + Path.DirectorySeparatorChar;

            group.GroupModel.StudyUnitRelPathNames.Clear();
            foreach (string absPath in studyUnitPathNames)
            {
                string relPath = EDOUtils.AbsToRel(absPath, baseDir);
                group.GroupModel.StudyUnitRelPathNames.Add(relPath);
            }
            EDOSerializer.DoSave <Group>(group.GroupModel);
            return(true);
        }