private void CheckLength(PerformanceType performanceType) { switch (performanceType) { case PerformanceType.FrameRate: if (FramePoints.Count > AmountOfShownPoints) { FramePoints.RemoveAt(0); } RaisePropertyChanged("FramePoints"); break; case PerformanceType.CPU_Usage: if (CpuPoints.Count > AmountOfShownPoints) { CpuPoints.RemoveAt(0); } RaisePropertyChanged("CpuPoints"); break; case PerformanceType.RAM_Usage: if (RamPoints.Count > AmountOfShownPoints) { RamPoints.RemoveAt(0); } RaisePropertyChanged("RamPoints"); break; } }
public void ClearPoints(PerformanceType performanceType) { switch (performanceType) { case PerformanceType.FrameRate: FramePoints.Clear(); _frameIndex = 0; break; case PerformanceType.CPU_Usage: CpuPoints.Clear(); _cpuIndex = 0; break; case PerformanceType.RAM_Usage: RamPoints.Clear(); _ramIndex = 0; break; } CheckLength(performanceType); }
public void AddPoint(double value, PerformanceType performanceType) { switch (performanceType) { case PerformanceType.FrameRate: FramePoints.Add(new DataPoint(_frameIndex, value)); _frameIndex++; break; case PerformanceType.CPU_Usage: CpuPoints.Add(new DataPoint(_cpuIndex, value)); _cpuIndex++; break; case PerformanceType.RAM_Usage: RamPoints.Add(new DataPoint(_ramIndex, value)); _ramIndex++; break; } CheckLength(performanceType); }
public abstract bool CanCalculate(FramePoints frame);
public override bool CanCalculate(FramePoints frame) => true;
public override bool CanCalculate(FramePoints frame) => frame.FirstRun == AllSkittles;
private bool IsStrike(FramePoints nextFrame) => CanCalculate(nextFrame);