private void update(IValueMax vm, ProgressBar pb, string ttt, string suffix = null) { if (vm is null) { return; } if (vm.Max != pb.Maximum) { pb.Maximum = vm.Max; } int val = Math.Min(vm.Value, pb.Maximum); pb.Value = val; if (_tt is null || ttt is null) { return; } var caption = $"{ttt} : {val}{suffix}"; _tt.SetToolTip(pb, caption); }
public PerfCallback(IValueMax processes, IValueMax loadPercent) { Processes = processes; LoadPercent = loadPercent; }