C# 客户端程序自动更新
程序员文章站
2022-07-11 10:54:01
...
System.Timers.Timer timer = new System.Timers.Timer
{
// Interval = 2 * 60 * 1000,
Interval = 1000,
SynchronizingObject = this
};
AutoUpdater.DownloadPath = Environment.CurrentDirectory;
AutoUpdater.UpdateFormSize = new System.Drawing.Size(800, 600);
AutoUpdater.ShowUpdateForm();
timer.Elapsed += delegate
{
try
{
AutoUpdater.Start("http://192.168.5.158:8800/updates/AutoUpdater_PBL.xml");
}
catch (Exception e)
{
e.Error();
}
};
timer.Start();
{
// Interval = 2 * 60 * 1000,
Interval = 1000,
SynchronizingObject = this
};
AutoUpdater.DownloadPath = Environment.CurrentDirectory;
AutoUpdater.UpdateFormSize = new System.Drawing.Size(800, 600);
AutoUpdater.ShowUpdateForm();
timer.Elapsed += delegate
{
try
{
AutoUpdater.Start("http://192.168.5.158:8800/updates/AutoUpdater_PBL.xml");
}
catch (Exception e)
{
e.Error();
}
};
timer.Start();