示例#1
0
        /// <summary>
        /// 单个简历分析直接输出数据到控制台
        /// </summary>
        private void AnalysisOne()
        {
            Document   thisdoc    = new Document(SelectBox.Text);
            ResumeData thisResume = ResumeSelect.CheckResume(thisdoc);

            MsgBox.Text = thisResume.ToString();
        }
示例#2
0
        /// <summary>
        /// 批量简历分析
        /// </summary>
        private void BatchAnalysis()
        {
            isAnalysis = true;
            int    count     = 0;
            int    failCount = 0;
            string failName  = "";

            var fileNames = Directory.GetFiles(SelectBox.Text, "*.*", SearchOption.AllDirectories).Where(s => s.EndsWith(".doc") || s.EndsWith(".docx"));

            foreach (var fileName in fileNames)
            {
                count++;
                FileInfo   thisFile       = new FileInfo(fileName);
                Document   thisDoc        = new Document(thisFile.FullName);
                ResumeData thisResumeData = ResumeSelect.CheckResume(thisDoc);
                if (thisResumeData != null)
                {
                    resumeList.Add(thisResumeData);
                    PrintMsg(thisFile.Name + "分析完毕!!!\n" + "已分析份数:" + count);
                }
                else
                {
                    failCount++;
                    failName += "\n" + fileName;
                }
            }

            ExportHelp.DataExport(resumeList, SaveBox.Text + "\\" + m_ExportExcelName);
            isAnalysis = false;
            PrintMsg(string.Format("简历分析完毕,总共分析成功份数:{0}, 失败数:{1} \n 失败文件:\n{2}", count, failCount, failName));
        }