Core - Flattened namespaces

Shared UI - Flattened namespaces
Shared UI - General housekeeping
Project - Code cleanup
This commit is contained in:
SpoinkyNL committed 2020-09-01 00:14:08 +02:00
1 parent 029e39ec1d
commit 8718d01eae
454 files changed
+1678 -1938

No files matched your search

@@ -1,5 +1,5 @@
using System.Threading.Tasks;
using Artemis.UI.Shared.Services.Dialog;
using Artemis.UI.Shared.Services;
using Stylet;
namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
@@ -13,19 +13,19 @@
<TextBlock Text="{Binding Title}" Style="{StaticResource MaterialDesignHeadline6TextBlock}" />
<TextBlock Text="Note: These are not being validated yet" Style="{StaticResource MaterialDesignSubtitle1TextBlock}" />
<TextBox materialDesign:HintAssist.Hint="X-coordinate"
Text="{Binding X, UpdateSourceTrigger=PropertyChanged}"
<TextBox materialDesign:HintAssist.Hint="X-coordinate"
Text="{Binding X, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Margin="0 10" />
<TextBox materialDesign:HintAssist.Hint="Y-coordinate"
<TextBox materialDesign:HintAssist.Hint="Y-coordinate"
Text="{Binding Y, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Margin="0 10" />
<TextBox materialDesign:HintAssist.Hint="Scale"
Text="{Binding Scale, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Margin="0 10" />
<TextBox materialDesign:HintAssist.Hint="Rotation"
Text="{Binding Rotation, UpdateSourceTrigger=PropertyChanged}"
<TextBox materialDesign:HintAssist.Hint="Scale"
Text="{Binding Scale, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Margin="0 10" />
<TextBox materialDesign:HintAssist.Hint="Rotation"
Text="{Binding Rotation, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Margin="0 10" />
@@ -1,7 +1,7 @@
using System.Threading.Tasks;
using Artemis.Core.Services.Interfaces;
using Artemis.Core.Services;
using Artemis.UI.Screens.SurfaceEditor.Visualization;
using Artemis.UI.Shared.Services.Dialog;
using Artemis.UI.Shared.Services;
using Stylet;
namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
@@ -9,11 +9,11 @@ namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
public class SurfaceDeviceConfigViewModel : DialogViewModelBase
{
private readonly ICoreService _coreService;
private int _rotation;
private double _scale;
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)
@@ -5,8 +5,9 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:models="clr-namespace:Artemis.Core.Models.Surface;assembly=Artemis.Core"
xmlns:Converters="clr-namespace:Artemis.UI.Converters" x:Class="Artemis.UI.Screens.SurfaceEditor.SurfaceEditorView"
xmlns:Converters="clr-namespace:Artemis.UI.Converters"
xmlns:models="clr-namespace:Artemis.Core;assembly=Artemis.Core"
x:Class="Artemis.UI.Screens.SurfaceEditor.SurfaceEditorView"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="600">
<UserControl.Resources>
@@ -7,15 +7,12 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using Artemis.Core.Models.Surface;
using Artemis.Core.Plugins.Settings;
using Artemis.Core;
using Artemis.Core.Services;
using Artemis.Core.Services.Interfaces;
using Artemis.Core.Services.Storage.Interfaces;
using Artemis.UI.Screens.Shared;
using Artemis.UI.Screens.SurfaceEditor.Dialogs;
using Artemis.UI.Screens.SurfaceEditor.Visualization;
using Artemis.UI.Shared.Services.Interfaces;
using Artemis.UI.Shared.Services;
using Stylet;
namespace Artemis.UI.Screens.SurfaceEditor
@@ -27,13 +24,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;
private ObservableCollection<SurfaceDeviceViewModel> _devices;
private PanZoomViewModel _panZoomViewModel;
private ArtemisSurface _selectedSurface;
private RectangleGeometry _selectionRectangle;
private ObservableCollection<ArtemisSurface> _surfaceConfigurations;
private PluginSetting<GridLength> _surfaceListWidth;
public SurfaceEditorViewModel(IRgbService rgbService, ISurfaceService surfaceService, IDialogService dialogService, ISettingsService settingsService,
IDeviceService deviceService)
@@ -4,10 +4,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:converters="clr-namespace:Artemis.UI.Converters"
xmlns:surfaceEditor="clr-namespace:Artemis.UI.Screens.SurfaceEditor.Visualization"
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance {x:Type surfaceEditor:SurfaceDeviceViewModel}}"
d:DesignHeight="450" d:DesignWidth="800"
@@ -16,13 +15,12 @@
MouseLeave="{s:Action MouseLeave}"
ToolTip="{Binding Device.RgbDevice.DeviceInfo.DeviceName}">
<UserControl.Resources>
<converters:NullToImageConverter x:Key="NullToImageConverter" />
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
</UserControl.Resources>
<Grid>
<!-- Content -->
<Grid>
<controls:DeviceVisualizer Device="{Binding Device}" VerticalAlignment="Top" HorizontalAlignment="Left"/>
<shared:DeviceVisualizer Device="{Binding Device}" VerticalAlignment="Top" HorizontalAlignment="Left" />
<Rectangle Fill="{DynamicResource MaterialDesignCardBackground}"
Stroke="{DynamicResource MaterialDesignTextBoxBorder}"
@@ -1,18 +1,18 @@
using System;
using System.Windows;
using System.Windows.Input;
using Artemis.Core.Models.Surface;
using Artemis.Core;
using Stylet;
namespace Artemis.UI.Screens.SurfaceEditor.Visualization
{
public class SurfaceDeviceViewModel : PropertyChangedBase
{
private Cursor _cursor;
private ArtemisDevice _device;
private double _dragOffsetX;
private double _dragOffsetY;
private ArtemisDevice _device;
private SelectionStatus _selectionStatus;
private Cursor _cursor;
public SurfaceDeviceViewModel(ArtemisDevice device)
{