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

@@ -7,8 +7,8 @@
xmlns:s="https://github.com/canton7/Stylet"
xmlns:mde="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
xmlns:debug="clr-namespace:Artemis.UI.Screens.Settings.Debug"
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
xmlns:surface="clr-namespace:Artemis.Core.Models.Surface;assembly=Artemis.Core"
xmlns:core="clr-namespace:Artemis.Core;assembly=Artemis.Core"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
mc:Ignorable="d"
Title="Artemis device debugger"
TitleBarIcon="{StaticResource BowIcon}"
@@ -49,7 +49,7 @@
<Grid Margin="10, 10, 10, 10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -59,7 +59,7 @@
Please note that having this window open can have a performance impact on your system.
</TextBlock>
<controls:DeviceVisualizer Grid.Row="1" Device="{Binding Device}" HighlightedLeds="{Binding SelectedLeds}" HorizontalAlignment="Center" MaxHeight="500" ShowColors="True" />
<shared:DeviceVisualizer Grid.Row="1" Device="{Binding Device}" HighlightedLeds="{Binding SelectedLeds}" HorizontalAlignment="Center" MaxHeight="500" ShowColors="True" />
<Expander Grid.Row="2" Width="800" VerticalAlignment="Center" Header="Device properties">
<StackPanel Orientation="Horizontal">
@@ -235,7 +235,7 @@
<DataGrid Grid.Row="3"
Margin="0 8 0 0"
ItemsSource="{Binding Device.Leds}"
d:DataContext="{d:DesignInstance Type=surface:ArtemisLed}"
d:DataContext="{d:DesignInstance Type=core:ArtemisLed}"
CanUserSortColumns="True"
IsReadOnly="True"
CanUserAddRows="False"
@@ -2,11 +2,10 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using Artemis.Core.Models.Surface;
using Artemis.Core;
using Artemis.Core.Services;
using Artemis.UI.Shared.Services.Interfaces;
// using PropertyChanged;
using Stylet;
using Artemis.UI.Shared.Services;
using Stylet; // using PropertyChanged;
namespace Artemis.UI.Screens.Settings.Debug
{
@@ -6,8 +6,8 @@
xmlns:local="clr-namespace:Artemis.UI.Screens.Settings.Debug.Tabs"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:wpf="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:dataModel="clr-namespace:Artemis.UI.Shared.DataModelVisualization.Shared;assembly=Artemis.UI.Shared"
xmlns:modules="clr-namespace:Artemis.Core.Plugins.Modules;assembly=Artemis.Core"
xmlns:modules="clr-namespace:Artemis.Core.Modules;assembly=Artemis.Core"
xmlns:dataModel="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance local:DataModelDebugViewModel}">
<Grid>
@@ -54,14 +54,13 @@
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<TreeView Grid.Row="1"
ItemsSource="{Binding MainDataModel.Children}" HorizontalContentAlignment="Stretch"
<TreeView Grid.Row="1"
ItemsSource="{Binding MainDataModel.Children}" HorizontalContentAlignment="Stretch"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Recycling">
<TreeView.Resources>
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource MaterialDesignTreeViewItem}">
<Setter Property="IsExpanded" Value="{Binding IsVisualizationExpanded, Mode=TwoWay}">
</Setter>
<Setter Property="IsExpanded" Value="{Binding IsVisualizationExpanded, Mode=TwoWay}" />
</Style>
<HierarchicalDataTemplate DataType="{x:Type dataModel:DataModelPropertiesViewModel}" ItemsSource="{Binding Children}">
<TextBlock Text="{Binding PropertyDescription.Name}" ToolTip="{Binding PropertyDescription.Description}" />
@@ -1,11 +1,11 @@
using System.Collections.Generic;
using System.Linq;
using System.Timers;
using Artemis.Core.Events;
using Artemis.Core.Services.Interfaces;
using Artemis.UI.Shared.DataModelVisualization.Shared;
using Artemis.Core;
using Artemis.Core.Modules;
using Artemis.Core.Services;
using Artemis.UI.Shared;
using Artemis.UI.Shared.Services;
using Artemis.UI.Shared.Services.Interfaces;
using Stylet;
namespace Artemis.UI.Screens.Settings.Debug.Tabs
@@ -17,9 +17,9 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
private readonly Timer _updateTimer;
private bool _isModuleFilterEnabled;
private DataModelPropertiesViewModel _mainDataModel;
private List<Core.Plugins.Modules.Module> _modules;
private List<Module> _modules;
private string _propertySearch;
private Core.Plugins.Modules.Module _selectedModule;
private Module _selectedModule;
public DataModelDebugViewModel(IDataModelUIService dataModelUIService, IPluginService pluginService)
{
@@ -42,13 +42,13 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
set => SetAndNotify(ref _propertySearch, value);
}
public List<Core.Plugins.Modules.Module> Modules
public List<Module> Modules
{
get => _modules;
set => SetAndNotify(ref _modules, value);
}
public Core.Plugins.Modules.Module SelectedModule
public Module SelectedModule
{
get => _selectedModule;
set
@@ -110,7 +110,7 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
private void PopulateModules()
{
Modules = _pluginService.GetPluginsOfType<Core.Plugins.Modules.Module>().Where(p => p.Enabled).ToList();
Modules = _pluginService.GetPluginsOfType<Module>().Where(p => p.Enabled).ToList();
}
}
}
@@ -1,12 +1,10 @@
<UserControl x:Class="Artemis.UI.Screens.Settings.Debug.Tabs.LogsDebugView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Settings.Debug.Tabs"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance local:LogsDebugViewModel}">
<Grid>
</Grid>
</UserControl>
<Grid />
</UserControl>
@@ -1,20 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Controls;
namespace Artemis.UI.Screens.Settings.Debug.Tabs
{
/// <summary>
/// Interaction logic for LogsDebugView.xaml
/// Interaction logic for LogsDebugView.xaml
/// </summary>
public partial class LogsDebugView : UserControl
{
@@ -23,4 +12,4 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
InitializeComponent();
}
}
}
}
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using Stylet;
using Stylet;
namespace Artemis.UI.Screens.Settings.Debug.Tabs
{
@@ -12,4 +9,4 @@ namespace Artemis.UI.Screens.Settings.Debug.Tabs
DisplayName = "Logs";
}
}
}
}
@@ -1,11 +1,11 @@
<UserControl x:Class="Artemis.UI.Screens.Settings.Debug.Tabs.RenderDebugView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Settings.Debug.Tabs"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance local:RenderDebugViewModel}">
<StackPanel>
<TextBlock TextWrapping="Wrap">
@@ -32,4 +32,4 @@
<Image Source="{Binding CurrentFrame}" />
</materialDesign:Card>
</StackPanel>
</UserControl>
</UserControl>
@@ -2,8 +2,8 @@
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Artemis.Core.Events;
using Artemis.Core.Services.Interfaces;
using Artemis.Core;
using Artemis.Core.Services;
using SkiaSharp;
using SkiaSharp.Views.WPF;
using Stylet;
@@ -16,17 +16,17 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<TabControl Style="{StaticResource MaterialDesignTabControl}"
ItemsSource="{Binding Items}"
SelectedItem="{Binding ActiveItem}"
<TabControl Style="{StaticResource MaterialDesignTabControl}"
ItemsSource="{Binding Items}"
SelectedItem="{Binding ActiveItem}"
DisplayMemberPath="DisplayName">
<TabControl.ContentTemplate>
<DataTemplate >
<ContentControl s:View.Model="{Binding}"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch"
IsTabStop="False"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"/>
<DataTemplate>
<ContentControl s:View.Model="{Binding}"
VerticalContentAlignment="Stretch"
HorizontalContentAlignment="Stretch"
IsTabStop="False"
TextElement.Foreground="{DynamicResource MaterialDesignBody}" />
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
@@ -1,11 +1,11 @@
<UserControl x:Class="Artemis.UI.Screens.Settings.Tabs.Devices.DeviceSettingsTabView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Settings.Tabs.Devices"
xmlns:s="https://github.com/canton7/Stylet"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance local:DeviceSettingsTabViewModel}">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="0 12 0 0">
@@ -25,4 +25,4 @@
</ItemsControl>
</DockPanel>
</ScrollViewer>
</UserControl>
</UserControl>
@@ -1,6 +1,6 @@
using System.Linq;
using System.Threading.Tasks;
using Artemis.Core.Services.Storage.Interfaces;
using Artemis.Core.Services;
using Artemis.UI.Ninject.Factories;
using Stylet;
@@ -6,7 +6,7 @@
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:s="https://github.com/canton7/Stylet"
xmlns:devices="clr-namespace:Artemis.UI.Screens.Settings.Tabs.Devices"
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
d:DataContext="{d:DesignInstance devices:DeviceSettingsViewModel}"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
@@ -30,7 +30,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Grid.Row="0" Height="140" Width="196" Fill="{DynamicResource MaterialDesignPaper}" />
<controls:DeviceVisualizer Device="{Binding Device}" RenderOptions.BitmapScalingMode="HighQuality" Grid.Row="0" Height="130" Width="190" />
<shared:DeviceVisualizer Device="{Binding Device}" RenderOptions.BitmapScalingMode="HighQuality" Grid.Row="0" Height="130" Width="190" />
<Button Grid.Row="0"
Style="{StaticResource MaterialDesignFloatingActionMiniButton}"
HorizontalAlignment="Right"
@@ -1,10 +1,9 @@
using System;
using System.Diagnostics;
using Artemis.Core.Models.Surface;
using Artemis.Core;
using Artemis.Core.Services;
using Artemis.UI.Ninject.Factories;
using Artemis.UI.Screens.Settings.Debug;
using Artemis.UI.Shared.Services.Interfaces;
using Artemis.UI.Shared.Services;
using Humanizer;
using Stylet;
@@ -12,10 +11,10 @@ namespace Artemis.UI.Screens.Settings.Tabs.Devices
{
public class DeviceSettingsViewModel : PropertyChangedBase
{
private readonly IDeviceDebugVmFactory _deviceDebugVmFactory;
private readonly IDeviceService _deviceService;
private readonly IDialogService _dialogService;
private readonly IWindowManager _windowManager;
private readonly IDeviceDebugVmFactory _deviceDebugVmFactory;
private bool _isDeviceEnabled;
public DeviceSettingsViewModel(ArtemisDevice device, IDeviceService deviceService, IDialogService dialogService,
@@ -1,12 +1,12 @@
<UserControl x:Class="Artemis.UI.Screens.Settings.Tabs.General.GeneralSettingsTabView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Settings.Tabs.General"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:s="https://github.com/canton7/Stylet"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance local:GeneralSettingsTabViewModel}">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
@@ -63,7 +63,7 @@
<StackPanel Grid.Column="0">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Color scheme</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" TextWrapping="Wrap">
Pick between a light and dark color scheme, the automatic option copies your Windows settings.
Pick between a light and dark color scheme, the automatic option copies your Windows settings.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
@@ -84,7 +84,7 @@
<StackPanel Grid.Column="0" VerticalAlignment="Center">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Debugger</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}">
Use the debugger to see the raw image Artemis is rendering on the surface.
Use the debugger to see the raw image Artemis is rendering on the surface.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
@@ -107,7 +107,7 @@
<StackPanel Grid.Column="0" VerticalAlignment="Center">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Application files</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}">
Opens the directory where application files like plugins and settings are stored.
Opens the directory where application files like plugins and settings are stored.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
@@ -130,7 +130,7 @@
<StackPanel Grid.Column="0" VerticalAlignment="Center">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Logs</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}">
Opens the directory where logs are stored.
Opens the directory where logs are stored.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
@@ -153,7 +153,7 @@
<StackPanel Grid.Column="0">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Log level</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" TextWrapping="Wrap">
Sets the logging level, a higher logging level will result in more log files.
Sets the logging level, a higher logging level will result in more log files.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
@@ -180,7 +180,7 @@
<StackPanel Grid.Column="0">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Show condition data model values</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" TextWrapping="Wrap">
While selecting a condition target, show the current values of the data model
While selecting a condition target, show the current values of the data model
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
@@ -206,7 +206,7 @@
<StackPanel Grid.Column="0">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Render scale</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" TextWrapping="Wrap">
Sets the resolution Artemis renders at, higher scale means more CPU-usage, especially on large surfaces.
Sets the resolution Artemis renders at, higher scale means more CPU-usage, especially on large surfaces.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
@@ -227,7 +227,7 @@
<StackPanel Grid.Column="0">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Target framerate</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" TextWrapping="Wrap">
Sets the FPS Artemis tries to render at, higher FPS means more CPU-usage but smoother animations.
Sets the FPS Artemis tries to render at, higher FPS means more CPU-usage but smoother animations.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
@@ -248,7 +248,7 @@
<StackPanel Grid.Column="0">
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">LED sample size</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" TextWrapping="Wrap">
Sets the amount of samples that is taken to determine each LEDs color. This means a LED can be semi off if it is not completely covered by a color.
Sets the amount of samples that is taken to determine each LEDs color. This means a LED can be semi off if it is not completely covered by a color.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
@@ -259,4 +259,4 @@
</materialDesign:Card>
</StackPanel>
</ScrollViewer>
</UserControl>
</UserControl>
@@ -6,10 +6,9 @@ using System.Linq;
using System.Threading.Tasks;
using Artemis.Core;
using Artemis.Core.Services;
using Artemis.Core.Utilities;
using Artemis.UI.Services.Interfaces;
using Artemis.UI.Shared.Services.Interfaces;
using Artemis.UI.Shared.Utilities;
using Artemis.UI.Shared;
using Artemis.UI.Shared.Services;
using Serilog.Events;
using Stylet;
@@ -200,7 +199,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
try
{
var autoRunFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Startup), "Artemis.lnk");
var executableFile = CurrentProcessUtilities.GetCurrentLocation();
var executableFile = Constants.ExecutablePath;
if (File.Exists(autoRunFile))
File.Delete(autoRunFile);
@@ -9,7 +9,7 @@
d:DataContext="{d:DesignInstance local:ModuleOrderModuleViewModel}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="40" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Priority}"
@@ -1,5 +1,5 @@
using System;
using Artemis.Core.Plugins.Modules;
using Artemis.Core.Modules;
using Stylet;
namespace Artemis.UI.Screens.Settings.Tabs.Modules
@@ -13,22 +13,22 @@
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<Grid Margin="15" MaxWidth="800">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel>
<TextBlock TextWrapping="Wrap" Style="{StaticResource MaterialDesignTextBlock}">
Drag and drop the modules below to change their rendering priority. <LineBreak/><LineBreak/>
- Like in the profile editor, the modules at the top render over modules at the bottom <LineBreak/>
- The categories serve as a starting point for new modules, you may freely move modules between the categories <LineBreak/>
Drag and drop the modules below to change their rendering priority. <LineBreak /><LineBreak />
- Like in the profile editor, the modules at the top render over modules at the bottom <LineBreak />
- The categories serve as a starting point for new modules, you may freely move modules between the categories <LineBreak />
</TextBlock>
<Grid Margin="0 0 0 5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}">1 - Overlays</TextBlock>
<TextBlock Grid.Column="1"
@@ -41,17 +41,17 @@
</Grid>
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch" Margin="0,0,5,0">
<StackPanel Margin="15">
<Border BorderThickness="2" >
<Border BorderThickness="2">
<Border.BorderBrush>
<VisualBrush>
<VisualBrush.Visual>
<Rectangle StrokeDashArray="4 2" Stroke="{DynamicResource MaterialDesignDivider}" StrokeThickness="2"
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}"/>
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
</VisualBrush.Visual>
</VisualBrush>
</Border.BorderBrush>
<ListBox ItemsSource="{Binding OverlayModules}"
<ListBox ItemsSource="{Binding OverlayModules}"
materialDesign:RippleAssist.IsDisabled="True"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
@@ -60,7 +60,7 @@
MinHeight="40">
<ListBox.ItemTemplate>
<DataTemplate>
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False"/>
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
@@ -72,8 +72,8 @@
<StackPanel Grid.Row="1">
<Grid Margin="0 15 0 5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}">2 - Applications/games</TextBlock>
<TextBlock Grid.Column="1"
@@ -86,17 +86,17 @@
</Grid>
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch" Margin="0,0,5,0">
<StackPanel Margin="15">
<Border BorderThickness="2" >
<Border BorderThickness="2">
<Border.BorderBrush>
<VisualBrush>
<VisualBrush.Visual>
<Rectangle StrokeDashArray="4 2" Stroke="{DynamicResource MaterialDesignDivider}" StrokeThickness="2"
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}"/>
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
</VisualBrush.Visual>
</VisualBrush>
</Border.BorderBrush>
<ListBox ItemsSource="{Binding ApplicationModules}"
<ListBox ItemsSource="{Binding ApplicationModules}"
materialDesign:RippleAssist.IsDisabled="True"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
@@ -105,7 +105,7 @@
MinHeight="40">
<ListBox.ItemTemplate>
<DataTemplate>
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False"/>
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
@@ -117,8 +117,8 @@
<StackPanel Grid.Row="2">
<Grid Margin="0 15 0 5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}">3 - Normal</TextBlock>
<TextBlock Grid.Column="1"
@@ -131,17 +131,17 @@
</Grid>
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch" Margin="0,0,5,0">
<StackPanel Margin="15">
<Border BorderThickness="2" >
<Border BorderThickness="2">
<Border.BorderBrush>
<VisualBrush>
<VisualBrush.Visual>
<Rectangle StrokeDashArray="4 2" Stroke="{DynamicResource MaterialDesignDivider}" StrokeThickness="2"
Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}"/>
Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" />
</VisualBrush.Visual>
</VisualBrush>
</Border.BorderBrush>
<ListBox ItemsSource="{Binding NormalModules}"
<ListBox ItemsSource="{Binding NormalModules}"
materialDesign:RippleAssist.IsDisabled="True"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
@@ -150,7 +150,7 @@
MinHeight="40">
<ListBox.ItemTemplate>
<DataTemplate>
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False"/>
<ContentControl s:View.Model="{Binding}" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" IsTabStop="False" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
@@ -1,8 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Artemis.Core.Plugins.Modules;
using Artemis.Core.Services.Interfaces;
using Artemis.Core.Modules;
using Artemis.Core.Services;
using GongSolutions.Wpf.DragDrop;
using Stylet;
@@ -10,10 +9,10 @@ namespace Artemis.UI.Screens.Settings.Tabs.Modules
{
public class ModuleOrderTabViewModel : Screen, IDropTarget
{
private readonly IPluginService _pluginService;
private readonly IModuleService _moduleService;
private List<ModuleOrderModuleViewModel> _modules;
private DefaultDropHandler _defaultDropHandler;
private readonly IPluginService _pluginService;
private readonly DefaultDropHandler _defaultDropHandler;
private readonly List<ModuleOrderModuleViewModel> _modules;
public ModuleOrderTabViewModel(IPluginService pluginService, IModuleService moduleService)
{
@@ -1,11 +1,11 @@
<UserControl x:Class="Artemis.UI.Screens.Settings.Tabs.Plugins.PluginSettingsTabView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Artemis.UI.Screens.Settings.Tabs.Plugins"
xmlns:s="https://github.com/canton7/Stylet"
mc:Ignorable="d"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance local:PluginSettingsTabViewModel}">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="0 12 0 0">
@@ -25,4 +25,4 @@
</ItemsControl>
</DockPanel>
</ScrollViewer>
</UserControl>
</UserControl>
@@ -1,6 +1,6 @@
using System.Linq;
using System.Threading.Tasks;
using Artemis.Core.Services.Interfaces;
using Artemis.Core.Services;
using Artemis.UI.Ninject.Factories;
using Stylet;
@@ -2,15 +2,14 @@
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using Artemis.Core.Plugins;
using Artemis.Core.Plugins.DataModelExpansions;
using Artemis.Core.Plugins.DataModelExpansions.Internal;
using Artemis.Core.Plugins.DeviceProviders;
using Artemis.Core.Plugins.LayerBrushes;
using Artemis.Core.Plugins.LayerEffects;
using Artemis.Core.Plugins.Modules;
using Artemis.Core.Services.Interfaces;
using Artemis.UI.Shared.Services.Interfaces;
using Artemis.Core;
using Artemis.Core.DataModelExpansions;
using Artemis.Core.DeviceProviders;
using Artemis.Core.LayerBrushes;
using Artemis.Core.LayerEffects;
using Artemis.Core.Modules;
using Artemis.Core.Services;
using Artemis.UI.Shared.Services;
using MaterialDesignThemes.Wpf;
using Ninject;
using Ninject.Parameters;
@@ -21,13 +20,13 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
public class PluginSettingsViewModel : PropertyChangedBase
{
private readonly IDialogService _dialogService;
private readonly IKernel _kernel;
private readonly IPluginService _pluginService;
private readonly ISnackbarMessageQueue _snackbarMessageQueue;
private readonly IKernel _kernel;
private readonly IWindowManager _windowManager;
private bool _enabling;
private Plugin _plugin;
private PluginInfo _pluginInfo;
private bool _enabling;
public PluginSettingsViewModel(Plugin plugin,
IKernel kernel,
@@ -131,7 +130,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
return PackIconKind.Devices;
case ProfileModule _:
return PackIconKind.VectorRectangle;
case Core.Plugins.Modules.Module _:
case Module _:
return PackIconKind.GearBox;
case LayerBrushProvider _:
return PackIconKind.Brush;
@@ -1,4 +1,4 @@
using Artemis.Core.Plugins;
using Artemis.Core;
using MaterialDesignThemes.Wpf;
using Stylet;
@@ -6,8 +6,6 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
{
public class PluginSettingsWindowViewModel : Conductor<PluginConfigurationViewModel>
{
public PackIconKind Icon { get; }
public PluginSettingsWindowViewModel(PluginConfigurationViewModel configurationViewModel, PackIconKind icon)
{
Icon = icon;
@@ -16,6 +14,8 @@ namespace Artemis.UI.Screens.Settings.Tabs.Plugins
ActiveItem.Closed += ActiveItemOnClosed;
}
public PackIconKind Icon { get; }
private void ActiveItemOnClosed(object? sender, CloseEventArgs e)
{
ActiveItem.Closed -= ActiveItemOnClosed;