/// <summary> /// Check if there is a software update /// </summary> private void CheckForUpdates() { if (Properties.Settings.Default.CheckForUpdates == 1) { GitApiUpdateCheck g = new GitApiUpdateCheck(); bool newV; try { newV = g.checkForUpdate(Properties.Resources.Version); if (newV) { Debug.WriteLine("new Version detected"); UpdateOverlay uo = new UpdateOverlay(Properties.Resources.Version, g.latestVersion); uo.Location = new Point(0, 0); this.Invoke(new Action(() => { this.Controls.Add(uo); uo.BringToFront(); uo.downloadUrl = g.downloadUri; })); } } catch (Exception e) { Console.WriteLine(e.ToString()); Debug.WriteLine("update check failed"); } } }
public ProjectChangeSubscriberOverlayUpdater(UpdateOverlay showOverlayText) { ShowOverlayText = showOverlayText; }