Commit 06d3af99 authored by tr's avatar tr

1、自动更新逻辑优化

parent 02a1981d
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<appSettings> <appSettings>
<add key="LoginInfo" value="wwF/xpBzWek=" /> <add key="LoginInfo" value="wwF/xpBzWek=" />
<add key="LoginVerify" value="v86f5Q3Xa7U=" /> <add key="LoginVerify" value="v86f5Q3Xa7U=" />
<add key="UpdateTime" value="2021-10-13 10:13:09.320" /> <add key="UpdateTime" value="2021-10-29 17:01:19.230" />
</appSettings> </appSettings>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
......
...@@ -272,8 +272,15 @@ namespace Tools ...@@ -272,8 +272,15 @@ namespace Tools
//启动更新程序 //启动更新程序
Task.Run(() => new Process() { StartInfo = info }.Start()) Task.Run(() => new Process() { StartInfo = info }.Start())
.ContinueWith((x) => { .ContinueWith((x) => {
var date = Convert.ToDateTime(drv["UDate"]); if (x.IsCompleted && x.Exception == null)
Utils.AppSettings(APP.UPDATE_TIME, date.ToString("yyyy-MM-dd HH:mm:ss.fff")); {
var date = Convert.ToDateTime(drv["UDate"]);
Utils.AppSettings(APP.UPDATE_TIME, date.ToString("yyyy-MM-dd HH:mm:ss.fff"));
}
else
{
Utils.Tip(x.Exception.Message);
}
}); });
//退出运行环境 //退出运行环境
Application.Exit(); Application.Exit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment