Compare commits
2 Commits
22095404e0
...
90fc77b258
Author | SHA1 | Date | |
---|---|---|---|
90fc77b258 | |||
907f4bc971 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ bin
|
||||
packages
|
||||
TestConsoleApp
|
||||
.vs
|
||||
obj
|
||||
**/obj/Debug/**
|
||||
**/obj/Release/**
|
||||
**/obj/Test/**
|
@ -25,11 +25,11 @@ namespace AIProofread
|
||||
/// <summary>
|
||||
/// 网页访问地址
|
||||
/// </summary>
|
||||
public static string WEB_PATH = "http://gm2-plugin.zverse.group/"; //pre-gm-plugin.gachafun.com 192.168.0.231:5137 192.168.10.100:5173 gm2-plugin.zverse.group
|
||||
public static string WEB_PATH = "http://gm2-plugin.zverse.group/"; //pre-gm-plugin.gachafun.com localhost:5173 gm2-plugin.zverse.group
|
||||
public static bool RUN_IN_DEBUG = true;
|
||||
public static AppEnvironment APP_ENV = AppEnvironment.Dev;
|
||||
#else
|
||||
public static string WEB_PATH = "https://pre-gm-plugin.gachafun.com/";
|
||||
public static string WEB_PATH = "https://pre-gm-plugin.gachafun.com/"; // gm-plugin.gachafun.com
|
||||
public static bool RUN_IN_DEBUG = false;
|
||||
public static AppEnvironment APP_ENV = AppEnvironment.Prod;
|
||||
#endif
|
||||
|
@ -841,7 +841,13 @@ namespace AIProofread.Model
|
||||
|
||||
public void Save()
|
||||
{
|
||||
CurrentDocument.Save();
|
||||
try
|
||||
{
|
||||
CurrentDocument.Save();
|
||||
}catch (Exception ex)
|
||||
{
|
||||
Logger.Log(ex);
|
||||
}
|
||||
}
|
||||
public void FocusToPanel()
|
||||
{
|
||||
|
@ -67,10 +67,11 @@ namespace AIProofread.Model
|
||||
// 单纯删除空格
|
||||
if (it.Tag == "d" && it.Origin.Trim().Length == 0) continue;
|
||||
|
||||
var range = item.Value.mark.Range;
|
||||
var range = item.Value.mark.Range.Duplicate;
|
||||
range.End = item.Value.mark.Start;
|
||||
|
||||
// 获取书签在文档的页码数
|
||||
var pageNumber = range.get_Information(WdInformation.wdActiveEndPageNumber);
|
||||
var pageNumber = range.get_Information(WdInformation.wdActiveEndPageNumber); // wdActiveEndPageNumber
|
||||
// 获取书签在当前页面的行数
|
||||
var lineNumber = range.get_Information(WdInformation.wdFirstCharacterLineNumber);
|
||||
list.Add(new ExportDataItem(it, pageNumber, lineNumber,GetSentence(item.Value)));
|
||||
|
2
AIProofread/Ribbon1.Designer.cs
generated
2
AIProofread/Ribbon1.Designer.cs
generated
@ -144,7 +144,7 @@ namespace AIProofread
|
||||
this.menuSencenDect.Items.Add(this.btnDetectionAll);
|
||||
this.menuSencenDect.Items.Add(this.btnDetectionParagraph);
|
||||
this.menuSencenDect.Items.Add(this.btnDetectionHistory);
|
||||
this.menuSencenDect.Label = "校对助手\r\n";
|
||||
this.menuSencenDect.Label = "常识性检测\r\n";
|
||||
this.menuSencenDect.Name = "menuSencenDect";
|
||||
this.menuSencenDect.ShowImage = true;
|
||||
//
|
||||
|
@ -519,7 +519,8 @@ namespace AIProofread
|
||||
//Globals.ThisAddIn.Application.
|
||||
var app = Globals.ThisAddIn.Application;
|
||||
var selection = app.Selection;
|
||||
var range = selection.Range;
|
||||
var range = selection.Range.Duplicate;
|
||||
range.End = selection.Start;
|
||||
// 获取所在页
|
||||
var pageNumber = GetIndexPageNumber(range);
|
||||
// 获取所在行
|
||||
@ -601,10 +602,10 @@ namespace AIProofread
|
||||
btnDetectionAll.Enabled = r.Start == r.End;
|
||||
}
|
||||
|
||||
public void SetDetectionBtnStatus(bool status)
|
||||
public void SetDetectionBtnStatus(bool allStatus,bool rangeStatus)
|
||||
{
|
||||
btnDetectionAll.Enabled = status;
|
||||
btnDetectionParagraph.Enabled = status;
|
||||
btnDetectionAll.Enabled = allStatus;
|
||||
btnDetectionParagraph.Enabled = rangeStatus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ namespace AIProofread.core
|
||||
this.checkingKey = checkingKey;
|
||||
this.checkingSummary = checkingSummary;
|
||||
this.checkingLocation = checkingLocation;
|
||||
Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(false);
|
||||
Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(false,false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -72,7 +72,8 @@ namespace AIProofread.core
|
||||
this.checkingKey = null;
|
||||
this.checkingSummary = null;
|
||||
this.checkingLocation = null;
|
||||
Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(true);
|
||||
var enableAll = string.IsNullOrEmpty(checkingSummary);
|
||||
Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(enableAll,!enableAll);
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,6 +99,11 @@ namespace AIProofread.core
|
||||
|
||||
public void Close()
|
||||
{
|
||||
if (isChecking)
|
||||
{
|
||||
Globals.ThisAddIn.formCommonsenseDetection.Hide();
|
||||
return;
|
||||
}
|
||||
Globals.ThisAddIn.HideDetection();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user