feat:版本改为2.2.5;消息提示框能够提示关闭消息;修复多处问题并优化功能实现

This commit is contained in:
LittleBoy 2025-04-17 16:53:32 +08:00
parent 3c3ccb8847
commit 5e4f692897
7 changed files with 83 additions and 88 deletions

Binary file not shown.

View File

@ -238,10 +238,11 @@ namespace AIProofread
try
{
string applicationBase = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
string path = "updater.exe";
ProcessStartInfo processStartInfo = new ProcessStartInfo(Path.Combine(applicationBase, Path.GetFileName(path)))
string path = Path.Combine(applicationBase, Path.GetFileName("updater.exe"));
ProcessStartInfo processStartInfo = new ProcessStartInfo()
{
WorkingDirectory = applicationBase,
FileName = path,
UseShellExecute = true,
Verb = "runas"
};
@ -756,7 +757,7 @@ namespace AIProofread
}
catch (Exception ex)
{
Logger.Error("Initial Content error:",ex);
Logger.Error("Initial Content error:", ex);
return "false";
}
return "true";
@ -847,7 +848,7 @@ namespace AIProofread
}
catch (Exception ex)
{
Logger.Error("导出勘误表失败:" + ex.Message,ex);
Logger.Error("导出勘误表失败:" + ex.Message, ex);
return BridgeResult.Error(-1, ex.Message);
}
}

View File

@ -36,7 +36,7 @@ namespace AIProofread
public class Config
{
public static readonly string APP_NAME = "AI校对王";
public static readonly string APP_VERSION = "2.2.4";
public static readonly string APP_VERSION = "2.2.5";
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
/// <summary>
/// 网页访问地址
/// </summary>
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.Dev;
#else

View File

@ -123,6 +123,11 @@ namespace AIProofread.Controls
private void BtnClose_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(currentConfirmAction))
{
string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
Globals.ThisAddIn.SendMessageToWeb(currentConfirmAction, "cancel");
}
this.Close();
}
@ -131,7 +136,7 @@ namespace AIProofread.Controls
if (!string.IsNullOrEmpty(currentConfirmAction))
{
string time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
Globals.ThisAddIn.SendMessageToWeb(currentConfirmAction, time);
Globals.ThisAddIn.SendMessageToWeb(currentConfirmAction, "confirm");
}
this.Close();
}

View File

@ -41,6 +41,13 @@ namespace AIProofread
Microsoft.Office.Tools.Ribbon.RibbonDropDownItem ribbonDropDownItemImpl3 = this.Factory.CreateRibbonDropDownItem();
this.tabAIProofread = this.Factory.CreateRibbonTab();
this.group1 = this.Factory.CreateRibbonGroup();
this.Group = 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();
@ -53,30 +60,22 @@ namespace AIProofread
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.btnShowPane = this.Factory.CreateRibbonButton();
this.btnHidePane = this.Factory.CreateRibbonButton();
this.BtnOpenLog = this.Factory.CreateRibbonButton();
this.button1 = this.Factory.CreateRibbonButton();
this.BtnOpenLogger = this.Factory.CreateRibbonButton();
this.BtnTest = this.Factory.CreateRibbonButton();
this.BtnOpenAppDir = this.Factory.CreateRibbonButton();
this.BtnShowVersion = this.Factory.CreateRibbonButton();
this.button2 = this.Factory.CreateRibbonButton();
this.dropDown1 = this.Factory.CreateRibbonDropDown();
this.tabAIProofread.SuspendLayout();
this.group1.SuspendLayout();
this.Group.SuspendLayout();
@ -107,6 +106,66 @@ namespace AIProofread
this.group1.Items.Add(this.btnSetting);
this.group1.Name = "group1";
//
// Group
//
this.Group.Items.Add(this.ButtonSaveCache);
this.Group.Items.Add(this.ButtonLoadCache);
this.Group.Name = "Group";
//
// grpOther
//
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";
//
// 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";
//
// grpDebug
//
this.grpDebug.Items.Add(this.btnShowPane);
this.grpDebug.Items.Add(this.btnHidePane);
this.grpDebug.Items.Add(this.BtnOpenLog);
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.button2);
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;
@ -211,12 +270,6 @@ namespace AIProofread
this.btnSetting.ShowImage = true;
this.btnSetting.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.btnSetting_Click);
//
// Group
//
this.Group.Items.Add(this.ButtonSaveCache);
this.Group.Items.Add(this.ButtonLoadCache);
this.Group.Name = "Group";
//
// ButtonSaveCache
//
this.ButtonSaveCache.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
@ -235,16 +288,6 @@ namespace AIProofread
this.ButtonLoadCache.ShowImage = true;
this.ButtonLoadCache.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.ButtonLoadCache_Click);
//
// grpOther
//
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";
//
// BtnGetContact
//
this.BtnGetContact.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge;
@ -282,24 +325,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;
@ -318,22 +343,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.button2);
this.grpDebug.Items.Add(this.dropDown1);
this.grpDebug.Label = "开发调试";
this.grpDebug.Name = "grpDebug";
this.grpDebug.Visible = false;
//
// btnShowPane
//
this.btnShowPane.Label = "显示面板";
@ -352,12 +361,6 @@ namespace AIProofread
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 = "打开日志窗口";
@ -388,17 +391,6 @@ namespace AIProofread
this.button2.Name = "button2";
this.button2.Click += new Microsoft.Office.Tools.Ribbon.RibbonControlEventHandler(this.button2_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 +431,6 @@ namespace AIProofread
internal Microsoft.Office.Tools.Ribbon.RibbonButton btnShowPane;
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;

View File

@ -210,9 +210,6 @@
<metadata name="BtnOpenLog.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="button1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BtnOpenLogger.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -14,8 +14,9 @@
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
元素。
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />