2021-12-26 21:56:44 +00:00
|
|
|
|
using System;
|
|
|
|
|
using ReactiveUI.Fody.Helpers;
|
|
|
|
|
using Wabbajack.Lib;
|
2021-12-27 16:24:45 +00:00
|
|
|
|
using Wabbajack.RateLimiter;
|
2021-12-26 21:56:44 +00:00
|
|
|
|
|
|
|
|
|
namespace Wabbajack
|
|
|
|
|
{
|
|
|
|
|
public class CPUDisplayVM : ViewModel
|
|
|
|
|
{
|
|
|
|
|
[Reactive]
|
|
|
|
|
public int ID { get; set; }
|
|
|
|
|
[Reactive]
|
|
|
|
|
public DateTime StartTime { get; set; }
|
|
|
|
|
[Reactive]
|
|
|
|
|
public bool IsWorking { get; set; }
|
|
|
|
|
[Reactive]
|
|
|
|
|
public string Msg { get; set; }
|
|
|
|
|
[Reactive]
|
|
|
|
|
public Percent ProgressPercent { get; set; }
|
|
|
|
|
|
|
|
|
|
public CPUDisplayVM()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-27 16:24:45 +00:00
|
|
|
|
public CPUDisplayVM(IJob cpu)
|
2021-12-26 21:56:44 +00:00
|
|
|
|
{
|
|
|
|
|
AbsorbStatus(cpu);
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-27 16:24:45 +00:00
|
|
|
|
public void AbsorbStatus(IJob cpu)
|
2021-12-26 21:56:44 +00:00
|
|
|
|
{
|
2021-12-27 23:15:30 +00:00
|
|
|
|
/* TODO
|
2021-12-26 21:56:44 +00:00
|
|
|
|
bool starting = cpu.IsWorking && !IsWorking;
|
|
|
|
|
if (starting)
|
|
|
|
|
{
|
|
|
|
|
StartTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-27 16:24:45 +00:00
|
|
|
|
ID = cpu.;
|
2021-12-26 21:56:44 +00:00
|
|
|
|
Msg = cpu.Msg;
|
|
|
|
|
ProgressPercent = cpu.ProgressPercent;
|
|
|
|
|
IsWorking = cpu.IsWorking;
|
2021-12-27 23:15:30 +00:00
|
|
|
|
*/
|
2021-12-26 21:56:44 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|