Firstborn/Library/PackageCache/com.unity.collab-proxy@2.0.3/Editor/PlasticSCM/Developer/UpdateProgress.cs
Schaken-Mods 9092858a58 updated to the latest editor
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
2023-05-07 17:43:11 -05:00

48 lines
1.5 KiB
C#

using System;
using Codice.Client.BaseCommands;
using Codice.Client.Commands;
using PlasticGui.WorkspaceWindow;
using PlasticGui.WorkspaceWindow.Update;
namespace Unity.PlasticSCM.Editor.Developer
{
internal class UpdateProgress
{
internal UpdateProgress(
UpdateNotifier notifier, string wkPath, string title,
WorkspaceWindow workspaceWindow)
{
mNotifier = notifier;
mWkPath = wkPath;
mWorkspaceWindow = workspaceWindow;
mProgressData = new BuildProgressSpeedAndRemainingTime.ProgressData(DateTime.Now);
mWorkspaceWindow.Progress.ProgressHeader = title;
mWorkspaceWindow.Progress.CanCancelProgress = false;
}
internal void OnUpdateProgress()
{
var progress = mWorkspaceWindow.Progress;
progress.ProgressHeader = UpdateProgressRender.FixNotificationPath(
mWkPath, mNotifier.GetNotificationMessage());
UpdateOperationStatus status = mNotifier.GetUpdateStatus();
progress.TotalProgressMessage = UpdateProgressRender.GetProgressString(
status, mProgressData);
progress.TotalProgressPercent = GetProgressBarPercent.ForTransfer(
status.UpdatedSize, status.TotalSize) / 100f;
}
readonly BuildProgressSpeedAndRemainingTime.ProgressData mProgressData;
readonly WorkspaceWindow mWorkspaceWindow;
readonly string mWkPath;
readonly UpdateNotifier mNotifier;
}
}