diff --git a/AIProofread/AIProofread.csproj b/AIProofread/AIProofread.csproj index 8cf0eee..46ddc81 100644 --- a/AIProofread/AIProofread.csproj +++ b/AIProofread/AIProofread.csproj @@ -552,6 +552,12 @@ + + + + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/AIProofread/Config.cs b/AIProofread/Config.cs index 4b4cbf4..6013db3 100644 --- a/AIProofread/Config.cs +++ b/AIProofread/Config.cs @@ -12,11 +12,12 @@ namespace AIProofread public class Config { public static readonly string APP_NAME = "AI校对王"; - public static readonly string APP_VERSION = "2.1.2"; + public static readonly string APP_VERSION = "2.2.0"; public static bool IS_WPS = false; public static bool UpgradeForcedNotice = false; public static readonly string APP_BASE_DIR = AppDomain.CurrentDomain.BaseDirectory; public static readonly string CONFIG_FILE = AppDomain.CurrentDomain.BaseDirectory + "app.json"; + public static readonly string USER_MANUAL_URL = "https://doc.weixin.qq.com/doc/w3_AMYAMAaTAKQFkUi5WkYT1OPSXFD17?scode=ACQARAe_AAsF7LbNrM"; /// /// 文本背景色 /// @@ -30,7 +31,7 @@ namespace AIProofread public static bool RUN_IN_DEBUG = true; public static AppEnvironment APP_ENV = AppEnvironment.Dev; #else - public static string WEB_PATH = "https://gm-plugin.gachafun.com/"; // gm-plugin.gachafun.com pre-gm-plugin.gachafun.com + public static string WEB_PATH = "http://gm2-plugin.zverse.group/"; // 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/Controls/FormContact.Designer.cs b/AIProofread/Controls/FormContact.Designer.cs index f3690df..8a52482 100644 --- a/AIProofread/Controls/FormContact.Designer.cs +++ b/AIProofread/Controls/FormContact.Designer.cs @@ -40,7 +40,7 @@ this.WebViewContact.Dock = System.Windows.Forms.DockStyle.Fill; this.WebViewContact.Location = new System.Drawing.Point(0, 0); this.WebViewContact.Name = "WebViewContact"; - this.WebViewContact.Size = new System.Drawing.Size(380, 216); + this.WebViewContact.Size = new System.Drawing.Size(540, 420); this.WebViewContact.TabIndex = 0; this.WebViewContact.ZoomFactor = 1D; // @@ -48,7 +48,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(380, 216); + this.ClientSize = new System.Drawing.Size(540, 420); this.Controls.Add(this.WebViewContact); this.Name = "FormContact"; this.ShowIcon = false; diff --git a/AIProofread/Model/DocumentInfo.cs b/AIProofread/Model/DocumentInfo.cs index 663e1c6..618cfcf 100644 --- a/AIProofread/Model/DocumentInfo.cs +++ b/AIProofread/Model/DocumentInfo.cs @@ -604,9 +604,13 @@ namespace AIProofread.Model //object goNext = WdGoToDirection.wdGoToNext; //Globals.ThisAddIn.Application.ActiveWindow.Selection.GoTo(ref goToLine, ref goNext, ref lineNum); // - object bookmark = WdGoToItem.wdGoToBookmark; - object bookmarkName = mark.Name; - Globals.ThisAddIn.Application.ActiveWindow.Selection.GoTo(ref bookmark, ref missing, ref missing, ref bookmarkName); + //object bookmark = WdGoToItem.wdGoToBookmark; + //object bookmarkName = mark.Name; + var targetRange = mark.Range; + // 选中 + targetRange.Select(); + Globals.ThisAddIn.Application.ActiveWindow.ScrollIntoView(targetRange);//.Selection.GoTo(ref bookmark, ref missing, ref missing, ref bookmarkName); + // //mark.DisableCharacterSpaceGrid = false; // 先滚动到可视区域 diff --git a/AIProofread/Properties/Resources.Designer.cs b/AIProofread/Properties/Resources.Designer.cs index de65c5c..aad8863 100644 --- a/AIProofread/Properties/Resources.Designer.cs +++ b/AIProofread/Properties/Resources.Designer.cs @@ -230,6 +230,26 @@ namespace AIProofread.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap icon_manual { + get { + object obj = ResourceManager.GetObject("icon-manual", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap icon_manual_wps { + get { + object obj = ResourceManager.GetObject("icon-manual-wps", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// diff --git a/AIProofread/Properties/Resources.resx b/AIProofread/Properties/Resources.resx index 9742ea7..b8833c2 100644 --- a/AIProofread/Properties/Resources.resx +++ b/AIProofread/Properties/Resources.resx @@ -136,6 +136,9 @@ ..\Resources\icon-history.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-proofread.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\icon-phone.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -178,11 +181,14 @@ ..\Resources\favicon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-ai-robot-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\icon-refresh-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icon-clear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-export.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\button_default.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -196,11 +202,14 @@ ..\Resources\logo_no_text.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-ai-robot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\logo_wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icon-export.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-clear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icon-phone-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -208,9 +217,6 @@ ..\Resources\icon-history-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icon-panel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\logo_no_text_wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -220,13 +226,13 @@ ..\Resources\icon_close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icon-proofread.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-panel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icon-ai-robot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-manual.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icon-ai-robot-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-manual-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/AIProofread/Resources/icon-manual-wps.jpg b/AIProofread/Resources/icon-manual-wps.jpg new file mode 100644 index 0000000..63df64d Binary files /dev/null and b/AIProofread/Resources/icon-manual-wps.jpg differ diff --git a/AIProofread/Resources/icon-manual.png b/AIProofread/Resources/icon-manual.png new file mode 100644 index 0000000..9e0b30f Binary files /dev/null and b/AIProofread/Resources/icon-manual.png differ diff --git a/AIProofread/Ribbon1.Designer.cs b/AIProofread/Ribbon1.Designer.cs index 2a0dc16..208f441 100644 --- a/AIProofread/Ribbon1.Designer.cs +++ b/AIProofread/Ribbon1.Designer.cs @@ -62,6 +62,7 @@ namespace AIProofread this.LblNickname = this.Factory.CreateRibbonLabel(); this.group2 = this.Factory.CreateRibbonGroup(); this.BtnShowPanel = this.Factory.CreateRibbonButton(); + this.BtnShowManual = this.Factory.CreateRibbonButton(); this.grpDebug = this.Factory.CreateRibbonGroup(); this.btnShowPane = this.Factory.CreateRibbonButton(); this.btnHidePane = this.Factory.CreateRibbonButton(); @@ -265,6 +266,7 @@ namespace AIProofread // group2 // this.group2.Items.Add(this.BtnShowPanel); + this.group2.Items.Add(this.BtnShowManual); this.group2.Name = "group2"; // // BtnShowPanel @@ -276,6 +278,15 @@ namespace AIProofread this.BtnShowPanel.ShowImage = true; this.BtnShowPanel.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnShowPanel_Click); // + // BtnShowManual + // + this.BtnShowManual.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; + this.BtnShowManual.Image = global::AIProofread.Properties.Resources.icon_manual; + this.BtnShowManual.Label = "用户手册\r\n"; + this.BtnShowManual.Name = "BtnShowManual"; + this.BtnShowManual.ShowImage = true; + this.BtnShowManual.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnShowManual_Click); + // // grpDebug // this.grpDebug.Items.Add(this.btnShowPane); @@ -407,6 +418,7 @@ namespace AIProofread internal Microsoft.Office.Tools.Ribbon.RibbonButton btnDetectionAll; internal Microsoft.Office.Tools.Ribbon.RibbonButton btnDetectionParagraph; internal Microsoft.Office.Tools.Ribbon.RibbonButton btnDetectionHistory; + internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnShowManual; } partial class ThisRibbonCollection diff --git a/AIProofread/Ribbon1.cs b/AIProofread/Ribbon1.cs index fdb449a..33252e8 100644 --- a/AIProofread/Ribbon1.cs +++ b/AIProofread/Ribbon1.cs @@ -11,6 +11,7 @@ using System.Text; using AIProofread.core; using System.Windows.Forms; using AIProofread.Properties; +using System.Security.Policy; namespace AIProofread { @@ -95,6 +96,7 @@ namespace AIProofread BtnShowPanel.Image = AIProofread.Properties.Resources.icon_panel_wps; // 导出校对结果 BtnExportProofreadResult.Image = AIProofread.Properties.Resources.icon_export_wps; + BtnShowManual.Image = AIProofread.Properties.Resources.icon_manual_wps; } public void ProcessLoginInfo(Userinfo userinfo) @@ -612,5 +614,15 @@ namespace AIProofread btnDetectionAll.Enabled = allStatus; btnDetectionParagraph.Enabled = rangeStatus; } + + private void BtnShowManual_Click(object sender, RibbonControlEventArgs e) + { + try + { + Process.Start(Config.USER_MANUAL_URL); + }catch (Exception) { + Globals.ThisAddIn.ActiveDocument.ShowMessage("打开用户手册失败", 2000, false); + } + } } }