feat: 日志底层组件采用log4net
This commit is contained in:
parent
fb2f5e0d16
commit
2bebf743ba
Binary file not shown.
@ -143,6 +143,9 @@
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=1.4.2.13, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpZipLib.1.4.2\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=3.0.4.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.3.0.4\lib\net462\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MathNet.Numerics, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cd8b63ad3d691a37, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MathNet.Numerics.Signed.5.0.0\lib\net461\MathNet.Numerics.dll</HintPath>
|
||||
</Reference>
|
||||
@ -198,6 +201,7 @@
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.OracleClient" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
@ -238,6 +242,7 @@
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
@ -396,7 +401,7 @@
|
||||
<Compile Include="core\Tools.cs" />
|
||||
<Compile Include="core\MainPanelWebMessage.cs" />
|
||||
<Compile Include="core\ExportConfig.cs" />
|
||||
<Compile Include="Logger.cs" />
|
||||
<Compile Include="LogHelper.cs" />
|
||||
<Compile Include="Model\BridgeResult.cs" />
|
||||
<Compile Include="Model\CommonsenseDetectionItem.cs" />
|
||||
<Compile Include="Model\DocumentContent.cs" />
|
||||
|
@ -2,6 +2,7 @@
|
||||
using AIProofread.core;
|
||||
using AIProofread.Model;
|
||||
using AIProofread.Util;
|
||||
using log4net;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
using Microsoft.Web.WebView2.WinForms;
|
||||
@ -45,6 +46,7 @@ namespace AIProofread
|
||||
private static object missing = System.Reflection.Missing.Value;
|
||||
|
||||
private static UpgradeData CurrentUpgrade = null;
|
||||
public static readonly ILog Logger = LogHelper.GetLogger(typeof(Bridge));
|
||||
|
||||
public void ShowUpgradeView()
|
||||
{
|
||||
@ -138,7 +140,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
Logger.Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,7 +249,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log(e);
|
||||
Logger.Error("启动升级程序失败", e);
|
||||
if (showFail)
|
||||
{
|
||||
MessageBox.Show("启动升级程序失败,请重试");
|
||||
@ -271,7 +273,7 @@ namespace AIProofread
|
||||
|
||||
public void ShowLog(string message)
|
||||
{
|
||||
Logger.Log((Config.IS_WPS ? "WPS" : "WORD") + "-WEB", message);
|
||||
Logger.Info((Config.IS_WPS ? "WPS" : "WORD") + "-WEB " + message);
|
||||
}
|
||||
|
||||
public void ShowLoginForm(string action)
|
||||
@ -425,13 +427,13 @@ namespace AIProofread
|
||||
}
|
||||
catch (POIXMLException ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
Logger.Error("校对文档格式有误或内容异常", ex);
|
||||
data["code"] = 5;
|
||||
data["message"] = "文档格式有误或内容异常,请另存文档后再进行校对";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
Logger.Error("校对文档格式有误或内容异常", ex);
|
||||
throw ex;
|
||||
}
|
||||
//if (loadingDialog != null && !loadingDialog.IsDisposed)
|
||||
@ -586,7 +588,9 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
|
||||
Logger.Error("初始化web环境失败", ex);
|
||||
LogHelper.Log(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -752,7 +756,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("Initial Content error:" + ex.Message + "\n" + ex.StackTrace + "\n\n");
|
||||
Logger.Error("Initial Content error:",ex);
|
||||
return "false";
|
||||
}
|
||||
return "true";
|
||||
@ -843,7 +847,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("导出勘误表失败:" + ex.Message + "\n" + ex.StackTrace + "\n\n");
|
||||
Logger.Error("导出勘误表失败:" + ex.Message,ex);
|
||||
return BridgeResult.Error(-1, ex.Message);
|
||||
}
|
||||
}
|
||||
@ -894,7 +898,7 @@ namespace AIProofread
|
||||
}
|
||||
try
|
||||
{
|
||||
Logger.Log("SaveCache " + document.fileName + " used " + document.ProofreadCachePath);
|
||||
Logger.Info("SaveCache " + document.fileName + " used " + document.ProofreadCachePath);
|
||||
|
||||
if (File.Exists(document.ProofreadCachePath))
|
||||
{
|
||||
@ -924,7 +928,7 @@ namespace AIProofread
|
||||
{
|
||||
return BridgeResult.Error(1, "cache-not-exists");
|
||||
}
|
||||
Logger.Log("Load cache " + document.fileName + " used " + document.ProofreadCachePath);
|
||||
Logger.Info("Load cache " + document.fileName + " used " + document.ProofreadCachePath);
|
||||
try
|
||||
{
|
||||
return BridgeResult.Success(File.ReadAllText(document.ProofreadCachePath));
|
||||
|
@ -1,4 +1,5 @@
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
using log4net;
|
||||
using Microsoft.Web.WebView2.Core;
|
||||
using Microsoft.Web.WebView2.WinForms;
|
||||
using NPOI.SS.Util;
|
||||
using System;
|
||||
@ -16,6 +17,7 @@ namespace AIProofread.Controls
|
||||
[ComVisible(true)]
|
||||
public class BaseWinForm : Form
|
||||
{
|
||||
#region WIN32 API
|
||||
[DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")]
|
||||
private static extern IntPtr CreateRoundRectRgn(
|
||||
int nLeftRect, // x-coordinate of upper-left corner
|
||||
@ -51,6 +53,9 @@ namespace AIProofread.Controls
|
||||
private const int WM_NCHITTEST = 0x84; // variables for dragging the form
|
||||
private const int HTCLIENT = 0x1;
|
||||
private const int HTCAPTION = 0x2;
|
||||
#endregion
|
||||
|
||||
private readonly ILog logger = LogHelper.GetLogger(typeof(BaseWinForm));
|
||||
|
||||
protected override CreateParams CreateParams
|
||||
{
|
||||
@ -117,7 +122,7 @@ namespace AIProofread.Controls
|
||||
this.Height = height;
|
||||
}
|
||||
|
||||
protected async void InitWebView(WebView2 webView,String url,string name,Action callaback = null)
|
||||
protected async void InitWebView(WebView2 webView, String url, string name, Action callaback = null)
|
||||
{
|
||||
//Bridge.InitWebEnvAsync(name, webView);
|
||||
try
|
||||
@ -132,15 +137,16 @@ namespace AIProofread.Controls
|
||||
webView.CoreWebView2.AddHostObjectToScript("event", eventForwarder);
|
||||
webView.CoreWebView2.AddHostObjectToScript("host", this);
|
||||
webView.CoreWebView2.AddHostObjectToScript("bridge", Bridge.bridge);
|
||||
if(callaback != null)
|
||||
if (callaback != null)
|
||||
{
|
||||
callaback();
|
||||
}
|
||||
|
||||
webView.Source = new Uri(url);
|
||||
}catch (Exception ex)
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("\ninit webview error:" + ex.Message + "\n" + ex.StackTrace);
|
||||
logger.Error("\ninit webview error:" + ex.Message, ex);
|
||||
}
|
||||
}
|
||||
public void Download(string url)
|
||||
@ -170,7 +176,7 @@ namespace AIProofread.Controls
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("\nDownload error:" + ex.Message + "\n" + ex.StackTrace);
|
||||
logger.Error("\nDownload error:" + ex.Message, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ namespace AIProofread.Controls
|
||||
|
||||
private void FormLogger_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
Logger.LoggerForm = null;
|
||||
LogHelper.LoggerForm = null;
|
||||
}
|
||||
|
||||
private void TsmiClear_Click(object sender, EventArgs e)
|
||||
|
103
AIProofread/LogHelper.cs
Normal file
103
AIProofread/LogHelper.cs
Normal file
@ -0,0 +1,103 @@
|
||||
using AIProofread.Controls;
|
||||
using log4net.Config;
|
||||
using log4net;
|
||||
using System;
|
||||
using System.IO;
|
||||
using log4net.Appender;
|
||||
using log4net.Layout;
|
||||
using log4net.Repository.Hierarchy;
|
||||
|
||||
namespace AIProofread
|
||||
{
|
||||
public class LogHelper
|
||||
{
|
||||
public static FormLogger LoggerForm;
|
||||
|
||||
//private static readonly string AppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
public static ILog Logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
static LogHelper()
|
||||
{
|
||||
//log4net.GlobalContext.Properties["APP_DATA"] = Config.APP_LOG_PATH;
|
||||
//XmlConfigurator.Configure();
|
||||
//Logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository();
|
||||
PatternLayout layout = new PatternLayout("%date [%thread] %-5level %logger - %message%newline");
|
||||
layout.ActivateOptions();
|
||||
//string appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
//string logFilePath = Path.Combine(appDataPath, "YourAppName", "logs");
|
||||
|
||||
RollingFileAppender roller = new RollingFileAppender();
|
||||
roller.File = Config.APP_LOG_PATH;
|
||||
roller.AppendToFile = true;
|
||||
roller.RollingStyle = RollingFileAppender.RollingMode.Date;
|
||||
roller.DatePattern = "yyyy-MM-dd'.txt'";
|
||||
roller.StaticLogFileName = false;
|
||||
roller.Layout = layout;
|
||||
roller.ActivateOptions();
|
||||
hierarchy.Root.AddAppender(roller);
|
||||
hierarchy.Root.Level = log4net.Core.Level.Debug;
|
||||
hierarchy.Configured = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="msg"></param>
|
||||
public static void Log(string tag, string message)
|
||||
{
|
||||
string time = DateTime.Now.ToString("HH:mm:ss");
|
||||
|
||||
// 如果日志窗口已经打开,则显示日志
|
||||
if (LoggerForm != null && !LoggerForm.IsDisposed && LoggerForm.Visible)
|
||||
{
|
||||
LoggerForm.Log(time, tag, message);
|
||||
}
|
||||
if (!Directory.Exists(Config.APP_LOG_PATH))
|
||||
{
|
||||
Directory.CreateDirectory(Config.APP_LOG_PATH);
|
||||
}
|
||||
Logger.Debug($"[{tag}] {message}");
|
||||
//try
|
||||
//{
|
||||
// string path = Config.APP_LOG_PATH + DateTime.Now.ToString("yyyy-MM-dd") + ".txt";
|
||||
// StreamWriter streamWriter = File.AppendText(path);
|
||||
// streamWriter.WriteLine("***************************[" + tag + "]***************************");
|
||||
// streamWriter.WriteLine("消息:" + message);
|
||||
// streamWriter.WriteLine("时间:" + time);
|
||||
// streamWriter.WriteLine();
|
||||
// streamWriter.Flush();
|
||||
// streamWriter.Close();
|
||||
// streamWriter.Dispose();
|
||||
//}
|
||||
//catch (Exception) { }
|
||||
}
|
||||
public static void Log(string msg)
|
||||
{
|
||||
Log((Config.IS_WPS ? "WPS" : "WORD"), msg);
|
||||
}
|
||||
public static void Log(Exception e)
|
||||
{
|
||||
Logger.Error(Config.IS_WPS ? "WPS" : "WORD" + e.ToString(), e);
|
||||
//Log(e.Message + "\n" + e.StackTrace);
|
||||
}
|
||||
public static void Log(string tag, Exception e)
|
||||
{
|
||||
Logger.Error(tag, e);
|
||||
}
|
||||
|
||||
public static void LogToWeb(string msg)
|
||||
{
|
||||
if (Config.RUN_IN_DEBUG)
|
||||
{
|
||||
Globals.ThisAddIn.SendMessageToWeb("DEBUG-LOG", msg);
|
||||
}
|
||||
}
|
||||
|
||||
internal static ILog GetLogger(Type type)
|
||||
{
|
||||
return LogManager.GetLogger(type);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
using AIProofread.Controls;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Windows.Interop;
|
||||
|
||||
namespace AIProofread
|
||||
{
|
||||
public class Logger
|
||||
{
|
||||
public static FormLogger LoggerForm;
|
||||
//private static readonly string AppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="msg"></param>
|
||||
public static void Log(string tag,string message)
|
||||
{
|
||||
string time = DateTime.Now.ToString("HH:mm:ss");
|
||||
|
||||
// 如果日志窗口已经打开,则显示日志
|
||||
if (LoggerForm != null && !LoggerForm.IsDisposed && LoggerForm.Visible)
|
||||
{
|
||||
LoggerForm.Log(time, tag, message);
|
||||
}
|
||||
string path = Config.APP_LOG_PATH + DateTime.Now.ToString("yyyy-MM-dd") + ".txt";
|
||||
if (!Directory.Exists(Config.APP_LOG_PATH))
|
||||
{
|
||||
Directory.CreateDirectory(Config.APP_LOG_PATH);
|
||||
}
|
||||
try
|
||||
{
|
||||
StreamWriter streamWriter = File.AppendText(path);
|
||||
streamWriter.WriteLine("***************************[" + tag + "]***************************");
|
||||
streamWriter.WriteLine("消息:" + message);
|
||||
streamWriter.WriteLine("时间:" + time);
|
||||
streamWriter.WriteLine();
|
||||
streamWriter.Flush();
|
||||
streamWriter.Close();
|
||||
streamWriter.Dispose();
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
public static void Log(string msg)
|
||||
{
|
||||
Log((Config.IS_WPS ? "WPS" : "WORD"), msg);
|
||||
}
|
||||
public static void Log(Exception e)
|
||||
{
|
||||
Log(e.Message + "\n" + e.StackTrace);
|
||||
}
|
||||
public static void Log(string tag, Exception e)
|
||||
{
|
||||
Log(tag,e.Message + "\n" + e.StackTrace);
|
||||
}
|
||||
|
||||
public static void LogToWeb(string msg)
|
||||
{
|
||||
if (Config.RUN_IN_DEBUG)
|
||||
{
|
||||
Globals.ThisAddIn.SendMessageToWeb("DEBUG-LOG", msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -227,7 +227,7 @@ namespace AIProofread.Model
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log("Error", e);
|
||||
LogHelper.Log("Error", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -539,7 +539,7 @@ namespace AIProofread.Model
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("GlobalCallback", "call web global function error \n" + ex.Message + "\n" + callbackId + result);
|
||||
LogHelper.Log("GlobalCallback", "call web global function error \n" + ex.Message + "\n" + callbackId + result);
|
||||
}
|
||||
}
|
||||
public void SendMessageToWeb(string msg, object data)
|
||||
@ -556,7 +556,7 @@ namespace AIProofread.Model
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("SendMessage", "send message to web error \n" + ex.Message + "\n" + msg + data.ToString());
|
||||
LogHelper.Log("SendMessage", "send message to web error \n" + ex.Message + "\n" + msg + data.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -580,7 +580,7 @@ namespace AIProofread.Model
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("ClearAllProofreadMark", ex);
|
||||
LogHelper.Log("ClearAllProofreadMark", ex);
|
||||
}
|
||||
// 清空marks
|
||||
marks.Clear();
|
||||
@ -658,9 +658,9 @@ namespace AIProofread.Model
|
||||
List<InsertMarkData> insertMarks = new List<InsertMarkData>();
|
||||
foreach (var correct in list)
|
||||
{
|
||||
if(Logger.LoggerForm != null)
|
||||
if(LogHelper.LoggerForm != null)
|
||||
{
|
||||
Logger.Log(string.Format("correct content:{0}", correct.Insert));
|
||||
LogHelper.Log(string.Format("correct content:{0}", correct.Insert));
|
||||
}
|
||||
int currentOffset = correct.SentenceOffset;
|
||||
if (correct.CorrectItems != null && correct.CorrectItems.Count > 0)
|
||||
@ -707,7 +707,7 @@ namespace AIProofread.Model
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log(string.Format("mark color error {0}", e.Message));
|
||||
LogHelper.Log(string.Format("mark color error {0}", e.Message));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -720,7 +720,7 @@ namespace AIProofread.Model
|
||||
{ "new_text",correct.NewText },
|
||||
{ "paragraph_num",correct.ParagraphNumber },
|
||||
};
|
||||
Logger.Log(JsonConvert.SerializeObject(msg));
|
||||
LogHelper.Log(JsonConvert.SerializeObject(msg));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -796,7 +796,7 @@ namespace AIProofread.Model
|
||||
pi.originBackgroundColor = info.Background;
|
||||
pi.originSize = info.Size;
|
||||
}
|
||||
catch (Exception ex) { Logger.Log(ex); }
|
||||
catch (Exception ex) { LogHelper.Log(ex); }
|
||||
}
|
||||
marks.Add(item.Id, pi);
|
||||
}
|
||||
@ -902,7 +902,7 @@ namespace AIProofread.Model
|
||||
CurrentDocument.Save();
|
||||
}catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
LogHelper.Log(ex);
|
||||
}
|
||||
}
|
||||
public void FocusToPanel()
|
||||
@ -924,7 +924,7 @@ namespace AIProofread.Model
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
LogHelper.Log(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1037,7 +1037,7 @@ namespace AIProofread.Model
|
||||
|
||||
internal void CheckPanel()
|
||||
{
|
||||
Logger.Log(CurrentDocument.FullName + $" TaskPane visible {PaneVisible} has " + (TaskPane == null ? "null" : "exists"));
|
||||
LogHelper.Log(CurrentDocument.FullName + $" TaskPane visible {PaneVisible} has " + (TaskPane == null ? "null" : "exists"));
|
||||
if (TaskPane == null) CreateTaskPane();
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,8 @@ namespace AIProofread.Model
|
||||
{
|
||||
var sentence = item.OriginSentence;
|
||||
var isInsert = item.content.Tag == "i";
|
||||
if (sentence.Length <= MAX_WORD_LENGTH && !isInsert)
|
||||
var limitLength = Math.Max(item.content.Origin.Length, MAX_WORD_LENGTH);
|
||||
if (sentence.Length <= limitLength && !isInsert)
|
||||
{
|
||||
return sentence;
|
||||
}
|
||||
@ -37,18 +38,18 @@ namespace AIProofread.Model
|
||||
Debug.WriteLine("GetReadDocumentFilePath Start ==>", DateTime.Now.ToLongTimeString());
|
||||
}
|
||||
// 截取中间位置
|
||||
if(sentence.Length > MAX_WORD_LENGTH)
|
||||
if(sentence.Length > limitLength)
|
||||
{
|
||||
try
|
||||
{
|
||||
var middlePosition = MAX_WORD_LENGTH / 2;
|
||||
var middlePosition = limitLength / 2;
|
||||
var cutStart = item.content.Start - middlePosition;
|
||||
// 越界了
|
||||
if (cutStart < 0)
|
||||
{
|
||||
cutStart = 0;
|
||||
}
|
||||
var originText = sentence.Substring(cutStart, Math.Min(sentence.Length - cutStart, MAX_WORD_LENGTH));
|
||||
var originText = sentence.Substring(cutStart, Math.Min(sentence.Length - cutStart, limitLength));
|
||||
if (!isInsert)
|
||||
{
|
||||
item.content.Start = item.content.Start - cutStart;
|
||||
@ -58,11 +59,11 @@ namespace AIProofread.Model
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
LogHelper.Log(ex);
|
||||
}
|
||||
}
|
||||
var sb = new StringBuilder();
|
||||
if (sentence.Length <= MAX_WORD_LENGTH && isInsert)
|
||||
if (sentence.Length <= limitLength && isInsert)
|
||||
{
|
||||
var before = item.content.Start == 0 ? string.Empty: sentence.Substring(0, item.content.Start);
|
||||
var after = item.content.Start >= sentence.Length ? string.Empty : sentence.Substring(item.content.Start);
|
||||
|
@ -96,7 +96,7 @@ namespace UtilLib
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log(e);
|
||||
LogHelper.Log(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,7 +113,7 @@ namespace UtilLib
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log(e);
|
||||
LogHelper.Log(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ namespace UtilLib
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log(e);
|
||||
LogHelper.Log(e);
|
||||
}
|
||||
}
|
||||
private void PrepareCommentProcess(Bookmark mark)
|
||||
@ -148,13 +148,13 @@ namespace UtilLib
|
||||
// 判断当前书签选区内容是否有评论
|
||||
if (comments != null && comments.Count > 0)
|
||||
{
|
||||
Logger.Log("有批注");
|
||||
LogHelper.Log("有批注");
|
||||
foreach (Microsoft.Office.Interop.Word.Comment item in comments)
|
||||
{
|
||||
// 判断当前评论和书签选区是否一致
|
||||
if (item.Scope.Start == range.Start && item.Scope.End == range.End)
|
||||
{
|
||||
Logger.Log("删除批注:" + item.Range.Text);
|
||||
LogHelper.Log("删除批注:" + item.Range.Text);
|
||||
// 删除评论
|
||||
item.Delete();
|
||||
}
|
||||
@ -224,7 +224,7 @@ namespace UtilLib
|
||||
|
||||
if (rng.Text?.IndexOf("%") != -1)
|
||||
{
|
||||
Logger.Log($"处理百分号问题:有批注");
|
||||
LogHelper.Log($"处理百分号问题:有批注");
|
||||
if (rng.Comments != null && rng.Comments.Count > 0)
|
||||
{
|
||||
for (var i = 1; i < rng.Comments.Count; i++)
|
||||
|
@ -124,7 +124,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(this.Name, ex);
|
||||
LogHelper.Log(this.Name, ex);
|
||||
}
|
||||
}
|
||||
Globals.ThisAddIn.LoginFormList.Clear();
|
||||
@ -459,7 +459,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Logger.Log(exception);
|
||||
LogHelper.Log(exception);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -483,12 +483,12 @@ namespace AIProofread
|
||||
private void BtnOpenLogger_Click(object sender, RibbonControlEventArgs e)
|
||||
{
|
||||
// 判断日志窗口是否已经存在或者打开
|
||||
if (Logger.LoggerForm == null || Logger.LoggerForm.IsDisposed)
|
||||
if (LogHelper.LoggerForm == null || LogHelper.LoggerForm.IsDisposed)
|
||||
{
|
||||
// 创建日志窗口
|
||||
Logger.LoggerForm = new FormLogger();
|
||||
LogHelper.LoggerForm = new FormLogger();
|
||||
}
|
||||
Logger.LoggerForm.Show();
|
||||
LogHelper.LoggerForm.Show();
|
||||
}
|
||||
|
||||
private int GetRangeParagraphNumber(Range range)
|
||||
|
@ -8,8 +8,7 @@ using AIProofread.Controls;
|
||||
using UtilLib;
|
||||
using AIProofread.Model;
|
||||
using System.Collections.Generic;
|
||||
using Excel = Microsoft.Office.Interop.Excel;
|
||||
using System.Runtime.InteropServices;
|
||||
using log4net;
|
||||
|
||||
|
||||
namespace AIProofread
|
||||
@ -17,7 +16,8 @@ namespace AIProofread
|
||||
|
||||
public partial class ThisAddIn
|
||||
{
|
||||
|
||||
// LogManager.GetLogger(typeof(ThisAddIn))
|
||||
public ILog Logger = LogHelper.GetLogger(typeof(ThisAddIn));
|
||||
public static SynchronizationContext FmainThreadContext;
|
||||
|
||||
public string AddinName = " ";
|
||||
@ -92,12 +92,12 @@ namespace AIProofread
|
||||
|
||||
private void ProcessApplicationException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
Logger.Log("UnhandledException", e.ExceptionObject as Exception);
|
||||
Logger.Error("UnhandledException", e.ExceptionObject as Exception);
|
||||
}
|
||||
|
||||
private void ProcessApplicationFormException(object sender, System.Threading.ThreadExceptionEventArgs e)
|
||||
{
|
||||
Logger.Log("ProcessApplicationFormException", e.Exception);
|
||||
Logger.Error("ProcessApplicationFormException", e.Exception);
|
||||
}
|
||||
|
||||
private void ThisAddIn_Startup(object sender, System.EventArgs e)
|
||||
@ -109,7 +109,7 @@ namespace AIProofread
|
||||
//formCommonsenseDetection.ShowInTaskbar = false;
|
||||
//formCommonsenseDetection.Show();
|
||||
|
||||
Logger.Log("ThisAddIn_Startup IS_WPS --> " + IsWPS);
|
||||
Logger.Debug("ThisAddIn_Startup Platform --> " + (IsWPS?"WPS":"WORD"));
|
||||
// 捕获全局异常
|
||||
AppDomain.CurrentDomain.UnhandledException += ProcessApplicationException;
|
||||
System.Windows.Forms.Application.ThreadException += ProcessApplicationFormException;
|
||||
@ -137,7 +137,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex1)
|
||||
{
|
||||
Logger.Log("Startup Error" + ex1.ToString());
|
||||
Logger.Error("Startup Error",ex1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,12 +156,12 @@ namespace AIProofread
|
||||
if (!string.IsNullOrEmpty(deviceId))
|
||||
{
|
||||
Config.DeviceId = deviceId;
|
||||
Logger.Log("设备唯一标识:" + deviceId);
|
||||
Logger.Debug("设备唯一标识:" + deviceId);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("InitDeviceId Error:" + ex.ToString());
|
||||
Logger.Error("InitDeviceId Error:",ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -193,7 +193,7 @@ namespace AIProofread
|
||||
}
|
||||
if (!existsList.Contains(currentName))
|
||||
{
|
||||
Logger.Log("检测到文档关闭,已移除:" + currentName);
|
||||
Logger.Debug("检测到文档关闭,已移除:" + currentName);
|
||||
try
|
||||
{
|
||||
item.RunInMainThread(() =>
|
||||
@ -203,7 +203,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ext)
|
||||
{
|
||||
Logger.Log(ext);
|
||||
Logger.Debug(ext);
|
||||
}
|
||||
|
||||
try
|
||||
@ -212,14 +212,14 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ext)
|
||||
{
|
||||
Logger.Log(ext);
|
||||
Logger.Debug(ext);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
Logger.Debug(ex.Message,ex);
|
||||
}
|
||||
//await System.Threading.Tasks.Task.Run(() =>
|
||||
// {
|
||||
@ -244,14 +244,14 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("检测升级信息异常: " + ex.ToString());
|
||||
Logger.Error("检测升级信息异常: ",ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void Application_DocumentBeforeSave(Document originDocument, ref bool SaveAsUI, ref bool Cancel)
|
||||
{
|
||||
Logger.Log("DocumentSave", originDocument.Name + "\r\n");
|
||||
//LogHelper.Log("DocumentSave", originDocument.Name + "\r\n");
|
||||
if (CurrentWordApplication.Documents.Count == 0)
|
||||
{
|
||||
return;
|
||||
@ -286,7 +286,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("Init WPS Error " + ex.Message);
|
||||
Logger.Error("Init WPS Error ",ex);
|
||||
}
|
||||
}
|
||||
string verTextFile = Config.APP_BASE_DIR + Path.GetFileName("app_version.txt");
|
||||
@ -296,7 +296,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("Write App Version Error " + ex.Message);
|
||||
Logger.Error("Write App Version Error ", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ namespace AIProofread
|
||||
if (File.Exists(Config.CONFIG_FILE))
|
||||
{
|
||||
string content = File.ReadAllText(Config.CONFIG_FILE);
|
||||
Logger.Log("INIT", "Found app.json " + content);
|
||||
//LogHelper.Log("INIT", "Found app.json " + content);
|
||||
if (content == null || content.Length == 0) return;
|
||||
AppConfig config = JsonConvert.DeserializeObject<AppConfig>(content);
|
||||
|
||||
@ -348,7 +348,7 @@ namespace AIProofread
|
||||
if (formCommonsenseDetection != null) {
|
||||
formCommonsenseDetection.SendMessageToWeb("document-change", null);
|
||||
}
|
||||
Logger.Log("Application_DocumentChange -- " + ActiveDocument.fileName + " track is " + ActiveDocument.CurrentDocument.TrackRevisions);
|
||||
//LogHelper.Log("Application_DocumentChange -- " + ActiveDocument.fileName + " track is " + ActiveDocument.CurrentDocument.TrackRevisions);
|
||||
}
|
||||
|
||||
public void SetActiveDocument(Document doc)
|
||||
@ -372,9 +372,12 @@ namespace AIProofread
|
||||
/// <param name="activeDoc"></param>
|
||||
/// <param name="Wn"></param>
|
||||
private void Application_WindowActivate(Document activeDoc, Window Wn)
|
||||
{
|
||||
if(activeDoc != null && (ActiveDocument == null || activeDoc != ActiveDocument.CurrentDocument))
|
||||
{
|
||||
ActiveDocument = documentList.SetActiveDocument(activeDoc);
|
||||
Logger.Log("Application_WindowActivate -- " + ActiveDocument.fileName);
|
||||
Logger.Info("Application_WindowActivate -- " + ActiveDocument.fileName);
|
||||
}
|
||||
//// 当前文档添加书签集合
|
||||
//if (!allMarks.ContainsKey(activeDoc))
|
||||
//{
|
||||
@ -411,7 +414,7 @@ namespace AIProofread
|
||||
{
|
||||
doc.HidePane();
|
||||
}
|
||||
Logger.Log("DocumentBeforeClose", currentDoc.FullName);
|
||||
//LogHelper.Log("DocumentBeforeClose", currentDoc.FullName);
|
||||
//if (allMarks.ContainsKey(currentDoc))
|
||||
//{
|
||||
// allMarks.Remove(currentDoc);
|
||||
@ -433,12 +436,12 @@ namespace AIProofread
|
||||
|
||||
private void Application_NewDocument(Document doc)
|
||||
{
|
||||
Logger.Log("NewDocument" + doc.Name);
|
||||
//LogHelper.Log("NewDocument" + doc.Name);
|
||||
}
|
||||
|
||||
private void Application_DocumentOpen(Document doc)
|
||||
{
|
||||
Logger.Log("DocumentOpen " + doc.Name);
|
||||
//LogHelper.Log("DocumentOpen " + doc.Name);
|
||||
}
|
||||
|
||||
|
||||
@ -565,7 +568,7 @@ namespace AIProofread
|
||||
// 取消捕获全局异常事件
|
||||
AppDomain.CurrentDomain.UnhandledException -= ProcessApplicationException;
|
||||
System.Windows.Forms.Application.ThreadException -= ProcessApplicationFormException;
|
||||
Logger.Log("shutdown");
|
||||
Logger.Debug("shutdown");
|
||||
documentList.Clear();
|
||||
if (_timer != null)
|
||||
{
|
||||
|
@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
|
||||
</configSections>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
@ -28,4 +31,54 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
<log4net>
|
||||
<!-- Define some output appenders -->
|
||||
<appender name="rollingAppender" type="log4net.Appender.RollingFileAppender">
|
||||
<file value="${APP_DATA}"/>
|
||||
|
||||
<!--追加日志内容-->
|
||||
<appendToFile value="true"/>
|
||||
|
||||
<!--防止多线程时不能写Log,官方说线程非安全-->
|
||||
<lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
|
||||
|
||||
<!--可以为:Once|Size|Date|Composite-->
|
||||
<!--Composite为Size和Date的组合-->
|
||||
<rollingStyle value="Composite"/>
|
||||
|
||||
<!--当备份文件时,为文件名加的后缀,这里可以作为每一天的日志分别存储不同的文件-->
|
||||
<datePattern value="yyyy-MM-dd".txt""/>
|
||||
<StaticLogFileName value="false"/>
|
||||
|
||||
<!--日志最大个数,都是最新的-->
|
||||
<!--rollingStyle节点为Size时,只能有value个日志-->
|
||||
<!--rollingStyle节点为Composite时,每天有value个日志-->
|
||||
<maxSizeRollBackups value="20"/>
|
||||
|
||||
<!--可用的单位:KB|MB|GB-->
|
||||
<maximumFileSize value="5MB"/>
|
||||
|
||||
<!--置为true,当前最新日志文件名永远为file节中的名字-->
|
||||
<staticLogFileName value="true"/>
|
||||
|
||||
<!--输出级别在INFO和ERROR之间的日志-->
|
||||
<filter type="log4net.Filter.LevelRangeFilter">
|
||||
<param name="LevelMin" value="DEBUG"/>
|
||||
<param name="LevelMax" value="FATAL"/>
|
||||
</filter>
|
||||
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<!--日志输出格式:时间 日志类型 日志内容-->
|
||||
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/>
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<!-- levels: OFF > FATAL > ERROR > WARN > INFO > DEBUG > ALL -->
|
||||
<root>
|
||||
<priority value="ALL"/>
|
||||
<level value="ALL"/>
|
||||
<appender-ref ref="rollingAppender"/>
|
||||
</root>
|
||||
</log4net>
|
||||
</configuration>
|
@ -6,11 +6,14 @@ using System.Windows.Forms;
|
||||
using UtilLib;
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using log4net;
|
||||
|
||||
namespace AIProofread.core
|
||||
{
|
||||
public class CorrectResultExportor
|
||||
{
|
||||
|
||||
public ILog Logger = LogHelper.GetLogger(typeof(CorrectResultExportor));
|
||||
// 设置表头
|
||||
private static readonly string[] HeaderCols =
|
||||
{
|
||||
@ -213,54 +216,8 @@ namespace AIProofread.core
|
||||
//sheet.Append(new AutoFilter() { Reference = "A1:G1"});
|
||||
}
|
||||
|
||||
#region 样式设置
|
||||
//var headerRange = worksheet.Range["A1:G1"];
|
||||
//var allRange = worksheet.Range["A1:G" + rowIndex];
|
||||
//// 对齐方式
|
||||
//// 所有都是垂直居中
|
||||
//allRange.VerticalAlignment = Excel.XlVAlign.xlVAlignCenter;
|
||||
|
||||
//// 水平居中
|
||||
//headerRange.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
|
||||
//worksheet.Columns["A:C"].HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
|
||||
//worksheet.Columns["G"].HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
|
||||
|
||||
//// 全局样式
|
||||
//allRange.Font.Size = 11;
|
||||
|
||||
//worksheet.Rows[1].RowHeight = 40;
|
||||
//// 设置自动换行
|
||||
//worksheet.Rows.WrapText = true;
|
||||
//var themeColor = new XSSFColor(new byte[] { 214, 170, 105 }); // 首行背景色黑色,字体用主题金色
|
||||
//// 设置背景/颜色
|
||||
//headerRange.Font.Color = ColorTranslator.ToOle(Color.FromArgb(255, 214, 170, 105));
|
||||
//headerRange.Interior.Pattern = Excel.XlPattern.xlPatternSolid;
|
||||
//headerRange.Interior.Color = ColorTranslator.ToOle(Color.Black);
|
||||
//// 设置字体
|
||||
//worksheet.Rows[1].Font.Name = "黑体";
|
||||
//worksheet.Columns["G"].Font.Name = "黑体";
|
||||
|
||||
// 设置列宽
|
||||
//worksheet.Columns["A:C"].ColumnWidth = 10;
|
||||
//worksheet.Columns["D"].ColumnWidth = 80;
|
||||
//worksheet.Columns["E:F"].ColumnWidth = 20;
|
||||
//worksheet.Columns["G"].ColumnWidth = 10;
|
||||
|
||||
// 设置冻结、筛选
|
||||
//worksheet.Activate();
|
||||
//worksheet.Range["B1"].Select(); // 必须选择冻结点
|
||||
// // 冻结第一行
|
||||
//excel.ActiveWindow.SplitRow = 1;
|
||||
//excel.ActiveWindow.FreezePanes = true;
|
||||
//worksheet.EnableAutoFilter = true;
|
||||
//// 设置第一行筛选
|
||||
////int lastRow = worksheet.UsedRange.Rows.Count;
|
||||
//Excel.Range range = worksheet.get_Range("A1", "D1");
|
||||
//range.AutoFilter("1", "<>", Excel.XlAutoFilterOperator.xlOr, "", true);
|
||||
#endregion
|
||||
|
||||
stopwatch.Stop();
|
||||
MessageBox.Show("导出完成,运行时间:" + stopwatch.Elapsed.TotalMilliseconds + "毫秒");
|
||||
Logger.Info("导出勘误表"+fileName+"完成,运行时间:" + stopwatch.Elapsed.TotalMilliseconds + "毫秒");
|
||||
|
||||
}
|
||||
|
||||
@ -268,7 +225,8 @@ namespace AIProofread.core
|
||||
{
|
||||
// 设置列宽
|
||||
Columns columns = new Columns();
|
||||
SetColumnWidth(1, 3, 6, columns);
|
||||
SetColumnWidth(1, 0, columns); // 隐藏第一列
|
||||
SetColumnWidth(2, 3, 6, columns);
|
||||
SetColumnWidth(4, 80, columns);
|
||||
SetColumnWidth(5, 6, 20, columns);
|
||||
SetColumnWidth(7, 10, columns);
|
||||
@ -287,7 +245,8 @@ namespace AIProofread.core
|
||||
Min = startColIndex, // 从第1列开始
|
||||
Max = endColIndex, // 到第3列结束
|
||||
Width = width, // 宽度值(一般 8.43 为默认)
|
||||
CustomWidth = true
|
||||
CustomWidth = true,
|
||||
Hidden = width <= 0,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log("remove mark", e);
|
||||
LogHelper.Log("remove mark", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -254,7 +254,7 @@ namespace AIProofread
|
||||
{ "search_end",range.End },
|
||||
{ "search_text",range.Text }
|
||||
};
|
||||
Logger.Log(JsonConvert.SerializeObject(msg1));
|
||||
LogHelper.Log(JsonConvert.SerializeObject(msg1));
|
||||
//while (range.Find.Found)
|
||||
//{
|
||||
// var obj4 = range.Document;
|
||||
@ -299,7 +299,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
LogHelper.Log(ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -327,7 +327,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
LogHelper.Log(ex);
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -381,7 +381,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log("create mark error:" + ex.Message + "\n" + ex.StackTrace + "\n\n");
|
||||
LogHelper.Log("create mark error:" + ex.Message + "\n" + ex.StackTrace + "\n\n");
|
||||
}
|
||||
return bookmark;
|
||||
}
|
||||
@ -521,7 +521,7 @@ namespace AIProofread
|
||||
if (prevOffset >= paraText.Length)
|
||||
{
|
||||
// 查找位置已经超过了整段长度了
|
||||
Logger.Log("prevOffset:" + prevOffset + " paraText.Length:" + paraText.Length);
|
||||
LogHelper.Log("prevOffset:" + prevOffset + " paraText.Length:" + paraText.Length);
|
||||
return null;
|
||||
}
|
||||
// 执行查找
|
||||
@ -604,10 +604,11 @@ namespace AIProofread
|
||||
}
|
||||
//ProcessExport(sfd.FileName);
|
||||
CorrectResultExportor.GetInstance().ExportResult(sfd.FileName);
|
||||
Globals.ThisAddIn.ActiveDocument?.ShowMessage("导出勘误表成功", 2000, false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log(e);
|
||||
LogHelper.Log(e);
|
||||
Globals.ThisAddIn.ShowDialog("导出勘误表失败,请重试", null, null);
|
||||
}
|
||||
}
|
||||
@ -750,7 +751,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Log(e);
|
||||
LogHelper.Log(e);
|
||||
}
|
||||
|
||||
var oriCell = row.CreateCell(3);
|
||||
@ -861,7 +862,7 @@ namespace AIProofread
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
LogHelper.Log(ex);
|
||||
}
|
||||
id++;
|
||||
}
|
||||
@ -869,7 +870,6 @@ namespace AIProofread
|
||||
// 保存到文件
|
||||
book.Write(fs);
|
||||
//Globals.ThisAddIn.ShowMessage("导出成功", 3000);
|
||||
Globals.ThisAddIn.ActiveDocument?.ShowMessage("导出勘误表成功", 2000, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
80a1b62e50022f6927ea33d64c401a80d068064724a07da1ca8562102f036978
|
||||
6ff77d6c12210febf10f5ae1faf45dfc8ef42d08e43da0240ffa9d92fbefb595
|
||||
|
@ -216,3 +216,12 @@ C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\AIProofread.
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\AntdUI.dll
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\AntdUI.xml
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\obj\Debug\AIProofread.Controls.FormCommonsenseDetection.resources
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\obj\Debug\AIProofread.Controls.FormLexicon.resources
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\System.ComponentModel.Annotations.dll
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\DocumentFormat.OpenXml.dll
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\DocumentFormat.OpenXml.Framework.dll
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\DocumentFormat.OpenXml.xml
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\DocumentFormat.OpenXml.Framework.xml
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\log4net.dll
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\log4net.pdb
|
||||
C:\Users\yaclt\source\repos\repos\AIProofread\AIProofread\bin\Debug\log4net.xml
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -5,6 +5,7 @@
|
||||
<package id="DocumentFormat.OpenXml.Framework" version="3.3.0" targetFramework="net462" />
|
||||
<package id="Enums.NET" version="4.0.1" targetFramework="net462" />
|
||||
<package id="ExtendedNumerics.BigDecimal" version="2025.1001.2.129" targetFramework="net462" />
|
||||
<package id="log4net" version="3.0.4" targetFramework="net462" />
|
||||
<package id="MathNet.Numerics.Signed" version="5.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.IO.RecyclableMemoryStream" version="3.0.1" targetFramework="net462" />
|
||||
<package id="Microsoft.Web.WebView2" version="1.0.2210.55" targetFramework="net462" />
|
||||
|
19
updater/Form1.Designer.cs
generated
19
updater/Form1.Designer.cs
generated
@ -35,7 +35,7 @@
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.IconClose = new System.Windows.Forms.PictureBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.panelLog = new System.Windows.Forms.Panel();
|
||||
this.panelLog = new AntdUI.Panel();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.IconClose)).BeginInit();
|
||||
this.panelLog.SuspendLayout();
|
||||
@ -44,12 +44,12 @@
|
||||
// LabelLog
|
||||
//
|
||||
this.LabelLog.AutoEllipsis = true;
|
||||
this.LabelLog.BackColor = System.Drawing.Color.Transparent;
|
||||
this.LabelLog.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.LabelLog.Font = new System.Drawing.Font("微软雅黑", 10F);
|
||||
this.LabelLog.Location = new System.Drawing.Point(2, 2);
|
||||
this.LabelLog.MaximumSize = new System.Drawing.Size(296, 114);
|
||||
this.LabelLog.MinimumSize = new System.Drawing.Size(296, 114);
|
||||
this.LabelLog.Location = new System.Drawing.Point(5, 5);
|
||||
this.LabelLog.Name = "LabelLog";
|
||||
this.LabelLog.Size = new System.Drawing.Size(296, 114);
|
||||
this.LabelLog.Size = new System.Drawing.Size(290, 100);
|
||||
this.LabelLog.TabIndex = 0;
|
||||
this.LabelLog.Text = "版本检测中 ...";
|
||||
this.LabelLog.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
@ -114,10 +114,13 @@
|
||||
//
|
||||
// panelLog
|
||||
//
|
||||
this.panelLog.Back = System.Drawing.Color.FromArgb(((int)(((byte)(247)))), ((int)(((byte)(248)))), ((int)(((byte)(249)))));
|
||||
this.panelLog.Controls.Add(this.LabelLog);
|
||||
this.panelLog.Location = new System.Drawing.Point(40, 58);
|
||||
this.panelLog.Location = new System.Drawing.Point(40, 60);
|
||||
this.panelLog.Name = "panelLog";
|
||||
this.panelLog.Size = new System.Drawing.Size(300, 114);
|
||||
this.panelLog.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.panelLog.Radius = 4;
|
||||
this.panelLog.Size = new System.Drawing.Size(300, 110);
|
||||
this.panelLog.TabIndex = 8;
|
||||
//
|
||||
// Form1
|
||||
@ -155,7 +158,7 @@
|
||||
private System.Windows.Forms.PictureBox IconClose;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Panel panelLog;
|
||||
private AntdUI.Panel panelLog;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user