Beispiel #1
0
        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();
        }
Beispiel #2
0
 public UpdateForm(AutoUpdater autoUpdater)
 {
     this.autoUpdater = autoUpdater;
     InitializeComponent();
 }