mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Code style - Omit the type in a new expressions
This commit is contained in:
1 parent
099f56f4fe
commit
10e6cdc54b
117 files changed
+251
-252
No files matched your search
@@ -49,7 +49,7 @@ namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
|
||||
if (!_displayOnDevices)
|
||||
return;
|
||||
|
||||
using SKPaint overlayPaint = new SKPaint
|
||||
using SKPaint overlayPaint = new()
|
||||
{
|
||||
Color = CurrentColor
|
||||
};
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
lock (Devices)
|
||||
{
|
||||
List<SurfaceDeviceViewModel> existing = Devices.ToList();
|
||||
List<SurfaceDeviceViewModel> deviceViewModels = new List<SurfaceDeviceViewModel>();
|
||||
List<SurfaceDeviceViewModel> deviceViewModels = new();
|
||||
|
||||
// Add missing/update existing
|
||||
foreach (ArtemisDevice surfaceDeviceConfiguration in SelectedSurface.Devices.OrderBy(d => d.ZIndex).ToList())
|
||||
@@ -367,7 +367,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
private void StartMouseDrag(object sender, Point position, Point relative)
|
||||
{
|
||||
// If drag started on top of a device, initialise dragging
|
||||
RectangleGeometry selectedRect = new RectangleGeometry(new Rect(position, new Size(1, 1)));
|
||||
RectangleGeometry selectedRect = new(new Rect(position, new Size(1, 1)));
|
||||
SurfaceDeviceViewModel device = HitTestUtilities.GetHitViewModels<SurfaceDeviceViewModel>((Visual) sender, selectedRect).FirstOrDefault();
|
||||
if (device != null)
|
||||
{
|
||||
@@ -401,7 +401,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
{
|
||||
if (_mouseDragStatus != MouseDragStatus.Dragging)
|
||||
{
|
||||
RectangleGeometry selectedRect = new RectangleGeometry(new Rect(_mouseDragStartPoint, position));
|
||||
RectangleGeometry selectedRect = new(new Rect(_mouseDragStartPoint, position));
|
||||
List<SurfaceDeviceViewModel> devices = HitTestUtilities.GetHitViewModels<SurfaceDeviceViewModel>((Visual) sender, selectedRect);
|
||||
foreach (SurfaceDeviceViewModel device in Devices)
|
||||
if (devices.Contains(device))
|
||||
@@ -421,7 +421,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
|
||||
if (IsPanKeyDown())
|
||||
return;
|
||||
|
||||
Rect selectedRect = new Rect(_mouseDragStartPoint, position);
|
||||
Rect selectedRect = new(_mouseDragStartPoint, position);
|
||||
SelectionRectangle.Rect = selectedRect;
|
||||
|
||||
List<SurfaceDeviceViewModel> devices = HitTestUtilities.GetHitViewModels<SurfaceDeviceViewModel>((Visual) sender, SelectionRectangle);
|
||||
|
||||
Reference in new issue
Block a user