diff --git a/.vs/AIProofread/v17/.suo b/.vs/AIProofread/v17/.suo
index 7702bd7..76bf7fa 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 dbca81d..e4aa322 100644
--- a/AIProofread/Config.cs
+++ b/AIProofread/Config.cs
@@ -52,11 +52,11 @@ namespace AIProofread
///
/// 网页访问地址
///
- public static string WEB_PATH = AppServer.TEST; //pre-gm-plugin.gachafun.com localhost:5173 gm2-plugin.zverse.group
+ public static string WEB_PATH = AppServer.DEV; //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
- public static string WEB_PATH = AppServer.TEST; // gm-plugin.gachafun.com pre-gm-plugin.gachafun.com
+ public static string WEB_PATH = AppServer.PROD; // gm-plugin.gachafun.com pre-gm-plugin.gachafun.com
public static bool RUN_IN_DEBUG = false;
public static AppEnvironment APP_ENV = AppEnvironment.Prod;
#endif
diff --git a/AIProofread/Ribbon1.Designer.cs b/AIProofread/Ribbon1.Designer.cs
index 0a451f0..cc7fc8e 100644
--- a/AIProofread/Ribbon1.Designer.cs
+++ b/AIProofread/Ribbon1.Designer.cs
@@ -41,6 +41,12 @@ namespace AIProofread
Microsoft.Office.Tools.Ribbon.RibbonDropDownItem ribbonDropDownItemImpl3 = this.Factory.CreateRibbonDropDownItem();
this.tabAIProofreadAnno = this.Factory.CreateRibbonTab();
this.group1 = this.Factory.CreateRibbonGroup();
+ this.grpOther = this.Factory.CreateRibbonGroup();
+ this.LblDate = this.Factory.CreateRibbonLabel();
+ this.LblNickname = this.Factory.CreateRibbonLabel();
+ this.group2 = this.Factory.CreateRibbonGroup();
+ this.grpDebug = this.Factory.CreateRibbonGroup();
+ this.dropDown1 = this.Factory.CreateRibbonDropDown();
this.BtnProofreadAll = this.Factory.CreateRibbonButton();
this.menuProofreadList = this.Factory.CreateRibbonMenu();
this.BtnProofreadExact = this.Factory.CreateRibbonButton();
@@ -55,18 +61,12 @@ namespace AIProofread
this.btnLogin = this.Factory.CreateRibbonButton();
this.BtnShowManual = this.Factory.CreateRibbonButton();
this.BtnShowPanel = 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();
- this.LblNickname = this.Factory.CreateRibbonLabel();
- this.group2 = this.Factory.CreateRibbonGroup();
- this.grpDebug = this.Factory.CreateRibbonGroup();
this.btnShowPane = this.Factory.CreateRibbonButton();
this.btnHidePane = this.Factory.CreateRibbonButton();
this.BtnOpenLog = this.Factory.CreateRibbonButton();
@@ -75,7 +75,6 @@ namespace AIProofread
this.BtnTest = this.Factory.CreateRibbonButton();
this.BtnOpenAppDir = this.Factory.CreateRibbonButton();
this.BtnShowVersion = this.Factory.CreateRibbonButton();
- this.dropDown1 = this.Factory.CreateRibbonDropDown();
this.tabAIProofreadAnno.SuspendLayout();
this.group1.SuspendLayout();
this.grpOther.SuspendLayout();
@@ -106,18 +105,64 @@ 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.btnDetectionOneClick);
this.group1.Items.Add(this.MenuMore);
this.group1.Name = "group1";
//
+ // grpOther
+ //
+ this.grpOther.Items.Add(this.LblDate);
+ this.grpOther.Items.Add(this.LblNickname);
+ this.grpOther.Name = "grpOther";
+ //
+ // LblDate
+ //
+ this.LblDate.Label = "过期时间:";
+ this.LblDate.Name = "LblDate";
+ this.LblDate.Visible = false;
+ //
+ // LblNickname
+ //
+ this.LblNickname.Label = "xxx 已登录";
+ this.LblNickname.Name = "LblNickname";
+ this.LblNickname.Visible = false;
+ //
+ // group2
+ //
+ this.group2.Name = "group2";
+ //
+ // grpDebug
+ //
+ this.grpDebug.Items.Add(this.btnShowPane);
+ this.grpDebug.Items.Add(this.btnHidePane);
+ this.grpDebug.Items.Add(this.BtnOpenLog);
+ this.grpDebug.Items.Add(this.button1);
+ this.grpDebug.Items.Add(this.BtnOpenLogger);
+ this.grpDebug.Items.Add(this.BtnTest);
+ this.grpDebug.Items.Add(this.BtnOpenAppDir);
+ this.grpDebug.Items.Add(this.BtnShowVersion);
+ this.grpDebug.Items.Add(this.dropDown1);
+ this.grpDebug.Label = "开发调试";
+ this.grpDebug.Name = "grpDebug";
+ this.grpDebug.Visible = false;
+ //
+ // dropDown1
+ //
+ ribbonDropDownItemImpl1.Label = "开发";
+ ribbonDropDownItemImpl2.Label = "测试";
+ ribbonDropDownItemImpl3.Label = "生产";
+ this.dropDown1.Items.Add(ribbonDropDownItemImpl1);
+ this.dropDown1.Items.Add(ribbonDropDownItemImpl2);
+ this.dropDown1.Items.Add(ribbonDropDownItemImpl3);
+ this.dropDown1.Label = "环境";
+ this.dropDown1.Name = "dropDown1";
+ //
// BtnProofreadAll
//
this.BtnProofreadAll.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
this.BtnProofreadAll.Image = global::AIProofread.Properties.Resources.icon_proofread;
- this.BtnProofreadAll.Label = "全文校对\r\n";
+ 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
@@ -129,6 +174,7 @@ namespace AIProofread
this.menuProofreadList.Label = "全文校对\r\n";
this.menuProofreadList.Name = "menuProofreadList";
this.menuProofreadList.ShowImage = true;
+ this.menuProofreadList.Visible = false;
//
// BtnProofreadExact
//
@@ -238,15 +284,6 @@ namespace AIProofread
this.BtnShowPanel.Visible = false;
this.BtnShowPanel.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnShowPanel_Click);
//
- // btnDetectionOneClick
- //
- 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
//
this.MenuMore.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
@@ -295,43 +332,6 @@ namespace AIProofread
this.btnSetting.ShowImage = true;
this.btnSetting.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnSetting_Click);
//
- // grpOther
- //
- this.grpOther.Items.Add(this.LblDate);
- this.grpOther.Items.Add(this.LblNickname);
- this.grpOther.Name = "grpOther";
- //
- // LblDate
- //
- this.LblDate.Label = "过期时间:";
- this.LblDate.Name = "LblDate";
- this.LblDate.Visible = false;
- //
- // LblNickname
- //
- this.LblNickname.Label = "xxx 已登录";
- this.LblNickname.Name = "LblNickname";
- this.LblNickname.Visible = false;
- //
- // group2
- //
- this.group2.Name = "group2";
- //
- // grpDebug
- //
- this.grpDebug.Items.Add(this.btnShowPane);
- this.grpDebug.Items.Add(this.btnHidePane);
- this.grpDebug.Items.Add(this.BtnOpenLog);
- this.grpDebug.Items.Add(this.button1);
- this.grpDebug.Items.Add(this.BtnOpenLogger);
- this.grpDebug.Items.Add(this.BtnTest);
- this.grpDebug.Items.Add(this.BtnOpenAppDir);
- this.grpDebug.Items.Add(this.BtnShowVersion);
- this.grpDebug.Items.Add(this.dropDown1);
- this.grpDebug.Label = "开发调试";
- this.grpDebug.Name = "grpDebug";
- this.grpDebug.Visible = false;
- //
// btnShowPane
//
this.btnShowPane.Label = "显示面板";
@@ -380,17 +380,6 @@ namespace AIProofread
this.BtnShowVersion.Name = "BtnShowVersion";
this.BtnShowVersion.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnShowVersion_Click);
//
- // dropDown1
- //
- ribbonDropDownItemImpl1.Label = "开发";
- ribbonDropDownItemImpl2.Label = "测试";
- ribbonDropDownItemImpl3.Label = "生产";
- this.dropDown1.Items.Add(ribbonDropDownItemImpl1);
- this.dropDown1.Items.Add(ribbonDropDownItemImpl2);
- this.dropDown1.Items.Add(ribbonDropDownItemImpl3);
- this.dropDown1.Label = "环境";
- this.dropDown1.Name = "dropDown1";
- //
// Ribbon1
//
this.Name = "Ribbon1";
@@ -439,7 +428,6 @@ 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.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 1592926..c7d274f 100644
--- a/AIProofread/Ribbon1.cs
+++ b/AIProofread/Ribbon1.cs
@@ -42,7 +42,7 @@ namespace AIProofread
public void SetCommonBtnStatus(bool status)
{
- // BtnProofreadAll.Enabled = status;
+ BtnProofreadAll.Enabled = status;
menuProofreadList.Enabled = status;
btnClear.Enabled = status;
@@ -53,7 +53,7 @@ namespace AIProofread
btnLogout.Enabled = status;
ButtonLoadCache.Enabled = status;
ButtonSaveCache.Enabled = status;
- btnDetectionOneClick.Enabled = status;
+ //btnDetectionOneClick.Enabled = status;
//BtnShowPanel.Enabled = status;
BtnExportProofreadResult.Enabled = status;
}
@@ -209,8 +209,8 @@ namespace AIProofread
private void BtnProofreadAll_Click(object sender, RibbonControlEventArgs e)
{
- string time = DateTime.Now.ToString("yyyy - MM - dd HH: mm:ss: fff:ffffff");
- Globals.ThisAddIn.SendMessageToWeb("start", time);
+ Globals.ThisAddIn.SendMessageToWeb("start","all");
+ //Globals.ThisAddIn.SendMessageToWeb("show-check-all", "");
}
private void btnClear_Click(object sender, RibbonControlEventArgs e)
@@ -619,9 +619,31 @@ namespace AIProofread
//btnDetectionAll.Enabled = r.Start == r.End;
}
- public void SetDetectionBtnStatus(bool isChecking)
+ ///
+ /// 检测状态
+ ///
+ private bool isChecking = false;
+ ///
+ /// 校对状态
+ ///
+ private bool isProofreading = false;
+ ///
+ /// 设置校对状态
+ ///
+ ///
+ public void SetProofreadStatus(bool isProofreading)
{
- btnDetectionOneClick.Enabled = !isChecking;
+ this.isProofreading = isProofreading;
+ BtnProofreadAll.Enabled = !isChecking && !isProofreading;
+ }
+ ///
+ /// 设置常识性检测状态
+ ///
+ ///
+ public void SetDetectionStatus(bool isChecking)
+ {
+ this.isChecking = isChecking;
+ //BtnProofreadAll.Enabled = !isChecking && !isProofreading;
}
private void BtnShowManual_Click(object sender, RibbonControlEventArgs e)
diff --git a/AIProofread/Ribbon1.resx b/AIProofread/Ribbon1.resx
index 5c3f46e..fe076e2 100644
--- a/AIProofread/Ribbon1.resx
+++ b/AIProofread/Ribbon1.resx
@@ -159,9 +159,6 @@
True
-
- True
-
True
diff --git a/AIProofread/core/CommonSenseDetection.cs b/AIProofread/core/CommonSenseDetection.cs
index df98a38..af109e0 100644
--- a/AIProofread/core/CommonSenseDetection.cs
+++ b/AIProofread/core/CommonSenseDetection.cs
@@ -75,7 +75,7 @@ namespace AIProofread.core
var enableAll = string.IsNullOrEmpty(checkingSummary);
//Globals.ThisAddIn.ribbon.SetDetectionBtnStatus(enableAll,!enableAll);
}
- Globals.Ribbons.Ribbon1.SetDetectionBtnStatus(isChecking);
+ Globals.Ribbons.Ribbon1.SetDetectionStatus(isChecking);
}
public string GetHistory()