Ejemplo n.º 1
0
 public void CompareFiles()
 {
     foreach (ManagedFile patchFile in PatchFiles)
     {
         string fullpath = CurrentProfile.ClientFolder + patchFile.Basepath + patchFile.Filename;
         FileScanned(this, new ScanEventArgs(patchFile.Filename)); //Tells the form to update the progress bar
         var localFile = new ManagedFile(fullpath);
         localFile.ComputeHash();
         if (patchFile.MyHash != localFile.MyHash)
         {
             downloadFiles.Add(localFile);
             localFile.Length = patchFile.Length;
         }
     }
 }
Ejemplo n.º 2
0
        public void ScanClient()
        {
            string fullpath;

            if (IsNewClient())
            {
                CreateNewClient();
            }

            foreach (ManagedFile patchFile in PatchFiles)
            {
                fullpath = CurrentProfile.ClientFolder + patchFile.Basepath + patchFile.Filename;
                FileScanned(this, new ScanEventArgs(patchFile.Filename)); //Tells the form to update the progress bar
                ManagedFile localFile = new ManagedFile(fullpath);
                localFile.ComputeHash();
                if (patchFile.MyHash != localFile.MyHash)
                {
                    LocalFiles.Add(localFile);
                    localFile.Length = patchFile.Length;
                    _patchTotalSize += patchFile.Length;
                }
            }
        }