void ve_RetrievedVersion(object sender, PublishedVersionExtractor.PackageVersion version) { try { if (version.Version != null) { string currentVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); if (PublishedVersionExtractor.IsUpdateNeeded(currentVersion, version.Version)) { if (MessageBox.Show("New version of dnGREP (" + version.Version + ") is available for download.\nWould you like to download it now?", "New version", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information) == DialogResult.Yes) { System.Diagnostics.Process.Start("http://dngrep.github.io/"); } } } } catch (Exception ex) { logger.LogException(LogLevel.Error, ex.Message, ex); } }
public void CompareVersions(string v1, string v2, bool result) { Assert.True(PublishedVersionExtractor.IsUpdateNeeded(v1, v2) == result); }