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); } }
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); } }
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); } } }
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; } }
private void UnZipUpdate() { float progressInSmooth = (float)UnZipFile.Instance.UnzipFileCount / (float)UnZipFile.Instance.WaitUnZipFiles; PreloadingUIView.SetProgressInSmooth(progressInSmooth); }