Пример #1
0
 private void OnDownloadPatchUpdate(FSMState currentState)
 {
     if (this.Downloading)
     {
         long   currentFilesSize = this.UpdateInfo.GetCurrentFilesSize();
         double num = (double)currentFilesSize / (double)this.UpdateInfo.DownloadAmmount;
         PreloadingUIView.SetProgressInSmooth((float)num);
     }
 }
Пример #2
0
 private void DownloadPackageUpdate(int current, int max, string filePath)
 {
     if (current <= max)
     {
         float  progressInSmooth = (float)current / (float)max;
         string progressName     = string.Format("正在下载更新文件 :{0}/{1}MB", this.GetSizeString((long)current), this.GetSizeString((long)max));
         PreloadingUIView.SetProgressName(progressName);
         PreloadingUIView.SetProgressInSmooth(progressInSmooth);
     }
 }
Пример #3
0
 private void InstallByApkPatchUpdate()
 {
     if (this.MergeFile != null)
     {
         this.MergeFile.Refresh();
         if (this.MergeFile.get_Exists())
         {
             PreloadingUIView.SetProgressInSmooth((float)this.MergeFile.get_Length() / (float)this.UpdateInfo.CurrentApkInfo.ApkFileInfo.FileSize);
         }
     }
 }
Пример #4
0
 private void UpdateProgress()
 {
     if (this.IsProgressChange)
     {
         float num = 0f;
         for (int i = 0; i < this.LoadProgressWeight.Length; i++)
         {
             num += this.LoadProgressWeight[i] * this.LoadProgress[i];
         }
         PreloadingUIView.SetProgressInSmooth(num);
         this.IsProgressChange = false;
     }
 }
Пример #5
0
    private void UnZipUpdate()
    {
        float progressInSmooth = (float)UnZipFile.Instance.UnzipFileCount / (float)UnZipFile.Instance.WaitUnZipFiles;

        PreloadingUIView.SetProgressInSmooth(progressInSmooth);
    }