diff --git a/.vs/AIProofread/v17/.suo b/.vs/AIProofread/v17/.suo index bdf9623..d973082 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 f9a22cf..6c7b100 100644 --- a/AIProofread/AIProofread.csproj +++ b/AIProofread/AIProofread.csproj @@ -561,6 +561,10 @@ + + + + diff --git a/AIProofread/Config.cs b/AIProofread/Config.cs index 75dc5ad..51cd3cc 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 = "2.2.2"; + public static readonly string APP_VERSION = "2.2.3"; 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.GM_FN; //pre-gm-plugin.gachafun.com localhost:5173 gm2-plugin.zverse.group public static bool RUN_IN_DEBUG = true; public static AppEnvironment APP_ENV = AppEnvironment.Dev; #else diff --git a/AIProofread/Properties/Resources.Designer.cs b/AIProofread/Properties/Resources.Designer.cs index 5e58b53..223bff0 100644 --- a/AIProofread/Properties/Resources.Designer.cs +++ b/AIProofread/Properties/Resources.Designer.cs @@ -210,6 +210,26 @@ namespace AIProofread.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap icon_laws_query { + get { + object obj = ResourceManager.GetObject("icon-laws-query", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap icon_laws_query_wps { + get { + object obj = ResourceManager.GetObject("icon-laws-query-wps", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// @@ -250,6 +270,26 @@ namespace AIProofread.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap icon_more { + get { + object obj = ResourceManager.GetObject("icon-more", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap icon_more_wps { + get { + object obj = ResourceManager.GetObject("icon-more-wps", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// diff --git a/AIProofread/Properties/Resources.resx b/AIProofread/Properties/Resources.resx index de219c3..ca6e67c 100644 --- a/AIProofread/Properties/Resources.resx +++ b/AIProofread/Properties/Resources.resx @@ -157,6 +157,9 @@ ..\Resources\icon-update-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-more-wps.jpg;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 @@ -181,6 +184,9 @@ ..\Resources\favicon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-stock.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 @@ -190,14 +196,17 @@ ..\Resources\icon-clear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-more.png;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 ..\Resources\button_default.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icon-export-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-stock-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icon-refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -208,6 +217,9 @@ ..\Resources\logo_no_text_wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-export-wps.jpg;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 @@ -235,10 +247,10 @@ ..\Resources\icon-proofread.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icon-stock-wps.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-laws-query.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icon-stock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icon-laws-query-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-laws-query-wps.jpg b/AIProofread/Resources/icon-laws-query-wps.jpg new file mode 100644 index 0000000..e37b9e2 Binary files /dev/null and b/AIProofread/Resources/icon-laws-query-wps.jpg differ diff --git a/AIProofread/Resources/icon-laws-query.png b/AIProofread/Resources/icon-laws-query.png new file mode 100644 index 0000000..7855691 Binary files /dev/null and b/AIProofread/Resources/icon-laws-query.png differ diff --git a/AIProofread/Resources/icon-more-wps.jpg b/AIProofread/Resources/icon-more-wps.jpg new file mode 100644 index 0000000..533453b Binary files /dev/null and b/AIProofread/Resources/icon-more-wps.jpg differ diff --git a/AIProofread/Resources/icon-more.png b/AIProofread/Resources/icon-more.png new file mode 100644 index 0000000..c5c1bfa Binary files /dev/null and b/AIProofread/Resources/icon-more.png differ diff --git a/AIProofread/Ribbon1.Designer.cs b/AIProofread/Ribbon1.Designer.cs index 5c5058e..e651b1d 100644 --- a/AIProofread/Ribbon1.Designer.cs +++ b/AIProofread/Ribbon1.Designer.cs @@ -41,33 +41,12 @@ namespace AIProofread Microsoft.Office.Tools.Ribbon.RibbonDropDownItem ribbonDropDownItemImpl3 = this.Factory.CreateRibbonDropDownItem(); this.tabAIProofreadAnno = 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(); - this.BtnExportProofreadResult = this.Factory.CreateRibbonButton(); - this.btnClear = this.Factory.CreateRibbonButton(); - this.btnOpenLexicon = this.Factory.CreateRibbonButton(); - this.BtnQueryStock = this.Factory.CreateRibbonButton(); - this.menuSencenDect = this.Factory.CreateRibbonMenu(); - this.btnDetectionAll = this.Factory.CreateRibbonButton(); - this.btnDetectionParagraph = this.Factory.CreateRibbonButton(); - this.btnDetectionHistory = this.Factory.CreateRibbonButton(); - this.btnSetting = this.Factory.CreateRibbonButton(); - this.Group = this.Factory.CreateRibbonGroup(); - this.ButtonSaveCache = this.Factory.CreateRibbonButton(); - this.ButtonLoadCache = this.Factory.CreateRibbonButton(); this.grpOther = this.Factory.CreateRibbonGroup(); - this.BtnGetContact = this.Factory.CreateRibbonButton(); - this.BtnUpdate = this.Factory.CreateRibbonButton(); - this.btnLogin = this.Factory.CreateRibbonButton(); - this.btnLogout = this.Factory.CreateRibbonButton(); this.LblDate = this.Factory.CreateRibbonLabel(); 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.dropDown1 = this.Factory.CreateRibbonDropDown(); this.btnShowPane = this.Factory.CreateRibbonButton(); this.btnHidePane = this.Factory.CreateRibbonButton(); this.BtnOpenLog = this.Factory.CreateRibbonButton(); @@ -76,19 +55,38 @@ namespace AIProofread this.BtnTest = this.Factory.CreateRibbonButton(); this.BtnOpenAppDir = this.Factory.CreateRibbonButton(); this.BtnShowVersion = this.Factory.CreateRibbonButton(); - 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.BtnQueryStock = this.Factory.CreateRibbonButton(); + this.BtnQueryLaw = this.Factory.CreateRibbonButton(); + this.menuSencenDect = this.Factory.CreateRibbonMenu(); + this.btnDetectionAll = this.Factory.CreateRibbonButton(); + this.btnDetectionParagraph = this.Factory.CreateRibbonButton(); + this.btnDetectionHistory = this.Factory.CreateRibbonButton(); + this.MenuMore = this.Factory.CreateRibbonMenu(); + this.btnOpenLexicon = this.Factory.CreateRibbonButton(); + this.ButtonSaveCache = this.Factory.CreateRibbonButton(); + this.ButtonLoadCache = this.Factory.CreateRibbonButton(); + this.btnSetting = this.Factory.CreateRibbonButton(); + this.BtnGetContact = this.Factory.CreateRibbonButton(); + this.BtnUpdate = this.Factory.CreateRibbonButton(); + this.btnLogin = this.Factory.CreateRibbonButton(); + this.btnLogout = this.Factory.CreateRibbonButton(); + this.BtnShowPanel = this.Factory.CreateRibbonButton(); + this.BtnShowManual = this.Factory.CreateRibbonButton(); this.tabAIProofreadAnno.SuspendLayout(); this.group1.SuspendLayout(); - this.Group.SuspendLayout(); this.grpOther.SuspendLayout(); - this.group2.SuspendLayout(); this.grpDebug.SuspendLayout(); this.SuspendLayout(); // // tabAIProofreadAnno // this.tabAIProofreadAnno.Groups.Add(this.group1); - this.tabAIProofreadAnno.Groups.Add(this.Group); this.tabAIProofreadAnno.Groups.Add(this.grpOther); this.tabAIProofreadAnno.Groups.Add(this.group2); this.tabAIProofreadAnno.Groups.Add(this.grpDebug); @@ -101,13 +99,115 @@ namespace AIProofread this.group1.Items.Add(this.BtnProofreadAll); this.group1.Items.Add(this.menuProofreadList); this.group1.Items.Add(this.BtnExportProofreadResult); - this.group1.Items.Add(this.btnClear); - this.group1.Items.Add(this.btnOpenLexicon); this.group1.Items.Add(this.BtnQueryStock); + this.group1.Items.Add(this.BtnQueryLaw); + this.group1.Items.Add(this.btnClear); + this.group1.Items.Add(this.BtnGetContact); + this.group1.Items.Add(this.BtnUpdate); + this.group1.Items.Add(this.btnLogout); + 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.btnSetting); + 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"; + // + // btnShowPane + // + this.btnShowPane.Label = "显示面板"; + this.btnShowPane.Name = "btnShowPane"; + this.btnShowPane.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnShowPane_Click); + // + // btnHidePane + // + this.btnHidePane.Label = "隐藏面板"; + this.btnHidePane.Name = "btnHidePane"; + this.btnHidePane.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnHidePane_Click); + // + // BtnOpenLog + // + this.BtnOpenLog.Label = "打开日志目录"; + this.BtnOpenLog.Name = "BtnOpenLog"; + this.BtnOpenLog.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnOpenLog_Click); + // + // button1 + // + this.button1.Label = "更新测试版本"; + this.button1.Name = "button1"; + this.button1.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button1_Click); + // + // BtnOpenLogger + // + this.BtnOpenLogger.Label = "打开日志窗口"; + this.BtnOpenLogger.Name = "BtnOpenLogger"; + this.BtnOpenLogger.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnOpenLogger_Click); + // + // BtnTest + // + this.BtnTest.Label = "获取当前位置"; + this.BtnTest.Name = "BtnTest"; + this.BtnTest.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnTest_Click); + // + // BtnOpenAppDir + // + this.BtnOpenAppDir.Label = "打开插件目录"; + this.BtnOpenAppDir.Name = "BtnOpenAppDir"; + this.BtnOpenAppDir.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnOpenAppDir_Click); + // + // BtnShowVersion + // + this.BtnShowVersion.Label = "版本查看"; + this.BtnShowVersion.Name = "BtnShowVersion"; + this.BtnShowVersion.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnShowVersion_Click); + // // BtnProofreadAll // this.BtnProofreadAll.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; @@ -160,15 +260,6 @@ namespace AIProofread this.btnClear.ShowImage = true; this.btnClear.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnClear_Click); // - // btnOpenLexicon - // - this.btnOpenLexicon.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; - this.btnOpenLexicon.Image = global::AIProofread.Properties.Resources.icon_book; - this.btnOpenLexicon.Label = "词库管理\r\n"; - this.btnOpenLexicon.Name = "btnOpenLexicon"; - this.btnOpenLexicon.ShowImage = true; - this.btnOpenLexicon.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnOpenLexicon_Click); - // // BtnQueryStock // this.BtnQueryStock.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; @@ -178,6 +269,15 @@ namespace AIProofread this.BtnQueryStock.ShowImage = true; this.BtnQueryStock.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnQueryStock_Click); // + // BtnQueryLaw + // + this.BtnQueryLaw.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; + this.BtnQueryLaw.Image = global::AIProofread.Properties.Resources.icon_laws_query; + this.BtnQueryLaw.Label = "法规查询\r\n"; + this.BtnQueryLaw.Name = "BtnQueryLaw"; + this.BtnQueryLaw.ShowImage = true; + this.BtnQueryLaw.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnQueryLaw_Click); + // // menuSencenDect // this.menuSencenDect.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; @@ -212,24 +312,28 @@ namespace AIProofread this.btnDetectionHistory.ShowImage = true; this.btnDetectionHistory.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnDetectionHistory_Click); // - // btnSetting + // MenuMore // - this.btnSetting.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; - this.btnSetting.Image = global::AIProofread.Properties.Resources.icon_setting; - this.btnSetting.Label = "设置\r\n"; - this.btnSetting.Name = "btnSetting"; - this.btnSetting.ShowImage = true; - this.btnSetting.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnSetting_Click); + this.MenuMore.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; + this.MenuMore.Image = global::AIProofread.Properties.Resources.icon_more; + this.MenuMore.Items.Add(this.btnOpenLexicon); + this.MenuMore.Items.Add(this.ButtonSaveCache); + this.MenuMore.Items.Add(this.ButtonLoadCache); + this.MenuMore.Items.Add(this.btnSetting); + this.MenuMore.Label = "更多"; + this.MenuMore.Name = "MenuMore"; + this.MenuMore.ShowImage = true; // - // Group + // btnOpenLexicon // - this.Group.Items.Add(this.ButtonSaveCache); - this.Group.Items.Add(this.ButtonLoadCache); - this.Group.Name = "Group"; + this.btnOpenLexicon.Image = global::AIProofread.Properties.Resources.icon_book; + this.btnOpenLexicon.Label = "词库管理\r\n"; + this.btnOpenLexicon.Name = "btnOpenLexicon"; + this.btnOpenLexicon.ShowImage = true; + this.btnOpenLexicon.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnOpenLexicon_Click); // // ButtonSaveCache // - this.ButtonSaveCache.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; this.ButtonSaveCache.Image = global::AIProofread.Properties.Resources.icon_save; this.ButtonSaveCache.Label = "保存进度\r\n"; this.ButtonSaveCache.Name = "ButtonSaveCache"; @@ -238,22 +342,19 @@ namespace AIProofread // // ButtonLoadCache // - this.ButtonLoadCache.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; this.ButtonLoadCache.Image = global::AIProofread.Properties.Resources.icon_history; this.ButtonLoadCache.Label = "加载进度\r\n"; this.ButtonLoadCache.Name = "ButtonLoadCache"; this.ButtonLoadCache.ShowImage = true; this.ButtonLoadCache.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.ButtonLoadCache_Click); // - // grpOther + // btnSetting // - this.grpOther.Items.Add(this.BtnGetContact); - this.grpOther.Items.Add(this.BtnUpdate); - this.grpOther.Items.Add(this.btnLogin); - this.grpOther.Items.Add(this.btnLogout); - this.grpOther.Items.Add(this.LblDate); - this.grpOther.Items.Add(this.LblNickname); - this.grpOther.Name = "grpOther"; + this.btnSetting.Image = global::AIProofread.Properties.Resources.icon_setting; + this.btnSetting.Label = "设置\r\n"; + this.btnSetting.Name = "btnSetting"; + this.btnSetting.ShowImage = true; + this.btnSetting.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnSetting_Click); // // BtnGetContact // @@ -292,24 +393,6 @@ namespace AIProofread this.btnLogout.Visible = false; this.btnLogout.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnLogout_Click); // - // 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.Items.Add(this.BtnShowPanel); - this.group2.Items.Add(this.BtnShowManual); - this.group2.Name = "group2"; - // // BtnShowPanel // this.BtnShowPanel.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge; @@ -329,80 +412,6 @@ namespace AIProofread this.BtnShowManual.ShowImage = true; this.BtnShowManual.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnShowManual_Click); // - // 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 = "显示面板"; - this.btnShowPane.Name = "btnShowPane"; - this.btnShowPane.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnShowPane_Click); - // - // btnHidePane - // - this.btnHidePane.Label = "隐藏面板"; - this.btnHidePane.Name = "btnHidePane"; - this.btnHidePane.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnHidePane_Click); - // - // BtnOpenLog - // - this.BtnOpenLog.Label = "打开日志目录"; - this.BtnOpenLog.Name = "BtnOpenLog"; - this.BtnOpenLog.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnOpenLog_Click); - // - // button1 - // - this.button1.Label = "更新测试版本"; - this.button1.Name = "button1"; - this.button1.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button1_Click); - // - // BtnOpenLogger - // - this.BtnOpenLogger.Label = "打开日志窗口"; - this.BtnOpenLogger.Name = "BtnOpenLogger"; - this.BtnOpenLogger.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnOpenLogger_Click); - // - // BtnTest - // - this.BtnTest.Label = "获取当前位置"; - this.BtnTest.Name = "BtnTest"; - this.BtnTest.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnTest_Click); - // - // BtnOpenAppDir - // - this.BtnOpenAppDir.Label = "打开插件目录"; - this.BtnOpenAppDir.Name = "BtnOpenAppDir"; - this.BtnOpenAppDir.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.BtnOpenAppDir_Click); - // - // BtnShowVersion - // - this.BtnShowVersion.Label = "版本查看"; - 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"; @@ -413,12 +422,8 @@ namespace AIProofread this.tabAIProofreadAnno.PerformLayout(); this.group1.ResumeLayout(false); this.group1.PerformLayout(); - this.Group.ResumeLayout(false); - this.Group.PerformLayout(); this.grpOther.ResumeLayout(false); this.grpOther.PerformLayout(); - this.group2.ResumeLayout(false); - this.group2.PerformLayout(); this.grpDebug.ResumeLayout(false); this.grpDebug.PerformLayout(); this.ResumeLayout(false); @@ -444,7 +449,6 @@ namespace AIProofread internal Microsoft.Office.Tools.Ribbon.RibbonButton btnHidePane; internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnOpenLog; internal Microsoft.Office.Tools.Ribbon.RibbonButton button1; - internal Microsoft.Office.Tools.Ribbon.RibbonGroup Group; internal Microsoft.Office.Tools.Ribbon.RibbonButton ButtonSaveCache; internal Microsoft.Office.Tools.Ribbon.RibbonButton ButtonLoadCache; internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnOpenLogger; @@ -465,6 +469,8 @@ namespace AIProofread internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnProofreadExact; internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnProofreadFull; internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnQueryStock; + internal Microsoft.Office.Tools.Ribbon.RibbonMenu MenuMore; + internal Microsoft.Office.Tools.Ribbon.RibbonButton BtnQueryLaw; } partial class ThisRibbonCollection diff --git a/AIProofread/Ribbon1.cs b/AIProofread/Ribbon1.cs index 2c0c4c2..ceebb56 100644 --- a/AIProofread/Ribbon1.cs +++ b/AIProofread/Ribbon1.cs @@ -101,6 +101,8 @@ namespace AIProofread BtnShowManual.Image = Resources.icon_manual_wps; // 股市查询 BtnQueryStock.Image = Resources.icon_stock_wps; + MenuMore.Image = Resources.icon_more_wps; + BtnQueryLaw.Image = Resources.icon_laws_query_wps; } public void ProcessLoginInfo(Userinfo userinfo) @@ -646,5 +648,10 @@ namespace AIProofread { Globals.ThisAddIn.ShowStockQuery(); } + + private void BtnQueryLaw_Click(object sender, RibbonControlEventArgs e) + { + Globals.ThisAddIn.ShowLawQuery(); + } } } diff --git a/AIProofread/Ribbon1.resx b/AIProofread/Ribbon1.resx index 72a1f93..7fab839 100644 --- a/AIProofread/Ribbon1.resx +++ b/AIProofread/Ribbon1.resx @@ -141,7 +141,22 @@ True - + + True + + + True + + + True + + + True + + + True + + True @@ -156,10 +171,7 @@ True - - True - - + True @@ -168,21 +180,12 @@ True + + True + True - - True - - - True - - - True - - - True - True @@ -192,12 +195,6 @@ True - - True - - - True - True diff --git a/AIProofread/ThisAddIn.cs b/AIProofread/ThisAddIn.cs index 378c05f..7c6aa65 100644 --- a/AIProofread/ThisAddIn.cs +++ b/AIProofread/ThisAddIn.cs @@ -64,6 +64,7 @@ namespace AIProofread /// public FormCommonsenseDetection formCommonsenseDetection; public FormWebView fromStockQuery; + public FormWebView fromLawQuery; public bool IsWPS { get; set; } public List LoginFormList = new List(); @@ -93,6 +94,16 @@ namespace AIProofread formCommonsenseDetection.Close(); formCommonsenseDetection = null; } + public void ShowLawQuery() + { + if (fromLawQuery == null || fromLawQuery.IsDisposed) + { + fromLawQuery = new FormWebView(Config.WebPath("laws-query?app_v=101"), 1300, 750); + } + fromLawQuery.Show(); + // 显示在最前面 + fromLawQuery.Activate(); + } public void ShowStockQuery() { if (fromStockQuery == null || fromStockQuery.IsDisposed)