怎么做跑腿网站,广东哪家网站建,建网页软件,工商注册地址查询系统写在前面
开发桌面应用程序的时候#xff0c;经常会因为新增功能需求或修复已知问题#xff0c;要求客户更新应用程序#xff0c;为了更好的服务客户#xff0c;通常会在程序启动时判断版本变更情况#xff0c;如发现新版本则自动弹出更新对话框#xff0c;提醒客户更新…写在前面
开发桌面应用程序的时候经常会因为新增功能需求或修复已知问题要求客户更新应用程序为了更好的服务客户通常会在程序启动时判断版本变更情况如发现新版本则自动弹出更新对话框提醒客户更新成最新版本。在.Net体系中采用 AutoUpdater.NET 组件可以非常便捷的实现这一功能。
老规矩从NuGet获取 AutoUpdater.NET 组件 参考官方示例
代码实现
新建WinForm示例程序主要代码如下
namespace AutoUpdaterWinFormsApp
{using AutoUpdaterDotNET;public partial class Form1 : Form{public Form1(){InitializeComponent();}private void Form1_Load(object sender, EventArgs e){AutoUpdater.InstalledVersion new Version(1.2);System.Timers.Timer timer new System.Timers.Timer{Interval 1 * 30 * 1000,SynchronizingObject this};timer.Elapsed delegate{AutoUpdater.Start(https://rbsoft.org/updates/AutoUpdaterTest.xml);};timer.Start();}}
}xml配置:
?xml version1.0 encodingUTF-8?
itemversion2.0.0.0/versionurlhttps://rbsoft.org/downloads/AutoUpdaterTest.zip/urlchangeloghttps://github.com/ravibpatel/AutoUpdater.NET/releases/changelogmandatoryfalse/mandatory
/item
调用示例