mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +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
@@ -6,11 +6,17 @@ namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
|
||||
{
|
||||
public class SurfaceCreateViewModel : DialogViewModelBase
|
||||
{
|
||||
private string _surfaceName;
|
||||
|
||||
public SurfaceCreateViewModel(IModelValidator<SurfaceCreateViewModel> validator) : base(validator)
|
||||
{
|
||||
}
|
||||
|
||||
public string SurfaceName { get; set; }
|
||||
public string SurfaceName
|
||||
{
|
||||
get => _surfaceName;
|
||||
set => SetAndNotify(ref _surfaceName, value);
|
||||
}
|
||||
|
||||
public async Task Accept()
|
||||
{
|
||||
|
||||
@@ -9,6 +9,11 @@ namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
|
||||
public class SurfaceDeviceConfigViewModel : DialogViewModelBase
|
||||
{
|
||||
private readonly ICoreService _coreService;
|
||||
private string _title;
|
||||
private int _x;
|
||||
private int _y;
|
||||
private double _scale;
|
||||
private int _rotation;
|
||||
|
||||
public SurfaceDeviceConfigViewModel(SurfaceDeviceViewModel surfaceDeviceViewModel, ICoreService coreService, IModelValidator<SurfaceDeviceConfigViewModel> validator)
|
||||
: base(validator)
|
||||
@@ -24,12 +29,36 @@ namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
|
||||
}
|
||||
|
||||
public SurfaceDeviceViewModel SurfaceDeviceViewModel { get; }
|
||||
public string Title { get; set; }
|
||||
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
public double Scale { get; set; }
|
||||
public int Rotation { get; set; }
|
||||
public string Title
|
||||
{
|
||||
get => _title;
|
||||
set => SetAndNotify(ref _title, value);
|
||||
}
|
||||
|
||||
public int X
|
||||
{
|
||||
get => _x;
|
||||
set => SetAndNotify(ref _x, value);
|
||||
}
|
||||
|
||||
public int Y
|
||||
{
|
||||
get => _y;
|
||||
set => SetAndNotify(ref _y, value);
|
||||
}
|
||||
|
||||
public double Scale
|
||||
{
|
||||
get => _scale;
|
||||
set => SetAndNotify(ref _scale, value);
|
||||
}
|
||||
|
||||
public int Rotation
|
||||
{
|
||||
get => _rotation;
|
||||
set => SetAndNotify(ref _rotation, value);
|
||||
}
|
||||
|
||||
public async Task Accept()
|
||||
{
|
||||
|
||||
@@ -27,6 +27,13 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
private readonly IRgbService _rgbService;
|
||||
private readonly ISettingsService _settingsService;
|
||||
private readonly ISurfaceService _surfaceService;
|
||||
private ArtemisSurface _selectedSurface;
|
||||
private ObservableCollection<SurfaceDeviceViewModel> _devices;
|
||||
private ObservableCollection<ArtemisSurface> _surfaceConfigurations;
|
||||
private RectangleGeometry _selectionRectangle;
|
||||
private PanZoomViewModel _panZoomViewModel;
|
||||
private PluginSetting<GridLength> _surfaceListWidth;
|
||||
private Cursor _cursor;
|
||||
|
||||
public SurfaceEditorViewModel(IRgbService rgbService, ISurfaceService surfaceService, IDialogService dialogService, ISettingsService settingsService,
|
||||
IDeviceService deviceService)
|
||||
@@ -46,12 +53,41 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
_deviceService = deviceService;
|
||||
}
|
||||
|
||||
public ObservableCollection<SurfaceDeviceViewModel> Devices { get; set; }
|
||||
public ObservableCollection<ArtemisSurface> SurfaceConfigurations { get; set; }
|
||||
public RectangleGeometry SelectionRectangle { get; set; }
|
||||
public PanZoomViewModel PanZoomViewModel { get; set; }
|
||||
public PluginSetting<GridLength> SurfaceListWidth { get; set; }
|
||||
public Cursor Cursor { get; set; }
|
||||
public ObservableCollection<SurfaceDeviceViewModel> Devices
|
||||
{
|
||||
get => _devices;
|
||||
set => SetAndNotify(ref _devices, value);
|
||||
}
|
||||
|
||||
public ObservableCollection<ArtemisSurface> SurfaceConfigurations
|
||||
{
|
||||
get => _surfaceConfigurations;
|
||||
set => SetAndNotify(ref _surfaceConfigurations, value);
|
||||
}
|
||||
|
||||
public RectangleGeometry SelectionRectangle
|
||||
{
|
||||
get => _selectionRectangle;
|
||||
set => SetAndNotify(ref _selectionRectangle, value);
|
||||
}
|
||||
|
||||
public PanZoomViewModel PanZoomViewModel
|
||||
{
|
||||
get => _panZoomViewModel;
|
||||
set => SetAndNotify(ref _panZoomViewModel, value);
|
||||
}
|
||||
|
||||
public PluginSetting<GridLength> SurfaceListWidth
|
||||
{
|
||||
get => _surfaceListWidth;
|
||||
set => SetAndNotify(ref _surfaceListWidth, value);
|
||||
}
|
||||
|
||||
public Cursor Cursor
|
||||
{
|
||||
get => _cursor;
|
||||
set => SetAndNotify(ref _cursor, value);
|
||||
}
|
||||
|
||||
public ArtemisSurface SelectedSurface
|
||||
{
|
||||
@@ -61,7 +97,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
if (value == null)
|
||||
return;
|
||||
|
||||
_selectedSurface = value;
|
||||
SetAndNotify(ref _selectedSurface, value);
|
||||
ApplySelectedSurfaceConfiguration();
|
||||
}
|
||||
}
|
||||
@@ -260,7 +296,6 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
|
||||
private MouseDragStatus _mouseDragStatus;
|
||||
private Point _mouseDragStartPoint;
|
||||
private ArtemisSurface _selectedSurface;
|
||||
|
||||
// ReSharper disable once UnusedMember.Global - Called from view
|
||||
public void EditorGridMouseClick(object sender, MouseButtonEventArgs e)
|
||||
|
||||
@@ -10,15 +10,36 @@ namespace Artemis.UI.Screens.SurfaceEditor.Visualization
|
||||
{
|
||||
private double _dragOffsetX;
|
||||
private double _dragOffsetY;
|
||||
private ArtemisDevice _device;
|
||||
private SelectionStatus _selectionStatus;
|
||||
private Cursor _cursor;
|
||||
|
||||
public SurfaceDeviceViewModel(ArtemisDevice device)
|
||||
{
|
||||
Device = device;
|
||||
}
|
||||
|
||||
public ArtemisDevice Device { get; set; }
|
||||
public SelectionStatus SelectionStatus { get; set; }
|
||||
public Cursor Cursor { get; set; }
|
||||
public ArtemisDevice Device
|
||||
{
|
||||
get => _device;
|
||||
set
|
||||
{
|
||||
if (SetAndNotify(ref _device, value)) return;
|
||||
NotifyOfPropertyChange(nameof(DeviceRectangle));
|
||||
}
|
||||
}
|
||||
|
||||
public SelectionStatus SelectionStatus
|
||||
{
|
||||
get => _selectionStatus;
|
||||
set => SetAndNotify(ref _selectionStatus, value);
|
||||
}
|
||||
|
||||
public Cursor Cursor
|
||||
{
|
||||
get => _cursor;
|
||||
set => SetAndNotify(ref _cursor, value);
|
||||
}
|
||||
|
||||
public Rect DeviceRectangle => Device.RgbDevice == null
|
||||
? new Rect()
|
||||
|
||||
Reference in new issue
Block a user