Beispiel #1
0
        private void _downloadPatchComplete(object sender)
        {
            var patchVerified = true;

            if (_fileChecking)
            {
                var stack = new Stack <Patch>();
                stack.Push(FindPatch(_currentPatch.Version));
                var fc             = new FileChecker(stack);
                var corruptedFiles = fc.GetCorruptedFiles();
                patchVerified       = corruptedFiles.Count == 0;
                _currentPatch.Files = new Queue <DownloadFile>(corruptedFiles);
            }

            if (patchVerified)
            {
                _currentPatchIndex++;
                XmlLocal.SelectSingleNode("/updater/version").InnerText = _currentPatch.Version;
                XmlLocal.Save(_localManifest);
            }
            OnPatchProgress?.Invoke(this, 0);
            _downloadNextPatch(!patchVerified);
        }
Beispiel #2
0
 private void _downloadPatchProgress(object sender, int progress)
 {
     OnPatchProgress?.Invoke(this, progress);
 }