Example #1
0
        private async Task AlertIfNewVersionAvailable()
        {
            string       currentVersion   = "2.2.14.0";
            VersionCheck versionCheck     = new VersionCheck(this.LogProvider);
            string       newVersionNumber = await versionCheck.GetAvailableVersion("https://api.migaz.tools/v1/version/AWStoARM", currentVersion);

            if (versionCheck.IsVersionNewer(currentVersion, newVersionNumber))
            {
                DialogResult dialogresult = MessageBox.Show("New version " + newVersionNumber + " is available at http://aka.ms/MigAz", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Example #2
0
        private async Task AlertIfNewVersionAvailable()
        {
            string       currentVersion   = "2.4.4.0";
            VersionCheck versionCheck     = new VersionCheck(this.LogProvider);
            string       newVersionNumber = await versionCheck.GetAvailableVersion("https://migaz.azurewebsites.net/api/v2", currentVersion);

            if (versionCheck.IsVersionNewer(currentVersion, newVersionNumber))
            {
                NewVersionAvailableDialog newVersionDialog = new NewVersionAvailableDialog();
                newVersionDialog.Bind(currentVersion, newVersionNumber);
                newVersionDialog.ShowDialog();
            }
        }