diff --git a/.vs/AIProofread/v17/.suo b/.vs/AIProofread/v17/.suo
index e7f7615..7702bd7 100644
Binary files a/.vs/AIProofread/v17/.suo and b/.vs/AIProofread/v17/.suo differ
diff --git a/AIProofread/Config.cs b/AIProofread/Config.cs
index dad719a..dbca81d 100644
--- a/AIProofread/Config.cs
+++ b/AIProofread/Config.cs
@@ -36,7 +36,7 @@ namespace AIProofread
public class Config
{
public static readonly string APP_NAME = "AI校对王(公告版)";
- public static readonly string APP_VERSION = "1.1.0";
+ public static readonly string APP_VERSION = "1.1.1";
public static bool IS_WPS = false;
public static bool UpgradeForcedNotice = false;
public static readonly string APP_BASE_DIR = AppDomain.CurrentDomain.BaseDirectory;
@@ -52,7 +52,7 @@ namespace AIProofread
///
/// 网页访问地址
///
- public static string WEB_PATH = AppServer.DEV; //pre-gm-plugin.gachafun.com localhost:5173 gm2-plugin.zverse.group
+ public static string WEB_PATH = AppServer.TEST; //pre-gm-plugin.gachafun.com localhost:5173 gm2-plugin.zverse.group
public static bool RUN_IN_DEBUG = true;
public static AppEnvironment APP_ENV = AppEnvironment.Prod;
#else
diff --git a/AIProofread/Ribbon1.Designer.cs b/AIProofread/Ribbon1.Designer.cs
index 614b0a8..0a451f0 100644
--- a/AIProofread/Ribbon1.Designer.cs
+++ b/AIProofread/Ribbon1.Designer.cs
@@ -55,14 +55,12 @@ namespace AIProofread
this.btnLogin = this.Factory.CreateRibbonButton();
this.BtnShowManual = this.Factory.CreateRibbonButton();
this.BtnShowPanel = this.Factory.CreateRibbonButton();
- this.menuSencenDect = this.Factory.CreateRibbonMenu();
- this.btnDetectionAll = this.Factory.CreateRibbonButton();
- this.btnDetectionParagraph = this.Factory.CreateRibbonButton();
- this.btnDetectionHistory = this.Factory.CreateRibbonButton();
+ this.btnDetectionOneClick = this.Factory.CreateRibbonButton();
this.MenuMore = this.Factory.CreateRibbonMenu();
this.btnOpenLexicon = this.Factory.CreateRibbonButton();
this.ButtonSaveCache = this.Factory.CreateRibbonButton();
this.ButtonLoadCache = this.Factory.CreateRibbonButton();
+ this.btnDetectionHistory = this.Factory.CreateRibbonButton();
this.btnSetting = this.Factory.CreateRibbonButton();
this.grpOther = this.Factory.CreateRibbonGroup();
this.LblDate = this.Factory.CreateRibbonLabel();
@@ -108,7 +106,7 @@ namespace AIProofread
this.group1.Items.Add(this.btnLogin);
this.group1.Items.Add(this.BtnShowManual);
this.group1.Items.Add(this.BtnShowPanel);
- this.group1.Items.Add(this.menuSencenDect);
+ this.group1.Items.Add(this.btnDetectionOneClick);
this.group1.Items.Add(this.MenuMore);
this.group1.Name = "group1";
//
@@ -240,38 +238,14 @@ namespace AIProofread
this.BtnShowPanel.Visible = false;
this.BtnShowPanel.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnShowPanel_Click);
//
- // menuSencenDect
+ // btnDetectionOneClick
//
- this.menuSencenDect.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
- this.menuSencenDect.Image = global::AIProofread.Properties.Resources.icon_ai_robot;
- 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.Name = "menuSencenDect";
- this.menuSencenDect.ShowImage = true;
- //
- // btnDetectionAll
- //
- this.btnDetectionAll.Label = "全文常识检测\r\n";
- this.btnDetectionAll.Name = "btnDetectionAll";
- this.btnDetectionAll.ShowImage = true;
- this.btnDetectionAll.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnDetectionAll_Click);
- //
- // btnDetectionParagraph
- //
- this.btnDetectionParagraph.Enabled = false;
- this.btnDetectionParagraph.Label = "段落常识检测\r\n";
- this.btnDetectionParagraph.Name = "btnDetectionParagraph";
- this.btnDetectionParagraph.ShowImage = true;
- this.btnDetectionParagraph.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnDetectionParagraph_Click);
- //
- // btnDetectionHistory
- //
- this.btnDetectionHistory.Label = "历史检测记录\r\n";
- this.btnDetectionHistory.Name = "btnDetectionHistory";
- this.btnDetectionHistory.ShowImage = true;
- this.btnDetectionHistory.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnDetectionHistory_Click);
+ this.btnDetectionOneClick.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
+ this.btnDetectionOneClick.Image = global::AIProofread.Properties.Resources.icon_ai_robot;
+ this.btnDetectionOneClick.Label = "一键校对\r\n";
+ this.btnDetectionOneClick.Name = "btnDetectionOneClick";
+ this.btnDetectionOneClick.ShowImage = true;
+ this.btnDetectionOneClick.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnDetectionOneClick_Click);
//
// MenuMore
//
@@ -280,6 +254,7 @@ namespace AIProofread
this.MenuMore.Items.Add(this.btnOpenLexicon);
this.MenuMore.Items.Add(this.ButtonSaveCache);
this.MenuMore.Items.Add(this.ButtonLoadCache);
+ this.MenuMore.Items.Add(this.btnDetectionHistory);
this.MenuMore.Items.Add(this.btnSetting);
this.MenuMore.Label = "更多";
this.MenuMore.Name = "MenuMore";
@@ -306,6 +281,13 @@ namespace AIProofread
this.ButtonLoadCache.ShowImage = true;
this.ButtonLoadCache.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.ButtonLoadCache_Click);
//
+ // btnDetectionHistory
+ //
+ this.btnDetectionHistory.Label = "校对历史\r\n";
+ this.btnDetectionHistory.Name = "btnDetectionHistory";
+ this.btnDetectionHistory.ShowImage = true;
+ this.btnDetectionHistory.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnDetectionHistory_Click);
+ //
// btnSetting
//
this.btnSetting.Label = "设置\r\n";
@@ -457,9 +439,7 @@ namespace AIProofread
internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnShowVersion;
internal Microsoft.Office.Tools.Ribbon.RibbonDropDown dropDown1;
internal Microsoft.Office.Tools.Ribbon.RibbonGroup grpOther;
- internal Microsoft.Office.Tools.Ribbon.RibbonMenu menuSencenDect;
- internal Microsoft.Office.Tools.Ribbon.RibbonButton btnDetectionAll;
- internal Microsoft.Office.Tools.Ribbon.RibbonButton btnDetectionParagraph;
+ internal Microsoft.Office.Tools.Ribbon.RibbonButton btnDetectionOneClick;
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnDetectionHistory;
internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnShowManual;
internal Microsoft.Office.Tools.Ribbon.RibbonMenu menuProofreadList;
diff --git a/AIProofread/Ribbon1.cs b/AIProofread/Ribbon1.cs
index 4a933d1..1592926 100644
--- a/AIProofread/Ribbon1.cs
+++ b/AIProofread/Ribbon1.cs
@@ -53,7 +53,7 @@ namespace AIProofread
btnLogout.Enabled = status;
ButtonLoadCache.Enabled = status;
ButtonSaveCache.Enabled = status;
- menuSencenDect.Enabled = status;
+ btnDetectionOneClick.Enabled = status;
//BtnShowPanel.Enabled = status;
BtnExportProofreadResult.Enabled = status;
}
@@ -615,14 +615,13 @@ namespace AIProofread
{
return;
}
- btnDetectionParagraph.Enabled = r.Start != r.End;
- btnDetectionAll.Enabled = r.Start == r.End;
+ //btnDetectionParagraph.Enabled = r.Start != r.End;
+ //btnDetectionAll.Enabled = r.Start == r.End;
}
- public void SetDetectionBtnStatus(bool allStatus,bool rangeStatus)
+ public void SetDetectionBtnStatus(bool isChecking)
{
- btnDetectionAll.Enabled = allStatus;
- btnDetectionParagraph.Enabled = rangeStatus;
+ btnDetectionOneClick.Enabled = !isChecking;
}
private void BtnShowManual_Click(object sender, RibbonControlEventArgs e)
@@ -657,5 +656,14 @@ namespace AIProofread
{
Globals.ThisAddIn.ShowLawQuery();
}
+
+ private void btnDetectionOneClick_Click(object sender, RibbonControlEventArgs e)
+ {
+ if (CommonSenseDetection.instance.isChecking)
+ {
+ return;
+ }
+ Globals.ThisAddIn.SendMessageToWeb("show-check-all", "");
+ }
}
}
diff --git a/AIProofread/Ribbon1.resx b/AIProofread/Ribbon1.resx
index 7fab839..5c3f46e 100644
--- a/AIProofread/Ribbon1.resx
+++ b/AIProofread/Ribbon1.resx
@@ -159,16 +159,7 @@
True
-
- True
-
-
- True
-
-
- True
-
-
+
True
@@ -180,6 +171,9 @@
True
+
+ True
+
True
diff --git a/AIProofread/core/CommonSenseDetection.cs b/AIProofread/core/CommonSenseDetection.cs
index c76b9f4..df98a38 100644
--- a/AIProofread/core/CommonSenseDetection.cs
+++ b/AIProofread/core/CommonSenseDetection.cs
@@ -64,7 +64,7 @@ namespace AIProofread.core
this.checkingKey = checkingKey;
this.checkingSummary = checkingSummary;
this.checkingLocation = checkingLocation;
- Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(false,false);
+ // Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(false,false);
}
else
{
@@ -73,8 +73,9 @@ namespace AIProofread.core
this.checkingSummary = null;
this.checkingLocation = null;
var enableAll = string.IsNullOrEmpty(checkingSummary);
- Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(enableAll,!enableAll);
+ //Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(enableAll,!enableAll);
}
+ Globals.Ribbons.Ribbon1.SetDetectionBtnStatus(isChecking);
}
public string GetHistory()