예제 #1
0
        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;
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
 public abstract bool CanCalculate(FramePoints frame);
예제 #5
0
 public override bool CanCalculate(FramePoints frame) => true;
예제 #6
0
 public override bool CanCalculate(FramePoints frame) => frame.FirstRun == AllSkittles;
예제 #7
0
 private bool IsStrike(FramePoints nextFrame) => CanCalculate(nextFrame);