mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Meta - Replace WPF projects with Avalonia projects
This commit is contained in:
1 parent
fcf0376a9a
commit
d7f3ee1190
1110 files changed
+10872
-52240
No files matched your search
@@ -0,0 +1,31 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using Artemis.Core;
|
||||
using Artemis.UI.Shared;
|
||||
|
||||
namespace Artemis.UI.Screens.Debugger.Performance
|
||||
{
|
||||
public class PerformanceDebugProfilerViewModel : ViewModelBase
|
||||
{
|
||||
public PerformanceDebugProfilerViewModel(Profiler profiler)
|
||||
{
|
||||
Profiler = profiler;
|
||||
}
|
||||
|
||||
public Profiler Profiler { get; }
|
||||
|
||||
public ObservableCollection<PerformanceDebugMeasurementViewModel> Measurements { get; } = new();
|
||||
|
||||
public void Update()
|
||||
{
|
||||
foreach ((string _, ProfilingMeasurement measurement) in Profiler.Measurements)
|
||||
{
|
||||
if (Measurements.All(m => m.Measurement != measurement))
|
||||
Measurements.Add(new PerformanceDebugMeasurementViewModel(measurement));
|
||||
}
|
||||
|
||||
foreach (PerformanceDebugMeasurementViewModel profilingMeasurementViewModel in Measurements)
|
||||
profilingMeasurementViewModel.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user