Code cleanup

This commit is contained in:
Robert committed 2020-01-14 17:25:13 +01:00
1 parent c97b479779
commit f071871695
73 files changed
+372 -364

No files matched your search

+2 -2
View File
@@ -63,8 +63,8 @@
<!-- Disable tab stop/focusable on all content controls -->
<Style TargetType="ContentControl">
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Focusable" Value="False" />
</Style>
</ResourceDictionary>
</Application.Resources>
@@ -25,7 +25,7 @@ namespace Artemis.UI.Behaviors
private static void OnLoaded(object sender, RoutedEventArgs e)
{
var frameworkElement = (FrameworkElement)sender;
var frameworkElement = (FrameworkElement) sender;
frameworkElement.Loaded -= OnLoaded;
var window = Window.GetWindow(frameworkElement);
-1
View File
@@ -1,7 +1,6 @@
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Animation;
using System.Windows.Threading;
using Artemis.Core.Ninject;
using Artemis.Core.Services.Interfaces;
+3 -3
View File
@@ -4,13 +4,13 @@ namespace Artemis.UI.Events
{
public class MainWindowKeyEvent
{
public bool KeyDown { get; }
public KeyEventArgs EventArgs { get; }
public MainWindowKeyEvent(bool keyDown, KeyEventArgs eventArgs)
{
KeyDown = keyDown;
EventArgs = eventArgs;
}
public bool KeyDown { get; }
public KeyEventArgs EventArgs { get; }
}
}
@@ -1,15 +1,15 @@
<mde:MaterialWindow x:Class="Artemis.UI.Screens.GradientEditor.GradientEditorView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:gradientEditor="clr-namespace:Artemis.UI.Screens.GradientEditor"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mde="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
mc:Ignorable="d"
Title="Gradient Editor"
Height="450" Width="800"
d:DataContext="{d:DesignInstance {x:Type gradientEditor:GradientEditorViewModel}}">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:gradientEditor="clr-namespace:Artemis.UI.Screens.GradientEditor"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mde="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
mc:Ignorable="d"
Title="Gradient Editor"
Height="450" Width="800"
d:DataContext="{d:DesignInstance {x:Type gradientEditor:GradientEditorViewModel}}">
<Grid>
<materialDesign:ColorPicker Color="{Binding CurrentColor}" />
</Grid>
@@ -10,15 +10,15 @@
d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance module:ModuleRootViewModel}">
<TabControl Margin="0 -1 0 0"
ItemsSource="{Binding Items}"
SelectedItem="{Binding ActiveItem}"
DisplayMemberPath="DisplayName"
<TabControl Margin="0 -1 0 0"
ItemsSource="{Binding Items}"
SelectedItem="{Binding ActiveItem}"
DisplayMemberPath="DisplayName"
Style="{StaticResource MaterialDesignTabControl}">
<TabControl.ContentTemplate>
<DataTemplate >
<TabControl.ContentTemplate>
<DataTemplate>
<materialDesign:TransitioningContent OpeningEffect="{materialDesign:TransitionEffect FadeIn}">
<ContentControl s:View.Model="{Binding}" TextElement.Foreground="{DynamicResource MaterialDesignBody}"/>
<ContentControl s:View.Model="{Binding}" TextElement.Foreground="{DynamicResource MaterialDesignBody}" />
</materialDesign:TransitioningContent>
</DataTemplate>
</TabControl.ContentTemplate>
@@ -14,7 +14,7 @@ namespace Artemis.UI.Screens.Module
{
DisplayName = module?.DisplayName;
Module = module;
_profileEditorViewModelFactory = profileEditorViewModelFactory;
Task.Run(AddTabsAsync);
@@ -14,11 +14,11 @@
d:DataContext="{d:DesignInstance local:LayerPropertiesViewModel}"
behaviors:InputBindingBehavior.PropagateInputBindingsToWindow="True">
<UserControl.InputBindings>
<KeyBinding Command="{s:Action Play}" Key="Space"></KeyBinding>
<KeyBinding Command="{s:Action PlayFromStart}" Modifiers="Shift" Key="Space"></KeyBinding>
<KeyBinding Command="{s:Action Play}" Key="Space" />
<KeyBinding Command="{s:Action PlayFromStart}" Modifiers="Shift" Key="Space" />
</UserControl.InputBindings>
<UserControl.Resources>
<s:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
<s:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
</UserControl.Resources>
<Grid x:Name="ContainerGrid">
<Grid.RowDefinitions>
@@ -1,5 +1,4 @@
using System.Windows.Controls;
using System.Windows.Input;
namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
{
@@ -17,13 +16,9 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
private void TimelineScrollChanged(object sender, ScrollChangedEventArgs e)
{
if (sender == TimelineHeaderScrollViewer)
{
TimelineRailsScrollViewer.ScrollToHorizontalOffset(e.HorizontalOffset);
}
else if (sender == TimelineRailsScrollViewer)
{
TimelineHeaderScrollViewer.ScrollToHorizontalOffset(e.HorizontalOffset);
}
}
}
}
@@ -15,7 +15,8 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
private readonly IProfileEditorService _profileEditorService;
private bool _keyframesEnabled;
public LayerPropertyViewModel(BaseLayerProperty layerProperty, LayerPropertyViewModel parent, ILayerPropertyViewModelFactory layerPropertyViewModelFactory, IKernel kernel, IProfileEditorService profileEditorService)
public LayerPropertyViewModel(BaseLayerProperty layerProperty, LayerPropertyViewModel parent, ILayerPropertyViewModelFactory layerPropertyViewModelFactory, IKernel kernel,
IProfileEditorService profileEditorService)
{
_kernel = kernel;
_profileEditorService = profileEditorService;
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Artemis.Core.Models.Profile.LayerProperties;
using Artemis.UI.Services.Interfaces;
namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.PropertyInput
@@ -15,7 +15,7 @@
Padding="0 -1"
materialDesign:ValidationAssist.UsePopup="True"
HorizontalAlignment="Left"
Text="{Binding IntInputValue}"/>
Text="{Binding IntInputValue}" />
<TextBlock Margin="5 0 0 0" Width="10" VerticalAlignment="Bottom" Text="{Binding LayerPropertyViewModel.LayerProperty.InputAffix}" />
</StackPanel>
</UserControl>
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Artemis.Core.Models.Profile.LayerProperties;
using Artemis.UI.Services.Interfaces;
namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.PropertyInput
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Artemis.UI.Exceptions;
using Artemis.UI.Services.Interfaces;
using Stylet;
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Artemis.Core.Models.Profile.LayerProperties;
using Artemis.UI.Services.Interfaces;
using PropertyChanged;
using SkiaSharp;
@@ -26,7 +25,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.P
[DependsOn(nameof(InputValue))]
public float Y
{
get => ((SKPoint?)InputValue)?.Y ?? 0;
get => ((SKPoint?) InputValue)?.Y ?? 0;
set => InputValue = new SKPoint(X, value);
}
@@ -16,7 +16,7 @@
materialDesign:ValidationAssist.UsePopup="True"
HorizontalAlignment="Left"
ToolTip="Height"
Text="{Binding Height}"/>
Text="{Binding Height}" />
<TextBlock Margin="5 0" VerticalAlignment="Bottom">,</TextBlock>
<TextBox Width="60"
Margin="0 2"
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using Artemis.Core.Models.Profile.LayerProperties;
using Artemis.UI.Services.Interfaces;
using PropertyChanged;
using SkiaSharp;
@@ -26,7 +25,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.PropertyTree.P
[DependsOn(nameof(InputValue))]
public float Height
{
get => ((SKSize?)InputValue)?.Height ?? 0;
get => ((SKSize?) InputValue)?.Height ?? 0;
set => InputValue = new SKSize(Width, value);
}
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Artemis.UI.Services.Interfaces;
using Stylet;
@@ -74,7 +74,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.Timeline
}
/// <summary>
/// Updates the time line's keyframes
/// Updates the time line's keyframes
/// </summary>
public void Update()
{
@@ -18,7 +18,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties.Timeline
EasingFunction = easingFunction;
Description = easingFunction.Humanize();
CreateGeometry();
}
@@ -21,8 +21,8 @@
</UserControl.Resources>
<UserControl.InputBindings>
<KeyBinding Command="{s:Action Undo}" Modifiers="Control" Key="Z"></KeyBinding>
<KeyBinding Command="{s:Action Redo}" Modifiers="Control" Key="Y"></KeyBinding>
<KeyBinding Command="{s:Action Undo}" Modifiers="Control" Key="Z" />
<KeyBinding Command="{s:Action Redo}" Modifiers="Control" Key="Y" />
</UserControl.InputBindings>
<Grid Margin="16">
@@ -14,8 +14,8 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.ProfileTree.TreeItem
public abstract class TreeItemViewModel : PropertyChangedBase
{
private readonly IDialogService _dialogService;
private readonly ILayerService _layerService;
private readonly IFolderViewModelFactory _folderViewModelFactory;
private readonly ILayerService _layerService;
private readonly ILayerViewModelFactory _layerViewModelFactory;
private readonly IProfileEditorService _profileEditorService;
@@ -122,7 +122,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.ProfileTree.TreeItem
throw new ArtemisUIException("Cannot add a layer to a profile element of type " + ProfileElement.GetType().Name);
var layer = new Layer(ProfileElement.Profile, ProfileElement, "New layer");
foreach (var baseLayerProperty in layer.Properties)
foreach (var baseLayerProperty in layer.Properties)
_layerService.InstantiateKeyframeEngine(baseLayerProperty);
ProfileElement.AddChild(layer);
UpdateProfileElements();
@@ -1,7 +1,6 @@
using System;
using System.Linq;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Artemis.Core.Models.Profile;
using Artemis.Core.Models.Profile.LayerShapes;
@@ -9,8 +8,6 @@ using Artemis.Core.Models.Surface;
using Artemis.UI.Extensions;
using Artemis.UI.Services.Interfaces;
using RGB.NET.Core;
using SkiaSharp;
using SkiaSharp.Views.WPF;
using Rectangle = Artemis.Core.Models.Profile.LayerShapes.Rectangle;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
@@ -55,7 +55,7 @@
</ListBox.ItemsPanel>
<ListBoxItem ToolTip="Pan over different parts of the surface">
<materialDesign:PackIcon Kind="HandLeft" />
</ListBoxItem>
</ListBoxItem>
<ListBoxItem ToolTip="Edit shape in layer">
<materialDesign:PackIcon Kind="Edit" />
</ListBoxItem>
@@ -171,7 +171,6 @@
</ItemsControl>
</Grid>
<StackPanel ZIndex="1" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="10">
<materialDesign:Card Padding="8">
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
using System.Windows;
using System.Windows.Input;
@@ -1,23 +1,21 @@
using System;
using System.Diagnostics.Eventing.Reader;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Artemis.Core.Models.Profile;
using Artemis.UI.Services.Interfaces;
using SkiaSharp;
using SkiaSharp.Views.WPF;
namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization.Tools
{
public class EditToolViewModel : VisualizationToolViewModel
{
private bool _isDragging;
private double _dragOffsetY;
private double _dragOffsetX;
private Point _dragStart;
private bool _draggingHorizontally;
private bool _draggingVertically;
private double _dragOffsetX;
private double _dragOffsetY;
private Point _dragStart;
private bool _isDragging;
public EditToolViewModel(ProfileViewModel profileViewModel, IProfileEditorService profileEditorService) : base(profileViewModel, profileEditorService)
{
@@ -1,5 +1,4 @@
using MaterialDesignThemes.Wpf;
using Stylet;
namespace Artemis.UI.Screens.News
{
+7 -9
View File
@@ -1,6 +1,4 @@
using System;
using System.ComponentModel;
using System.Threading;
using System.ComponentModel;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
@@ -31,6 +29,10 @@ namespace Artemis.UI.Screens
SidebarViewModel.PropertyChanged += SidebarViewModelOnPropertyChanged;
}
public SidebarViewModel SidebarViewModel { get; }
public bool IsSidebarVisible { get; set; }
public bool ActiveItemReady { get; set; }
private void SidebarViewModelOnPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(SidebarViewModel.SelectedItem))
@@ -48,10 +50,6 @@ namespace Artemis.UI.Screens
}
}
public SidebarViewModel SidebarViewModel { get; }
public bool IsSidebarVisible { get; set; }
public bool ActiveItemReady { get; set; }
private void ApplyWindowsTheme(ThemeWatcher.WindowsTheme windowsTheme)
{
var paletteHelper = new PaletteHelper();
@@ -61,9 +59,9 @@ namespace Artemis.UI.Screens
var extensionsPaletteHelper = new MaterialDesignExtensions.Themes.PaletteHelper();
// That's nice, then don't use it in your own examples and provide a working alternative
#pragma warning disable 612
#pragma warning disable 612
extensionsPaletteHelper.SetLightDark(windowsTheme == ThemeWatcher.WindowsTheme.Dark);
#pragma warning restore 612
#pragma warning restore 612
}
public void WindowDeactivated()
@@ -78,7 +78,7 @@
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action ShowDebugger}" Width="150">
<Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action ShowDebugger}" Width="150">
SHOW DEBUGGER
</Button>
</StackPanel>
@@ -101,7 +101,7 @@
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action ShowLogsFolder}" Width="150">
<Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action ShowLogsFolder}" Width="150">
SHOW LOGS
</Button>
</StackPanel>
@@ -215,10 +215,10 @@
materialDesign:DataGridAssist.CellPadding="13 8 8 8"
materialDesign:DataGridAssist.ColumnHeaderPadding="8">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Type}" Header="Type" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding Name}" Header="Name" IsReadOnly="True" Width="*"/>
<DataGridTextColumn Binding="{Binding Description}" Header="Description" IsReadOnly="True" Width="*"/>
<DataGridTextColumn Binding="{Binding Version}" Header="Version" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding Type}" Header="Type" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Name}" Header="Name" IsReadOnly="True" Width="*" />
<DataGridTextColumn Binding="{Binding Description}" Header="Description" IsReadOnly="True" Width="*" />
<DataGridTextColumn Binding="{Binding Version}" Header="Version" IsReadOnly="True" />
<DataGridCheckBoxColumn Header="Enabled"
Binding="{Binding IsEnabled}"
ElementStyle="{StaticResource MaterialDesignDataGridCheckBoxColumnStyle}"
@@ -22,9 +22,9 @@ namespace Artemis.UI.Screens.Settings
{
private readonly IDeviceSettingsViewModelFactory _deviceSettingsViewModelFactory;
private readonly IKernel _kernel;
private readonly IPluginService _pluginService;
private readonly ISettingsService _settingsService;
private readonly ISurfaceService _surfaceService;
private readonly IPluginService _pluginService;
private readonly IWindowManager _windowManager;
public SettingsViewModel(IKernel kernel,
@@ -126,7 +126,7 @@ namespace Artemis.UI.Screens.Settings
{
_windowManager.ShowWindow(_kernel.Get<DebugViewModel>());
}
public void ShowLogsFolder()
{
Process.Start(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs"));
@@ -31,7 +31,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.Devices
{
_deviceService.IdentifyDevice(Device);
}
public void ShowDeviceDebugger()
{
}
@@ -1,22 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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.Sidebar
{
/// <summary>
/// Interaction logic for SidebarView.xaml
/// Interaction logic for SidebarView.xaml
/// </summary>
public partial class SidebarView : UserControl
{
@@ -25,4 +12,4 @@ namespace Artemis.UI.Screens.Sidebar
InitializeComponent();
}
}
}
}
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using Artemis.Core.Events;
using Artemis.Core.Services.Interfaces;
@@ -85,10 +86,10 @@ namespace Artemis.UI.Screens.Sidebar
return;
// Icon is provided as string to avoid having to reference MaterialDesignThemes
var parsedIcon = System.Enum.TryParse<PackIconKind>(module.DisplayIcon, true, out var iconEnum);
var parsedIcon = Enum.TryParse<PackIconKind>(module.DisplayIcon, true, out var iconEnum);
if (parsedIcon == false)
iconEnum = PackIconKind.QuestionMarkCircle;
var sidebarItem = new FirstLevelNavigationItem { Icon = iconEnum, Label = module.DisplayName };
var sidebarItem = new FirstLevelNavigationItem {Icon = iconEnum, Label = module.DisplayName};
SidebarItems.Add(sidebarItem);
SidebarItemObjects.Add(sidebarItem, module);
}
@@ -117,7 +118,7 @@ namespace Artemis.UI.Screens.Sidebar
if (e.PluginInfo.Instance is Core.Plugins.Abstract.Module module)
RemoveModule(module);
}
#endregion
}
}
+17 -17
View File
@@ -1,21 +1,21 @@
<controls:MaterialWindow x:Class="Artemis.UI.Screens.Splash.SplashView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:splash="clr-namespace:Artemis.UI.Screens.Splash"
xmlns:controls="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
xmlns:s="https://github.com/canton7/Stylet"
mc:Ignorable="d"
Title=" "
ResizeMode="NoResize"
BorderBackgroundBrush="{DynamicResource PrimaryHueMidBrush}"
Height="450"
Width="400"
WindowStartupLocation="CenterScreen"
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
MouseDown="{s:Action MouseDown}"
d:DataContext="{d:DesignInstance splash:SplashViewModel}">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:splash="clr-namespace:Artemis.UI.Screens.Splash"
xmlns:controls="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
xmlns:s="https://github.com/canton7/Stylet"
mc:Ignorable="d"
Title=" "
ResizeMode="NoResize"
BorderBackgroundBrush="{DynamicResource PrimaryHueMidBrush}"
Height="450"
Width="400"
WindowStartupLocation="CenterScreen"
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
MouseDown="{s:Action MouseDown}"
d:DataContext="{d:DesignInstance splash:SplashViewModel}">
<Grid Background="{DynamicResource PrimaryHueMidBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="250" />
@@ -124,9 +124,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
// Create VMs for missing devices
var viewModel = existing.FirstOrDefault(vm => vm.Device.RgbDevice == surfaceDeviceConfiguration.RgbDevice);
if (viewModel == null)
{
viewModel = new SurfaceDeviceViewModel(surfaceDeviceConfiguration);
}
// Update existing devices
else
viewModel.Device = surfaceDeviceConfiguration;
@@ -199,6 +197,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
var deviceViewModel = Devices[i];
deviceViewModel.Device.ZIndex = i + 1;
}
_surfaceService.UpdateSurfaceConfiguration(SelectedSurface, true);
}
@@ -213,6 +212,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
var deviceViewModel = Devices[i];
deviceViewModel.Device.ZIndex = i + 1;
}
_surfaceService.UpdateSurfaceConfiguration(SelectedSurface, true);
}
@@ -224,6 +224,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
var deviceViewModel = Devices[i];
deviceViewModel.Device.ZIndex = i + 1;
}
_surfaceService.UpdateSurfaceConfiguration(SelectedSurface, true);
}
@@ -237,6 +238,7 @@ namespace Artemis.UI.Screens.SurfaceEditor
var deviceViewModel = Devices[i];
deviceViewModel.Device.ZIndex = i + 1;
}
_surfaceService.UpdateSurfaceConfiguration(SelectedSurface, true);
}
@@ -1,6 +1,5 @@
using System.Windows.Media;
using MaterialDesignThemes.Wpf;
using Stylet;
namespace Artemis.UI.Screens.Workshop
{
@@ -15,7 +14,7 @@ namespace Artemis.UI.Screens.Workshop
public Color TestColor { get; set; }
public bool TestPopupOpen { get; set; }
public void UpdateValues()
{
TestPopupOpen = !TestPopupOpen;
@@ -47,7 +47,5 @@ namespace Artemis.UI.Services.Interfaces
/// Occurs when the profile preview has been updated
/// </summary>
event EventHandler ProfilePreviewUpdated;
}
}
+5 -5
View File
@@ -9,11 +9,6 @@ namespace Artemis.UI.Utilities
{
public class ThemeWatcher
{
public ThemeWatcher()
{
WatchTheme();
}
public enum WindowsTheme
{
Light,
@@ -24,6 +19,11 @@ namespace Artemis.UI.Utilities
private const string RegistryValueName = "AppsUseLightTheme";
public ThemeWatcher()
{
WatchTheme();
}
public void WatchTheme()
{
var currentUser = WindowsIdentity.GetCurrent();
+1
View File
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Castle.Core" version="4.4.0" targetFramework="net461" />
<package id="FluentValidation" version="8.5.0" targetFramework="net472" />