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