diff --git a/AIProofread/Ribbon1.Designer.cs b/AIProofread/Ribbon1.Designer.cs
index 2a6a69d..6d61c94 100644
--- a/AIProofread/Ribbon1.Designer.cs
+++ b/AIProofread/Ribbon1.Designer.cs
@@ -50,6 +50,8 @@ namespace AIProofread
this.dropDown1 = this.Factory.CreateRibbonDropDown();
this.BtnProofreadAll = this.Factory.CreateRibbonButton();
this.menuProofreadList = this.Factory.CreateRibbonMenu();
+ this.BtnProofreadExact = this.Factory.CreateRibbonButton();
+ this.BtnProofreadFull = this.Factory.CreateRibbonButton();
this.BtnExportProofreadResult = this.Factory.CreateRibbonButton();
this.btnClear = this.Factory.CreateRibbonButton();
this.btnOpenLexicon = this.Factory.CreateRibbonButton();
@@ -74,8 +76,6 @@ namespace AIProofread
this.BtnTest = this.Factory.CreateRibbonButton();
this.BtnOpenAppDir = this.Factory.CreateRibbonButton();
this.BtnShowVersion = this.Factory.CreateRibbonButton();
- this.button2 = this.Factory.CreateRibbonButton();
- this.button3 = this.Factory.CreateRibbonButton();
this.tabAIProofread.SuspendLayout();
this.group1.SuspendLayout();
this.Group.SuspendLayout();
@@ -173,18 +173,34 @@ namespace AIProofread
this.BtnProofreadAll.Label = "全文校对\r\n";
this.BtnProofreadAll.Name = "BtnProofreadAll";
this.BtnProofreadAll.ShowImage = true;
+ this.BtnProofreadAll.Visible = false;
this.BtnProofreadAll.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnProofreadAll_Click);
//
// menuProofreadList
//
this.menuProofreadList.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
+ this.menuProofreadList.Enabled = false;
this.menuProofreadList.Image = global::AIProofread.Properties.Resources.icon_proofread;
- this.menuProofreadList.Items.Add(this.button2);
- this.menuProofreadList.Items.Add(this.button3);
+ this.menuProofreadList.Items.Add(this.BtnProofreadExact);
+ this.menuProofreadList.Items.Add(this.BtnProofreadFull);
this.menuProofreadList.Label = "全文校对\r\n";
this.menuProofreadList.Name = "menuProofreadList";
this.menuProofreadList.ShowImage = true;
//
+ // BtnProofreadExact
+ //
+ this.BtnProofreadExact.Label = "优先查准";
+ this.BtnProofreadExact.Name = "BtnProofreadExact";
+ this.BtnProofreadExact.ShowImage = true;
+ this.BtnProofreadExact.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnProofreadExact_Click);
+ //
+ // BtnProofreadFull
+ //
+ this.BtnProofreadFull.Label = "优先查全";
+ this.BtnProofreadFull.Name = "BtnProofreadFull";
+ this.BtnProofreadFull.ShowImage = true;
+ this.BtnProofreadFull.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnProofreadFull_Click);
+ //
// BtnExportProofreadResult
//
this.BtnExportProofreadResult.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
@@ -375,18 +391,6 @@ namespace AIProofread
this.BtnShowVersion.Name = "BtnShowVersion";
this.BtnShowVersion.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnShowVersion_Click);
//
- // button2
- //
- this.button2.Label = "优先查准";
- this.button2.Name = "button2";
- this.button2.ShowImage = true;
- //
- // button3
- //
- this.button3.Label = "优先查全";
- this.button3.Name = "button3";
- this.button3.ShowImage = true;
- //
// Ribbon1
//
this.Name = "Ribbon1";
@@ -446,8 +450,8 @@ namespace AIProofread
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnDetectionHistory;
internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnShowManual;
internal Microsoft.Office.Tools.Ribbon.RibbonMenu menuProofreadList;
- internal Microsoft.Office.Tools.Ribbon.RibbonButton button2;
- internal Microsoft.Office.Tools.Ribbon.RibbonButton button3;
+ internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnProofreadExact;
+ internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnProofreadFull;
}
partial class ThisRibbonCollection
diff --git a/AIProofread/Ribbon1.cs b/AIProofread/Ribbon1.cs
index 33252e8..b4caa35 100644
--- a/AIProofread/Ribbon1.cs
+++ b/AIProofread/Ribbon1.cs
@@ -43,7 +43,9 @@ namespace AIProofread
public void SetCommonBtnStatus(bool status)
{
- BtnProofreadAll.Enabled = status;
+ // BtnProofreadAll.Enabled = status;
+ menuProofreadList.Enabled = status;
+
btnClear.Enabled = status;
btnOpenLexicon.Enabled = status;
btnSetting.Enabled = status;
@@ -81,6 +83,7 @@ namespace AIProofread
IS_WPS = true;
BtnProofreadAll.Image = AIProofread.Properties.Resources.icon_proofread_wps;
+ menuProofreadList.Image = AIProofread.Properties.Resources.icon_proofread_wps;
btnClear.Image = AIProofread.Properties.Resources.icon_clear_wps;
btnOpenLexicon.Image = AIProofread.Properties.Resources.icon_book_wps;
btnSetting.Image = AIProofread.Properties.Resources.icon_setting_wps;
@@ -624,5 +627,15 @@ namespace AIProofread
Globals.ThisAddIn.ActiveDocument.ShowMessage("打开用户手册失败", 2000, false);
}
}
+
+ private void BtnProofreadExact_Click(object sender, RibbonControlEventArgs e)
+ {
+ Globals.ThisAddIn.SendMessageToWeb("start", "exact");
+ }
+
+ private void BtnProofreadFull_Click(object sender, RibbonControlEventArgs e)
+ {
+ Globals.ThisAddIn.SendMessageToWeb("start", "full");
+ }
}
}
diff --git a/AIProofread/Ribbon1.resx b/AIProofread/Ribbon1.resx
index 22c03e6..3df9d74 100644
--- a/AIProofread/Ribbon1.resx
+++ b/AIProofread/Ribbon1.resx
@@ -117,22 +117,118 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ True
+
+
+ True
+
True
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
True
True
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
True
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
True
True
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
\ No newline at end of file
diff --git a/AIProofread/core/DocumentUtil.cs b/AIProofread/core/DocumentUtil.cs
index 85102ab..09ebf0f 100644
--- a/AIProofread/core/DocumentUtil.cs
+++ b/AIProofread/core/DocumentUtil.cs
@@ -112,6 +112,11 @@ namespace AIProofread
//mark.Range.Underline = WdUnderline.wdUnderlineNone;
try
{
+ // feat(20250305): 清除批注的时候,如果监测到书签位置是空格,把空格给删了吧(无缓冲记录时)
+ if (mark.Range.Text.Trim().Length == 0)
+ {
+ mark.Range.Text = "";
+ }
mark.Delete();
}
catch (Exception e)