private void UpdateTag() { UnZipFile(); string localTagPath = URLFactory.GetLocalGameTagPath(CurDownLoadFileInfo); StreamWriter streamWriter = new StreamWriter(localTagPath); streamWriter.WriteLine(CurDownLoadFileInfo.version); streamWriter.Close(); }
public static GameVersionState CheckOnceFileInfo(DownLoadFileInfo info) { int gameServerVersion = info.version; string localTagPath = URLFactory.GetLocalGameTagPath(info); if (File.Exists(localTagPath)) { StreamReader streamReader = new StreamReader(localTagPath); string versionStr = streamReader.ReadToEnd(); streamReader.Close(); int versioni; if (int.TryParse(versionStr, out versioni)) { if (versioni >= gameServerVersion) { return(GameVersionState.NewestVersion); } return(GameVersionState.OldVersion); } } return(GameVersionState.UnLoad); }