Beispiel #1
0
        public static bool CheckVersionBot()
        {
            const string remoteUri = "http://patcher.gw2.mmominion.com/Gw2MinionFiles/";
            const string fileName  = "GameVersion.txt";

            try
            {
                var myWebClient = new WebClient
                {
                    Proxy       = null,
                    CachePolicy =
                        new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore)
                };
                uint minionVersion = Convert.ToUInt32(myWebClient.DownloadString(remoteUri + fileName));
                uint apiVer        = GW2MinionLauncher.BuildNumberFromApi();
                if (minionVersion != apiVer)
                {
                    return(false);
                }
                return(true);
            }
            catch
            {
                return(true);
            }
        }
 public InstanceThread()
 {
     _instanceThread = new Thread(DoWork)
     {
         IsBackground = true,
     };
     _delay                 = 0;
     _needDelay             = false;
     _isRunning             = false;
     _keepAlive             = false;
     _enableViewStateChecks = true;
     try
     {
         _buildNumber = GW2MinionLauncher.BuildNumberFromApi();
     }
     catch
     {
         _buildNumber = 0;
     }
 }