Пример #1
0
        private async void UI_Shown(object sender, EventArgs e)
        {
            UI.Shown -= UI_Shown;

            GitRelease latestRelease =
                await TanjiRepo.GetLatestReleaseAsync();

            if (latestRelease != null)
            {
                LatestVersion = new Version(
                    latestRelease.TagName.Substring(1));

                UI.TanjiVersionTxt.IsLink = true;

                if (LatestVersion > LocalVersion &&
                    !latestRelease.IsPrerelease)
                {
                    UI.TanjiVersionTxt.Text = "Update Found!";
                }
            }
        }
Пример #2
0
        private async void UI_Shown(object sender, EventArgs e)
        {
            UI.Shown -= UI_Shown;
            await Task.Delay(225);

            GitRelease latestRelease =
                await TanjiRepo.GetLatestReleaseAsync();

            if (latestRelease != null)
            {
                LatestVersion = new Version(
                    latestRelease.TagName.Substring(1));

                UI.TanjiVersionTxt.IsLink = true;

                if (LatestVersion > LocalVersion &&
                    !latestRelease.IsPrerelease)
                {
                    UI.TanjiInfoTxt.Spring  = true;
                    UI.TanjiInfoTxt.Text    = "Source Code";
                    UI.TanjiVersionTxt.Text = "Update Available!";
                }
            }
        }