Пример #1
0
        public void AbsorbStatus(CPUStatus cpu)
        {
            bool starting = cpu.IsWorking && ((!Status?.IsWorking) ?? true);

            Status = cpu;
            if (starting)
            {
                StartTime = DateTime.Now;
            }
        }
Пример #2
0
        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;
        }
Пример #3
0
        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
                };
            }
        }
Пример #4
0
 public CPUDisplayVM(CPUStatus cpu)
 {
     AbsorbStatus(cpu);
 }