private async void CheckForUpdate()
        {
            var latest = await Github.CheckForUpdate("andburn", "hdt-plugin-endgame", Version);

            if (latest != null)
            {
                await ShowUpdateMessage(latest);

                Logger.WriteLine("Update available: " + latest.tag_name, "EndGame");
            }
        }
Exemplo n.º 2
0
        public async Task CheckForUpdate()
        {
            var latest = await Github.CheckForUpdate("andburn", "hdt-plugin-endgame", Version);

            if (latest != null)
            {
                EndGame.Notify("Plugin Update Available", $"[DOWNLOAD]({latest.html_url}) EndGame v{latest.tag_name}", 0,
                               "download", () => Process.Start(latest.html_url));
                Log.Info("Update available: v" + latest.tag_name, "EndGame");
            }
        }
Exemplo n.º 3
0
		private async Task ShowUpdateMessage(Github.GithubRelease release)
		{
			var settings = new MetroDialogSettings { AffirmativeButtonText = "Get Update", NegativeButtonText = "Close" };

			var result = await Helper.MainWindow.ShowMessageAsync("Update Available",
				"For Plugin: \"" + this.Name + "\"", MessageDialogStyle.AffirmativeAndNegative, settings);
			if(result == MessageDialogResult.Affirmative)
				Process.Start(release.html_url);
		}