internal static void CheckUpdate(bool checkSingleInstance) { var updater = new AutoUpdater(); updater.ConfigUrl = "http://last-horizonte.googlecode.com/files/UpdateVersion.xml?nocache=" + DateTime.UtcNow.ToString("yyyyMMddHHmmss"); updater.DownloadForm = new UpdateForm(updater); updater.OnAutoUpdateComplete += delegate { Thread.Sleep(5000); //Application.Restart(); }; updater.AutoRestart = true; if (checkSingleInstance) { updater.OnConfigFileDownloaded += delegate { //CheckSingleInstance(); }; } updater.TryUpdate(); }
public UpdateForm(AutoUpdater autoUpdater) { this.autoUpdater = autoUpdater; InitializeComponent(); }