Пример #1
0
        public String CheckUpdate(int GameID)
        {
            //checks for any available update.
            //returns the latest version number of available, or an empty string if no update is found.
            String CurrentVersion = getinstalledVersion(GameID);
            String newversion     = "";


            foreach (UpdateInfo loopinfo in LoadedUpdates)
            {
                if (loopinfo.dlID == GameID)
                {
                    newversion = loopinfo.UpdateVersion;
                    break;
                }
            }
            if (CurrentVersion != "" && newversion != "")
            {
                if (UpdateInfo.VersionsChanged(CurrentVersion, newversion) != 0)
                {
                    if (UpdateInfo.IsVersionNewer(CurrentVersion, newversion))
                    {
                        return(newversion);
                    }
                    else
                    {
                        return("");
                    }
                }
            }
            return("");
        }