mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
UI - Removed Fody, begone arrogant devs!
This commit is contained in:
1 parent
8e01d1f63e
commit
2c2b0ca3e1
49 files changed
+1011
-232
No files matched your search
@@ -16,6 +16,9 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
private readonly Timer _updateTimer;
|
||||
private bool _isModuleFilterEnabled;
|
||||
private Core.Plugins.Abstract.Module _selectedModule;
|
||||
private DataModelViewModel _mainDataModel;
|
||||
private string _propertySearch;
|
||||
private List<Core.Plugins.Abstract.Module> _modules;
|
||||
|
||||
public DataModelDebugViewModel(IDataModelVisualizationService dataModelVisualizationService, IPluginService pluginService)
|
||||
{
|
||||
@@ -27,17 +30,30 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
DisplayName = "Data model";
|
||||
}
|
||||
|
||||
public DataModelViewModel MainDataModel { get; set; }
|
||||
public DataModelViewModel MainDataModel
|
||||
{
|
||||
get => _mainDataModel;
|
||||
set => SetAndNotify(ref _mainDataModel, value);
|
||||
}
|
||||
|
||||
public string PropertySearch { get; set; }
|
||||
public List<Core.Plugins.Abstract.Module> Modules { get; set; }
|
||||
public string PropertySearch
|
||||
{
|
||||
get => _propertySearch;
|
||||
set => SetAndNotify(ref _propertySearch, value);
|
||||
}
|
||||
|
||||
public List<Core.Plugins.Abstract.Module> Modules
|
||||
{
|
||||
get => _modules;
|
||||
set => SetAndNotify(ref _modules, value);
|
||||
}
|
||||
|
||||
public Core.Plugins.Abstract.Module SelectedModule
|
||||
{
|
||||
get => _selectedModule;
|
||||
set
|
||||
{
|
||||
_selectedModule = value;
|
||||
if (!SetAndNotify(ref _selectedModule, value)) return;
|
||||
GetDataModel();
|
||||
}
|
||||
}
|
||||
@@ -47,8 +63,8 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
get => _isModuleFilterEnabled;
|
||||
set
|
||||
{
|
||||
_isModuleFilterEnabled = value;
|
||||
|
||||
SetAndNotify(ref _isModuleFilterEnabled, value);
|
||||
|
||||
if (!IsModuleFilterEnabled)
|
||||
SelectedModule = null;
|
||||
else
|
||||
@@ -75,8 +91,8 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
|
||||
private void GetDataModel()
|
||||
{
|
||||
MainDataModel = SelectedModule != null
|
||||
? _dataModelVisualizationService.GetPluginDataModelVisualization(SelectedModule)
|
||||
MainDataModel = SelectedModule != null
|
||||
? _dataModelVisualizationService.GetPluginDataModelVisualization(SelectedModule)
|
||||
: _dataModelVisualizationService.GetMainDataModelVisualization();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Artemis.Core.Events;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.Core.Services.Storage.Interfaces;
|
||||
using SkiaSharp;
|
||||
using SkiaSharp.Views.WPF;
|
||||
using Stylet;
|
||||
@@ -14,20 +13,26 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
public class RenderDebugViewModel : Screen
|
||||
{
|
||||
private readonly ICoreService _coreService;
|
||||
private readonly IRgbService _rgbService;
|
||||
private readonly ISurfaceService _surfaceService;
|
||||
private double _currentFps;
|
||||
private ImageSource _currentFrame;
|
||||
|
||||
public RenderDebugViewModel(ICoreService coreService, IRgbService rgbService, ISurfaceService surfaceService)
|
||||
public RenderDebugViewModel(ICoreService coreService)
|
||||
{
|
||||
_coreService = coreService;
|
||||
_rgbService = rgbService;
|
||||
_surfaceService = surfaceService;
|
||||
|
||||
DisplayName = "Rendering";
|
||||
}
|
||||
|
||||
public ImageSource CurrentFrame { get; set; }
|
||||
public double CurrentFps { get; set; }
|
||||
public ImageSource CurrentFrame
|
||||
{
|
||||
get => _currentFrame;
|
||||
set => SetAndNotify(ref _currentFrame, value);
|
||||
}
|
||||
|
||||
public double CurrentFps
|
||||
{
|
||||
get => _currentFps;
|
||||
set => SetAndNotify(ref _currentFps, value);
|
||||
}
|
||||
|
||||
protected override void OnActivate()
|
||||
{
|
||||
@@ -47,7 +52,7 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
|
||||
{
|
||||
Execute.PostToUIThread(() =>
|
||||
{
|
||||
if (e.BitmapBrush?.Bitmap == null)
|
||||
if (e.BitmapBrush?.Bitmap == null || e.BitmapBrush.Bitmap.Pixels.Length == 0)
|
||||
return;
|
||||
|
||||
if (!(CurrentFrame is WriteableBitmap writeableBitmap))
|
||||
|
||||
Reference in new issue
Block a user