diff --git a/.vs/AIProofread/v17/.suo b/.vs/AIProofread/v17/.suo
index ff2aab6..f38da7f 100644
Binary files a/.vs/AIProofread/v17/.suo and b/.vs/AIProofread/v17/.suo differ
diff --git a/AIProofread/AIProofread.csproj b/AIProofread/AIProofread.csproj
index fe1c286..9ceba33 100644
--- a/AIProofread/AIProofread.csproj
+++ b/AIProofread/AIProofread.csproj
@@ -386,6 +386,7 @@
ProofreadMainControl.cs
+
diff --git a/AIProofread/Config.cs b/AIProofread/Config.cs
index 55ba3da..88524f1 100644
--- a/AIProofread/Config.cs
+++ b/AIProofread/Config.cs
@@ -56,9 +56,9 @@ namespace AIProofread
public static bool RUN_IN_DEBUG = true;
public static AppEnvironment APP_ENV = AppEnvironment.Dev;
#else
- 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;
+ public static string WEB_PATH = AppServer.DEV; // gm-plugin.gachafun.com pre-gm-plugin.gachafun.com
+ public static bool RUN_IN_DEBUG = true;
+ public static AppEnvironment APP_ENV = AppEnvironment.Dev;
#endif
public static readonly string APP_DATA_PATH = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\ai_proofread";
diff --git a/AIProofread/Ribbon1.Designer.cs b/AIProofread/Ribbon1.Designer.cs
index aa94aa8..71b31ea 100644
--- a/AIProofread/Ribbon1.Designer.cs
+++ b/AIProofread/Ribbon1.Designer.cs
@@ -41,7 +41,6 @@ namespace AIProofread
Microsoft.Office.Tools.Ribbon.RibbonDropDownItem ribbonDropDownItemImpl3 = this.Factory.CreateRibbonDropDownItem();
this.tabAIProofread = this.Factory.CreateRibbonTab();
this.group1 = this.Factory.CreateRibbonGroup();
- this.BtnProofreadAll = this.Factory.CreateRibbonButton();
this.menuProofreadList = this.Factory.CreateRibbonMenu();
this.BtnProofreadExact = this.Factory.CreateRibbonButton();
this.BtnProofreadFull = this.Factory.CreateRibbonButton();
@@ -97,7 +96,6 @@ namespace AIProofread
//
// group1
//
- this.group1.Items.Add(this.BtnProofreadAll);
this.group1.Items.Add(this.menuProofreadList);
this.group1.Items.Add(this.BtnExportProofreadResult);
this.group1.Items.Add(this.btnClear);
@@ -106,16 +104,6 @@ namespace AIProofread
this.group1.Items.Add(this.btnSetting);
this.group1.Name = "group1";
//
- // 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.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;
@@ -421,7 +409,6 @@ namespace AIProofread
internal Microsoft.Office.Tools.Ribbon.RibbonLabel LblNickname;
internal Microsoft.Office.Tools.Ribbon.RibbonLabel LblDate;
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnLogin;
- internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnProofreadAll;
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnClear;
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnOpenLexicon;
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnSetting;
diff --git a/AIProofread/Ribbon1.cs b/AIProofread/Ribbon1.cs
index 8043682..904db45 100644
--- a/AIProofread/Ribbon1.cs
+++ b/AIProofread/Ribbon1.cs
@@ -24,20 +24,29 @@ namespace AIProofread
{
//btnLogin.Label = "用户\n登录";
//btnLogout.Label = "退出\n登录";
-
Globals.ThisAddIn.ribbon = this;
- ShowDebug();
+
+ InitModule();
}
///
/// 用于调试或测试
///
- public void ShowDebug()
+ public void InitModule()
{
- if (Config.RUN_IN_DEBUG)
- {
- grpDebug.Visible = true;
- }
+ menuProofreadList.Visible = AppModule.ENABLE_PROOFREAD;
+ BtnExportProofreadResult.Visible = AppModule.ENABLE_EXPORT_PROOFREAD_RESULT;
+ btnOpenLexicon.Visible = AppModule.ENABLE_LEXICON_MANAGE;
+ menuSencenDect.Visible = AppModule.ENABLE_COMMONSENSE_CHECK;
+ btnSetting.Visible = AppModule.ENABLE_SETTING;
+ ButtonSaveCache.Visible = AppModule.ENABLE_SAVE_CACHE;
+ ButtonLoadCache.Visible = AppModule.ENABLE_LOAD_CACHE;
+ BtnGetContact.Visible = AppModule.ENABLE_CUSTOMER_SERVICE;
+ BtnUpdate.Visible = AppModule.ENABLE_UPGRADE;
+ BtnShowManual.Visible = AppModule.ENABLE_HELP;
+
+ // 调试面板
+ grpDebug.Visible = Config.RUN_IN_DEBUG;
}
public void SetCommonBtnStatus(bool status)
@@ -80,8 +89,6 @@ namespace AIProofread
///
public void InitWPS()
{
-
- 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;
@@ -199,12 +206,6 @@ namespace AIProofread
Bridge.bridge.ShowUpgradeView();
}
- 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);
- }
-
private void btnClear_Click(object sender, RibbonControlEventArgs e)
{
//DocumentUtil.ClearProofreadMarks();
diff --git a/AIProofread/Ribbon1.resx b/AIProofread/Ribbon1.resx
index 464653a..eeb4917 100644
--- a/AIProofread/Ribbon1.resx
+++ b/AIProofread/Ribbon1.resx
@@ -123,9 +123,6 @@
True
-
- True
-
True
diff --git a/AIProofread/ThisAddIn.cs b/AIProofread/ThisAddIn.cs
index 3dc2a0e..d0d6486 100644
--- a/AIProofread/ThisAddIn.cs
+++ b/AIProofread/ThisAddIn.cs
@@ -340,10 +340,10 @@ namespace AIProofread
);
}
Config.RUN_IN_DEBUG = config.AppRunInDebug;
- if (Config.APP_ENV != AppEnvironment.Prod && this.ribbon != null)
- {
- this.ribbon.ShowDebug();
- }
+ //if (Config.APP_ENV != AppEnvironment.Prod && this.ribbon != null)
+ //{
+ // this.ribbon.Ini();
+ //}
}
}
catch (Exception) { }
diff --git a/AIProofread/core/AppModule.cs b/AIProofread/core/AppModule.cs
new file mode 100644
index 0000000..072ecd2
--- /dev/null
+++ b/AIProofread/core/AppModule.cs
@@ -0,0 +1,42 @@
+namespace AIProofread.core
+{
+ public class AppModule
+ {
+ ///
+ /// 是否启用导出校对结果
+ ///
+ public const bool ENABLE_EXPORT_PROOFREAD_RESULT = true;
+ ///
+ /// 是否词库管理
+ ///
+ public const bool ENABLE_LEXICON_MANAGE = true;
+ ///
+ /// 是否启用常识性检测
+ ///
+ public const bool ENABLE_COMMONSENSE_CHECK = true;
+ ///
+ /// 设置功能
+ ///
+ public const bool ENABLE_SETTING = true;
+
+ ///
+ /// 是否校对功能
+ ///
+ public const bool ENABLE_PROOFREAD = true;
+ ///
+ /// 优先查全
+ ///
+ public const bool ENABLE_PROOFREAD_FULL = true;
+ ///
+ /// 优先查准exact
+ ///
+ public const bool ENABLE_PROOFREAD_EXACT = true;
+
+ public const bool ENABLE_SAVE_CACHE = true;
+ public const bool ENABLE_LOAD_CACHE = true;
+ public const bool ENABLE_CUSTOMER_SERVICE = true;
+ public const bool ENABLE_UPGRADE = true;
+ public const bool ENABLE_HELP = true;
+
+ }
+}
diff --git a/AIProofread/obj/Debug/AIProofread.csproj.AssemblyReference.cache b/AIProofread/obj/Debug/AIProofread.csproj.AssemblyReference.cache
index 59111aa..db84184 100644
Binary files a/AIProofread/obj/Debug/AIProofread.csproj.AssemblyReference.cache and b/AIProofread/obj/Debug/AIProofread.csproj.AssemblyReference.cache differ
diff --git a/AIProofread/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/AIProofread/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index b6a2912..6a15013 100644
Binary files a/AIProofread/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/AIProofread/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ