示例#1
0
        public static bool IndexExist(string name, HHI_Prefix prefix, out string index)
        {
            string studentIndex = "";

            try {
                studentIndex = HHI_Module.FileNameToIndex(name);
            } catch (Exception e) {
                MessageBox.Show("路径:" + studentIndex + "未知错误\n\n" + e.ToString());
            }
            if (studentIndex == "")
            {
                MessageBox.Show("未检测到文件夹名种有学号 \n 学号有误,请重新检查", "错误");
                index = studentIndex;
                return(false);
            }
            int nStudentIndex = Convert.ToInt32(studentIndex);

            index = studentIndex;
            if (!stLib_CS.Generic.ListHelper.IsIn(HHI_Module.GetPrefixIndexList(prefix), nStudentIndex))
            {
                MessageBox.Show("目前的学号为:" + studentIndex + " 学号有误,请重新检查", "错误");
                return(false);
            }
            return(true);
        }
示例#2
0
        public static List <string> GetFileNames(HHI_HandIn hi)
        {
            List <string> files;

            // process folder
            if (hi.IsSubItemFolder)
            {
                // process file
                files = HHI_Module.FindFolders(hi.Path);
            }
            else
            {
                // process file
                files = HHI_Module.FindFile(hi.Path);
            }
            return(files);
        }