/// <summary> /// Get the latest product version from server, return download url /// if newer version found</summary> private void DoCheck() { try { if (ms_checkInProgress) { return; } ms_checkInProgress = true; var checker = new VersionCheckerService(); object[] versionInfo = checker.getLatestVersionInfo(m_appMappingName); string strServerVersion = ((string)versionInfo[0]).Trim(); string[] arrStr = strServerVersion.Split(' '); ServerVersion = new Version(arrStr[arrStr.Length - 1]); string url = null; if (ServerVersion > AppVersion) { url = ((string)versionInfo[2]).Trim(); } NotifyClients(url, false); } catch (Exception e) { NotifyClients("Version check failed.\nError: " + e.Message, true); } finally { ms_checkInProgress = false; } }
/// <summary> /// Get the latest product version from server, return download url /// if newer version found</summary> private void DoCheck() { try { if (ms_checkInProgress) return; ms_checkInProgress = true; var checker = new VersionCheckerService(); object[] versionInfo = checker.getLatestVersionInfo(m_appMappingName); string strServerVersion = ((string)versionInfo[0]).Trim(); string[] arrStr = strServerVersion.Split(' '); ServerVersion = new Version(arrStr[arrStr.Length - 1]); string url = null; if (ServerVersion > AppVersion) { url = ((string)versionInfo[2]).Trim(); } NotifyClients(url, false); } catch (Exception e) { NotifyClients("Version check failed.\nError: " + e.Message, true); } finally { ms_checkInProgress = false; } }