public static void OnVersionUpdate(string version) { // update version if (OnlineVersion != version) { OnlineVersion = version; } if (OnlineVersion == null) { return; } // check if the online version is greater than current var programVersion = new Version(Application.ProductVersion); var onlineVersion = new Version(OnlineVersion); var ret = programVersion.CompareTo(onlineVersion); // not sure why BetaAlphaPostfixString is being checked if (ret < 0 || (ret == 0 && BetaAlphaPostfixString != "")) { var displayNewVer = string.Format(Translations.Tr("IMPORTANT! New version v{0} has\r\nbeen released. Click here to download it."), version); // display new version // notify all components DisplayVersion?.Invoke(null, displayNewVer); } }
public override int GetHashCode() { return(DisplayName.GetHashCode() & DisplayVersion.GetHashCode() & UninstallString.to_string().GetHashCode() & KeyPath.GetHashCode()); }
public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hash = 17; // Suitable nullity checks etc, of course :) hash = hash * 23 + DisplayName.GetHashCode(); hash = hash * 23 + Publisher.GetHashCode(); hash = hash * 23 + DisplayVersion.GetHashCode(); return(hash); } }
bool IEquatable <RegistryApplicationKey> .Equals(RegistryApplicationKey other) { if (ReferenceEquals(other, null)) { return(false); } return(DisplayName.to_string().is_equal_to(other.DisplayName) && DisplayVersion.is_equal_to(other.DisplayVersion) && UninstallString.to_string().is_equal_to(other.UninstallString.to_string()) && KeyPath.is_equal_to(other.KeyPath) ); }