public void AbsorbStatus(CPUStatus cpu) { bool starting = cpu.IsWorking && ((!Status?.IsWorking) ?? true); Status = cpu; if (starting) { StartTime = DateTime.Now; } }
public void AbsorbStatus(CPUStatus cpu) { bool starting = cpu.IsWorking && !IsWorking; if (starting) { StartTime = DateTime.Now; } ID = cpu.ID; Msg = cpu.Msg; ProgressPercent = cpu.ProgressPercent; IsWorking = cpu.IsWorking; }
public void SetProgress(int id, string msg, int progress) { lock (InternalStatus) { Dirty = true; while (id >= InternalStatus.Count) { InternalStatus.Add(new CPUStatus()); } InternalStatus[id] = new CPUStatus() { ID = id, Msg = msg, Progress = progress }; } }
public CPUDisplayVM(CPUStatus cpu) { AbsorbStatus(cpu); }