From f1ce4a71926976a1b3f2d1370a57dccc0e00f37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A3=8A?= Date: Thu, 17 Feb 2022 13:36:32 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=A0=8F=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E5=A2=9E=E5=8A=A0=E7=B4=A2=E5=BC=95=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TextLocator/App.config | 4 +-- TextLocator/Core/AppConst.cs | 17 ++++++++-- TextLocator/Core/AppCore.cs | 4 --- TextLocator/Index/IndexCore.cs | 22 +++++++------ TextLocator/MainWindow.xaml | 8 +++-- TextLocator/MainWindow.xaml.cs | 34 +++++++++----------- TextLocator/Service/PowerPointFileService.cs | 2 +- TextLocator/TextLocator.csproj | 1 + TextLocator/Util/CacheUtil.cs | 6 +--- 9 files changed, 53 insertions(+), 45 deletions(-) diff --git a/TextLocator/App.config b/TextLocator/App.config index 9f52dbb..b4110a5 100644 --- a/TextLocator/App.config +++ b/TextLocator/App.config @@ -18,13 +18,13 @@ - + - + diff --git a/TextLocator/Core/AppConst.cs b/TextLocator/Core/AppConst.cs index 0ac51a0..18a1074 100644 --- a/TextLocator/Core/AppConst.cs +++ b/TextLocator/Core/AppConst.cs @@ -15,11 +15,11 @@ namespace TextLocator.Core /// /// 线程池最小数量 /// - public static readonly int THREAD_POOL_MIN_SIZE = int.Parse(AppUtil.ReadValue("ThreadPool", "MinSize", "16")); + public static readonly int THREAD_POOL_MIN_SIZE = int.Parse(AppUtil.ReadValue("ThreadPool", "MinSize", "32")); /// /// 线程池最大数量 /// - public static readonly int THREAD_POOL_MAX_SIZE = int.Parse(AppUtil.ReadValue("ThreadPool", "MaxSize", "32")); + public static readonly int THREAD_POOL_MAX_SIZE = int.Parse(AppUtil.ReadValue("ThreadPool", "MaxSize", "64")); /// /// 应用目录 /// @@ -67,5 +67,18 @@ namespace TextLocator.Core /// 匹配文件后缀 /// public static readonly Regex REGIX_FILE_EXT = new Regex(@"^.+\.(" + FileTypeUtil.GetFileTypeExts("|") + ")$"); + + /// + /// 比例最小值 + /// + public const int MIN_PERCENT = 0; + /// + /// 比例最大值 + /// + public const int MAX_PERCENT = 100; + /// + /// 文件内容缩略信息截取值 + /// + public const int FILE_CONTENT_SUB_LENGTH = 120; } } diff --git a/TextLocator/Core/AppCore.cs b/TextLocator/Core/AppCore.cs index ad88dfb..e8de8fe 100644 --- a/TextLocator/Core/AppCore.cs +++ b/TextLocator/Core/AppCore.cs @@ -1,11 +1,7 @@ using log4net; using System; -using System.Collections.Generic; using System.Diagnostics; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace TextLocator.Core { diff --git a/TextLocator/Index/IndexCore.cs b/TextLocator/Index/IndexCore.cs index d39f7ed..b3c0789 100644 --- a/TextLocator/Index/IndexCore.cs +++ b/TextLocator/Index/IndexCore.cs @@ -4,14 +4,10 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; -using System.Text.RegularExpressions; using System.Threading; using TextLocator.Core; using TextLocator.Enums; using TextLocator.Factory; -using TextLocator.Index; -using TextLocator.Jieba; -using TextLocator.Service; using TextLocator.Util; namespace TextLocator.Index @@ -94,6 +90,7 @@ namespace TextLocator.Index FilePath = filePaths[i], IndexWriter = indexWriter, Callback = callback, + Rebuild = rebuild, ResetEvent = resetEvent }); } @@ -139,7 +136,8 @@ namespace TextLocator.Index { string skipMsg = "跳过文件:" + filePath; - callback(skipMsg, CalcCompletionRatio(finishCount, totalCount)); + // 跳过的文件闪烁 + callback(skipMsg, CalcFinishRatio(finishCount, totalCount)); lock (locker) { @@ -196,7 +194,7 @@ namespace TextLocator.Index string filePathPadding = filePath; try { - filePathPadding = filePath.Substring(0, 35) + "......" + filePath.Substring(filePath.Length - 35); + filePathPadding = filePath.Substring(0, 30) + "......" + filePath.Substring(filePath.Length - 30); } catch { } @@ -209,9 +207,9 @@ namespace TextLocator.Index // 缩略信息 string breviary = AppConst.REGIX_LINE_BREAKS_AND_WHITESPACE.Replace(content, ""); - if (breviary.Length > 120) + if (breviary.Length > AppConst.FILE_CONTENT_SUB_LENGTH) { - breviary = breviary.Substring(0, 120) + "..."; + breviary = breviary.Substring(0, AppConst.FILE_CONTENT_SUB_LENGTH) + "..."; } // 文件标记 @@ -243,7 +241,7 @@ namespace TextLocator.Index msg.Append(",索引:" + taskMark.ConsumeTime + "秒"); // 执行状态回调 - taskInfo.Callback(msg.ToString(), CalcCompletionRatio(finishCount, taskInfo.TotalCount)); ; + taskInfo.Callback(msg.ToString(), CalcFinishRatio(finishCount, taskInfo.TotalCount)); log.Debug(msg); } @@ -272,7 +270,7 @@ namespace TextLocator.Index /// /// /// - private static double CalcCompletionRatio(double finishCount, double totalCount) + private static double CalcFinishRatio(double finishCount, double totalCount) { return finishCount * 1.00F / totalCount * 1.00F * 100.00F; } @@ -299,6 +297,10 @@ namespace TextLocator.Index /// public Callback Callback { get; set; } /// + /// 重建 + /// + public bool Rebuild { get; set; } + /// /// 多线程重置 /// public MutipleThreadResetEvent ResetEvent { get; set; } diff --git a/TextLocator/MainWindow.xaml b/TextLocator/MainWindow.xaml index b97cb3f..292687d 100644 --- a/TextLocator/MainWindow.xaml +++ b/TextLocator/MainWindow.xaml @@ -6,7 +6,11 @@ xmlns:local="clr-namespace:TextLocator" xmlns:rubyer="clr-namespace:Rubyer;assembly=Rubyer" mc:Ignorable="d" - Title="文本搜索定位器" Width="1600" Height="900" WindowStartupLocation="CenterScreen" Icon="Resource/App.ico" Loaded="Window_Loaded"> + Title="文本搜索定位器" Width="1600" Height="900" Icon="Resource/App.ico" + WindowStartupLocation="CenterScreen" Loaded="Window_Loaded"> + + + @@ -776,7 +780,7 @@ - diff --git a/TextLocator/MainWindow.xaml.cs b/TextLocator/MainWindow.xaml.cs index 87bcf24..ba59a18 100644 --- a/TextLocator/MainWindow.xaml.cs +++ b/TextLocator/MainWindow.xaml.cs @@ -62,18 +62,6 @@ namespace TextLocator // 清理事件 CleanSearchResult(); - // 检查索引是否存在 - if (CheckIndexExist()) - { - foreach(FileInfo fi in new DirectoryInfo(AppConst.APP_INDEX_DIR).GetFiles()) - { - using (StreamReader reader = new StreamReader(fi.FullName, Encoding.UTF8)) - { - reader.ReadToEnd(); - } - } - } - // 检查配置参数信息 if (string.IsNullOrEmpty(AppUtil.ReadValue("AppConfig", "MaxCountLimit", ""))) { @@ -90,6 +78,7 @@ namespace TextLocator /// private void InitializeFileTypeFilters() { + TaskTime taskTime = TaskTime.StartNew(); // 文件类型筛选下拉框数据初始化 FileTypeFilter.Children.Clear(); FileTypeNames.Children.Clear(); @@ -106,7 +95,7 @@ namespace TextLocator }; radioButtonAll.Checked += FileType_Checked; FileTypeFilter.Children.Add(radioButtonAll); - + // 获取文件类型枚举,遍历并加入下拉列表 foreach (FileType fileType in Enum.GetValues(typeof(FileType))) @@ -134,6 +123,7 @@ namespace TextLocator Background = Brushes.DarkGray }); } + log.Debug("InitializeFileTypeFilters 耗时:" + taskTime.ConsumeTime); } /// @@ -141,6 +131,7 @@ namespace TextLocator /// private void InitializeAppConfig() { + TaskTime taskTime = TaskTime.StartNew(); // 初始化显示被索引的文件夹列表 _IndexFolders.Clear(); // 读取被索引文件夹配置信息,如果配置信息为空:默认为我的文档和我的桌面 @@ -161,6 +152,7 @@ namespace TextLocator } FolderPaths.Text = foldersText.Substring(0, foldersText.Length - 2); FolderPaths.ToolTip = FolderPaths.Text; + log.Debug("InitializeAppConfig 耗时:" + taskTime.ConsumeTime); } #endregion @@ -203,7 +195,7 @@ namespace TextLocator } // 排序 - filePaths.Sort(); + //filePaths.Sort(); // 创建索引方法 IndexCore.CreateIndex(filePaths, rebuild, ShowStatus); @@ -232,16 +224,20 @@ namespace TextLocator /// /// 显示状态 /// - /// - /// - private void ShowStatus(string text, double percent = 100) + /// 消息 + /// 进度 + private void ShowStatus(string text, double percent = AppConst.MAX_PERCENT) { Dispatcher.BeginInvoke(new Action(() => { + WorkStatus.Text = text; - if (percent > 0) + if (percent > AppConst.MIN_PERCENT) { WorkProgress.Value = percent; - } + + TaskbarItemInfo.ProgressState = percent < AppConst.MAX_PERCENT ? System.Windows.Shell.TaskbarItemProgressState.Normal : System.Windows.Shell.TaskbarItemProgressState.None; + TaskbarItemInfo.ProgressValue = WorkProgress.Value / WorkProgress.Maximum; + } })); } diff --git a/TextLocator/Service/PowerPointFileService.cs b/TextLocator/Service/PowerPointFileService.cs index cf772fe..c158b12 100644 --- a/TextLocator/Service/PowerPointFileService.cs +++ b/TextLocator/Service/PowerPointFileService.cs @@ -50,7 +50,7 @@ namespace TextLocator.Service } catch (Exception ex) { - log.Error(ex.Message, ex); + log.Error(filePath + " -> " + ex.Message, ex); } } return content; diff --git a/TextLocator/TextLocator.csproj b/TextLocator/TextLocator.csproj index 7bb5f83..2170045 100644 --- a/TextLocator/TextLocator.csproj +++ b/TextLocator/TextLocator.csproj @@ -160,6 +160,7 @@ + FileInfoItem.xaml diff --git a/TextLocator/Util/CacheUtil.cs b/TextLocator/Util/CacheUtil.cs index 46bdfb0..82b2c6d 100644 --- a/TextLocator/Util/CacheUtil.cs +++ b/TextLocator/Util/CacheUtil.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace TextLocator.Util { -- Gitee From 9d86b04af560e0cc8a207133eac082a5c96050b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A3=8A?= Date: Thu, 17 Feb 2022 14:18:03 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TextLocator/Core/TaskTime.cs | 2 +- TextLocator/Index/IndexCore.cs | 12 ++++++------ TextLocator/MainWindow.xaml.cs | 4 ++-- TextLocator/TextLocator.csproj | 29 ++++++++++++++--------------- TextLocator/Util/FileUtil.cs | 3 ++- TextLocator/packages.config | 8 ++++---- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/TextLocator/Core/TaskTime.cs b/TextLocator/Core/TaskTime.cs index 63aec50..6e56a8c 100644 --- a/TextLocator/Core/TaskTime.cs +++ b/TextLocator/Core/TaskTime.cs @@ -28,7 +28,7 @@ namespace TextLocator.Core { get { - return (DateTime.Now - beginTime).TotalSeconds; + return (DateTime.Now - beginTime).TotalMilliseconds; } } diff --git a/TextLocator/Index/IndexCore.cs b/TextLocator/Index/IndexCore.cs index b3c0789..02b5851 100644 --- a/TextLocator/Index/IndexCore.cs +++ b/TextLocator/Index/IndexCore.cs @@ -167,8 +167,8 @@ namespace TextLocator.Index TaskInfo taskInfo = obj as TaskInfo; try { - // 开始时间1 - var taskMark = TaskTime.StartNew(); + // 解析时间 + var parsingTaskMark = TaskTime.StartNew(); // 索引写入 Lucene.Net.Index.IndexWriter indexWriter = taskInfo.IndexWriter; @@ -203,7 +203,7 @@ namespace TextLocator.Index // 文件内容 string content = FileInfoServiceFactory.GetFileInfoService(fileType).GetFileContent(filePath); - msg.Append(",解析:" + taskMark.ConsumeTime + "秒"); + msg.Append(",解析:" + parsingTaskMark.ConsumeTime + "秒"); // 缩略信息 string breviary = AppConst.REGIX_LINE_BREAKS_AND_WHITESPACE.Replace(content, ""); @@ -215,8 +215,8 @@ namespace TextLocator.Index // 文件标记 string fileMark = MD5Util.GetMD5Hash(filePath); //fileInfo.DirectoryName + fileInfo.CreationTime.ToString(); - // 开始时间2 - taskMark = TaskTime.StartNew(); + // 索引时间 + var indexingTaskMark = TaskTime.StartNew(); lock (locker) { @@ -238,7 +238,7 @@ namespace TextLocator.Index indexWriter.AddDocument(doc); } - msg.Append(",索引:" + taskMark.ConsumeTime + "秒"); + msg.Append(",索引:" + indexingTaskMark.ConsumeTime + "秒"); // 执行状态回调 taskInfo.Callback(msg.ToString(), CalcFinishRatio(finishCount, taskInfo.TotalCount)); diff --git a/TextLocator/MainWindow.xaml.cs b/TextLocator/MainWindow.xaml.cs index ba59a18..24bcada 100644 --- a/TextLocator/MainWindow.xaml.cs +++ b/TextLocator/MainWindow.xaml.cs @@ -123,7 +123,7 @@ namespace TextLocator Background = Brushes.DarkGray }); } - log.Debug("InitializeFileTypeFilters 耗时:" + taskTime.ConsumeTime); + log.Debug("InitializeFileTypeFilters 耗时:" + taskTime.ConsumeTime + "秒"); } /// @@ -152,7 +152,7 @@ namespace TextLocator } FolderPaths.Text = foldersText.Substring(0, foldersText.Length - 2); FolderPaths.ToolTip = FolderPaths.Text; - log.Debug("InitializeAppConfig 耗时:" + taskTime.ConsumeTime); + log.Debug("InitializeAppConfig 耗时:" + taskTime.ConsumeTime + "秒"); } #endregion diff --git a/TextLocator/TextLocator.csproj b/TextLocator/TextLocator.csproj index 2170045..c7491ce 100644 --- a/TextLocator/TextLocator.csproj +++ b/TextLocator/TextLocator.csproj @@ -39,11 +39,11 @@ Resource\App.ico - - ..\packages\Portable.BouncyCastle.1.8.6\lib\net40\BouncyCastle.Crypto.dll + + ..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll - - ..\packages\SharpZipLib.1.3.1\lib\net45\ICSharpCode.SharpZipLib.dll + + ..\packages\SharpZipLib.1.3.2\lib\net45\ICSharpCode.SharpZipLib.dll ..\packages\jieba.NET.0.42.2\lib\net45\JiebaNet.Analyser.dll @@ -51,8 +51,8 @@ ..\packages\jieba.NET.0.42.2\lib\net45\JiebaNet.Segmenter.dll - - ..\packages\log4net.2.0.12\lib\net45\log4net.dll + + ..\packages\log4net.2.0.14\lib\net45\log4net.dll ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll @@ -72,17 +72,17 @@ ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - ..\packages\NPOI.2.5.4\lib\net45\NPOI.dll + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.dll - - ..\packages\NPOI.2.5.4\lib\net45\NPOI.OOXML.dll + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.OOXML.dll - - ..\packages\NPOI.2.5.4\lib\net45\NPOI.OpenXml4Net.dll + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXml4Net.dll - - ..\packages\NPOI.2.5.4\lib\net45\NPOI.OpenXmlFormats.dll + + ..\packages\NPOI.2.5.5\lib\net45\NPOI.OpenXmlFormats.dll ..\packages\Rubyer.1.0.16\lib\net46\Rubyer.dll @@ -160,7 +160,6 @@ - FileInfoItem.xaml diff --git a/TextLocator/Util/FileUtil.cs b/TextLocator/Util/FileUtil.cs index 0f3885f..24cd867 100644 --- a/TextLocator/Util/FileUtil.cs +++ b/TextLocator/Util/FileUtil.cs @@ -6,6 +6,7 @@ using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; +using System.Threading.Tasks; using System.Windows.Media.Imaging; using TextLocator.Core; using TextLocator.Enums; @@ -155,7 +156,7 @@ namespace TextLocator.Util foreach (string path in paths) { string fileName = path.Substring(path.LastIndexOf("\\") + 1); - if (fileName.StartsWith("`") || fileName.StartsWith("$")) + if (fileName.StartsWith("`") || fileName.StartsWith("$") || fileName.StartsWith("~") || fileName.StartsWith(".")) { continue; } diff --git a/TextLocator/packages.config b/TextLocator/packages.config index 101547c..a14f2b7 100644 --- a/TextLocator/packages.config +++ b/TextLocator/packages.config @@ -1,15 +1,15 @@  - + - - + + - + \ No newline at end of file -- Gitee From 742fb401aa472b3d9392be0b710d9314db094034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A3=8A?= Date: Thu, 17 Feb 2022 15:13:07 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- TextLocator/Core/TaskTime.cs | 2 +- TextLocator/Index/IndexCore.cs | 8 ++++---- TextLocator/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 3a08208..e4ecd1b 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ #### 依赖组件 1. [Rubyer](https://gitee.com/wuyanxin1028/rubyer-wpf) 2. [Lucene.Net](http://lucenenet.apache.org) -3. [PanGu.Lucene.Analyzer](https://github.com/NeverCL/PanGu.Lucene.Analyzer) +3. [Jieba.NET](https://github.com/anderscui/jieba.NET) 4. [NPOI](https://github.com/nissl-lab/npoi) 5. [Spire.Office](https://www.e-iceblue.com/Introduce/spire-office-for-net.html) 6. [Microsoft.Office.Interop.Excel](https://www.nuget.org/packages/Microsoft.Office.Interop.Excel/) diff --git a/TextLocator/Core/TaskTime.cs b/TextLocator/Core/TaskTime.cs index 6e56a8c..63aec50 100644 --- a/TextLocator/Core/TaskTime.cs +++ b/TextLocator/Core/TaskTime.cs @@ -28,7 +28,7 @@ namespace TextLocator.Core { get { - return (DateTime.Now - beginTime).TotalMilliseconds; + return (DateTime.Now - beginTime).TotalSeconds; } } diff --git a/TextLocator/Index/IndexCore.cs b/TextLocator/Index/IndexCore.cs index 02b5851..6c4e345 100644 --- a/TextLocator/Index/IndexCore.cs +++ b/TextLocator/Index/IndexCore.cs @@ -168,7 +168,7 @@ namespace TextLocator.Index try { // 解析时间 - var parsingTaskMark = TaskTime.StartNew(); + var taskMark = TaskTime.StartNew(); // 索引写入 Lucene.Net.Index.IndexWriter indexWriter = taskInfo.IndexWriter; @@ -203,7 +203,7 @@ namespace TextLocator.Index // 文件内容 string content = FileInfoServiceFactory.GetFileInfoService(fileType).GetFileContent(filePath); - msg.Append(",解析:" + parsingTaskMark.ConsumeTime + "秒"); + msg.Append(",解析:" + taskMark.ConsumeTime + "秒"); // 缩略信息 string breviary = AppConst.REGIX_LINE_BREAKS_AND_WHITESPACE.Replace(content, ""); @@ -216,7 +216,7 @@ namespace TextLocator.Index string fileMark = MD5Util.GetMD5Hash(filePath); //fileInfo.DirectoryName + fileInfo.CreationTime.ToString(); // 索引时间 - var indexingTaskMark = TaskTime.StartNew(); + taskMark = TaskTime.StartNew(); lock (locker) { @@ -238,7 +238,7 @@ namespace TextLocator.Index indexWriter.AddDocument(doc); } - msg.Append(",索引:" + indexingTaskMark.ConsumeTime + "秒"); + msg.Append(",索引:" + taskMark.ConsumeTime + "秒"); // 执行状态回调 taskInfo.Callback(msg.ToString(), CalcFinishRatio(finishCount, taskInfo.TotalCount)); diff --git a/TextLocator/Properties/AssemblyInfo.cs b/TextLocator/Properties/AssemblyInfo.cs index 8369d75..3866ac7 100644 --- a/TextLocator/Properties/AssemblyInfo.cs +++ b/TextLocator/Properties/AssemblyInfo.cs @@ -49,8 +49,8 @@ using System.Windows; //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.1.1")] -[assembly: AssemblyFileVersion("1.1.1.1")] +[assembly: AssemblyVersion("1.2.0")] +[assembly: AssemblyFileVersion("1.2.0.0")] // log4net [assembly: log4net.Config.XmlConfigurator(Watch = true)] \ No newline at end of file -- Gitee From b90a5d729b7f275b2567b379e05c6cdd5c63ec4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A3=8A?= Date: Thu, 17 Feb 2022 16:51:49 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TextLocator/App.config | 8 ++++ TextLocator/Service/NoTextFileService.cs | 4 +- TextLocator/TextLocator.csproj | 60 ++++++++++++------------ TextLocator/packages.config | 6 +-- 4 files changed, 43 insertions(+), 35 deletions(-) diff --git a/TextLocator/App.config b/TextLocator/App.config index b4110a5..b471d02 100644 --- a/TextLocator/App.config +++ b/TextLocator/App.config @@ -57,6 +57,14 @@ + + + + + + + + \ No newline at end of file diff --git a/TextLocator/Service/NoTextFileService.cs b/TextLocator/Service/NoTextFileService.cs index 0d3212e..fc9ac84 100644 --- a/TextLocator/Service/NoTextFileService.cs +++ b/TextLocator/Service/NoTextFileService.cs @@ -22,8 +22,8 @@ namespace TextLocator.Service System.Diagnostics.FileVersionInfo info = System.Diagnostics.FileVersionInfo.GetVersionInfo(filePath); StringBuilder builder = new StringBuilder(); builder.Append("文件名称:" + info.FileName.Substring(info.FileName.LastIndexOf("\\") + 1)); - builder.Append("\r\n更新时间:" + fileInfo.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss")); - builder.Append("\r\n文件大小:" + Math.Ceiling(fileInfo.Length / 1024.0) + " KB"); + builder.Append(";更新时间:" + fileInfo.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss")); + builder.Append(";文件大小:" + Math.Ceiling(fileInfo.Length / 1024.0) + " KB"); return builder.ToString(); } diff --git a/TextLocator/TextLocator.csproj b/TextLocator/TextLocator.csproj index c7491ce..7daa739 100644 --- a/TextLocator/TextLocator.csproj +++ b/TextLocator/TextLocator.csproj @@ -39,11 +39,11 @@ Resource\App.ico - - ..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll + + ..\packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll - - ..\packages\SharpZipLib.1.3.2\lib\net45\ICSharpCode.SharpZipLib.dll + + ..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll ..\packages\jieba.NET.0.42.2\lib\net45\JiebaNet.Analyser.dll @@ -87,47 +87,47 @@ ..\packages\Rubyer.1.0.16\lib\net46\Rubyer.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.Barcode.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.Barcode.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.DataExport.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.DataExport.dll - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.DataExport.ResourceMgr.dll + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.DataExport.ResourceMgr.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.Doc.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.Doc.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.DocViewer.Forms.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.DocViewer.Forms.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.Email.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.Email.dll - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.License.dll + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.License.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.OfficeViewer.Forms.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.OfficeViewer.Forms.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.Pdf.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.Pdf.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.PdfViewer.Asp.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.PdfViewer.Asp.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.PdfViewer.Forms.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.PdfViewer.Forms.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.Presentation.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.Presentation.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.Spreadsheet.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.Spreadsheet.dll - - ..\packages\Spire.Office.6.8.2\lib\net40\Spire.XLS.dll + + ..\packages\Spire.Office.7.2.0\lib\net40\Spire.XLS.dll diff --git a/TextLocator/packages.config b/TextLocator/packages.config index a14f2b7..872d517 100644 --- a/TextLocator/packages.config +++ b/TextLocator/packages.config @@ -8,8 +8,8 @@ - + - - + + \ No newline at end of file -- Gitee