public void AddValue(int value, PerformanceType performanceType) { switch (performanceType) { case PerformanceType.FrameRate: if (value >= 1000) { HighFrameRateOverlay.Visibility = Visibility.Visible; FrameRatePlot.Visibility = Visibility.Hidden; } else { HighFrameRateOverlay.Visibility = Visibility.Hidden; FrameRatePlot.Visibility = Visibility.Visible; } graphViewModel.AddPoint(value, performanceType); if (graphViewModel.FramePoints.Count > 10) { graphViewModel.FramePoints.RemoveAt(0); } FrameRateCheckBox.Content = $"Frame rate ({value})"; break; case PerformanceType.CPU_Usage: graphViewModel.AddPoint(value, performanceType); if (graphViewModel.CpuPoints.Count > 10) { graphViewModel.CpuPoints.RemoveAt(0); } CpuCheckBox.Content = $"CPU Usage ( {value}% )"; break; case PerformanceType.RAM_Usage: graphViewModel.AddPoint(value, performanceType); if (graphViewModel.RamPoints.Count > 10) { graphViewModel.RamPoints.RemoveAt(0); } RamCheckBox.Content = $"RAM Usage ({value}MB)"; break; } }