Exemplo n.º 1
0
        private void SetRemoteInfo(string text)
        {
            RemoteInfo = new AddonInfo(LocalInfo.Url, text);
            RemoteInfo.FetchRemoteData();

            Logger.Log("LocalInfo.Url: " + LocalInfo.Url + ",   www.text: " + text);
#if true
            if (LocalInfo.Version == RemoteInfo.Version)
            {
                Logger.Log("Identical remote version found: Using remote version information only.");
                Logger.Log(RemoteInfo);
                Logger.Blank();
                LocalInfo = RemoteInfo;
            }
            else
#endif
            {
                Logger.Log(LocalInfo);
                Logger.Log(RemoteInfo + "\n\tUpdateAvailable: " + IsUpdateAvailable);
                Logger.Blank();
            }

            IsRemoteReady        = true;
            IsProcessingComplete = true;
        }
Exemplo n.º 2
0
        private void FetchLocalInfo(string path)
        {
            using (var stream = new StreamReader(File.OpenRead(path)))
            {
                LocalInfo    = new AddonInfo(path, stream.ReadToEnd());
                IsLocalReady = true;

                if (LocalInfo.ParseError)
                {
                    SetHasError();
                }
            }
        }
 public GitHubInfo(object obj, AddonInfo addonInfo)
 {
     this.addonInfo = addonInfo;
     ParseJson(obj);
 }
 public GitHubInfo(object obj, AddonInfo addonInfo)
 {
     this.addonInfo = addonInfo;
     this.ParseJson(obj);
 }