/// <summary> /// Sets progress values /// </summary> /// <param name="progress">Current progress</param> public void SetProgress(ProgressInfo progress) { if (progress.Done) { Close(); } else { FileInfo.SetText(string.Format(FILE_INFO_TEMPLATE, progress.Description)); FileProgress.SetProgress(progress); } }
/// <summary> /// Sets progress values /// </summary> /// <param name="itemProgress">Current progress</param> /// <param name="totalProgress">Total progress</param> public void SetProgress(ProgressInfo itemProgress, ProgressInfo totalProgress) { if (totalProgress.Done) { Close(); } else { FileSourceInfo.SetText(string.Format(FILE_INFO_TEMPLATE, itemProgress.Description)); FileProgress.SetProgress(itemProgress); TotalFilesCount.SetText("Files:" + $"{totalProgress.Count.ToString("#")}/{totalProgress.TotalCount.ToString("#")}".PadLeft(TotalFilesCount.Width - 6)); TotalBytesCount.SetText("Bytes:" + $"{totalProgress.Proceded.ToString("#")}/{totalProgress.Total.ToString("#")}".PadLeft(TotalBytesCount.Width - 6)); TotalProgress.SetProgress(totalProgress); } }