1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

UI - Removed now unused sample size setting

This commit is contained in:
Robert 2021-02-24 21:30:50 +01:00
parent b1d54a2ea9
commit 528d082e62
3 changed files with 10 additions and 56 deletions

View File

@ -25,7 +25,6 @@ namespace Artemis.Core.Services
private readonly IPluginManagementService _pluginManagementService;
private readonly IDeviceRepository _deviceRepository;
private readonly PluginSetting<int> _targetFrameRateSetting;
private readonly PluginSetting<int> _sampleSizeSetting;
private ListLedGroup? _surfaceLedGroup;
private bool _modifyingProviders;
@ -35,7 +34,6 @@ namespace Artemis.Core.Services
_pluginManagementService = pluginManagementService;
_deviceRepository = deviceRepository;
_targetFrameRateSetting = settingsService.GetSetting("Core.TargetFrameRate", 25);
_sampleSizeSetting = settingsService.GetSetting("Core.SampleSize", 1);
Surface = new RGBSurface();

View File

@ -347,27 +347,6 @@
<ComboBox Width="80" SelectedItem="{Binding SelectedTargetFrameRate}" ItemsSource="{Binding TargetFrameRates}" DisplayMemberPath="Item1" />
</StackPanel>
</Grid>
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<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.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<ComboBox Width="80" SelectedItem="{Binding SampleSize}" ItemsSource="{Binding SampleSizes}" />
</StackPanel>
</Grid>
</StackPanel>
</materialDesign:Card>

View File

@ -3,11 +3,9 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Mime;
using System.Security.Principal;
using System.Threading.Tasks;
using System.Windows;
using System.Xml.Linq;
using System.Xml.XPath;
using Artemis.Core;
using Artemis.Core.LayerBrushes;
using Artemis.Core.Services;
@ -16,7 +14,6 @@ using Artemis.UI.Screens.StartupWizard;
using Artemis.UI.Services;
using Artemis.UI.Shared;
using Artemis.UI.Shared.Services;
using MaterialDesignThemes.Wpf;
using Ninject;
using Serilog.Events;
using Stylet;
@ -26,17 +23,16 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
public class GeneralSettingsTabViewModel : Screen
{
private readonly IDebugService _debugService;
private readonly IKernel _kernel;
private readonly IWindowManager _windowManager;
private readonly PluginSetting<LayerBrushReference> _defaultLayerBrushDescriptor;
private readonly IDialogService _dialogService;
private readonly IKernel _kernel;
private readonly IMessageService _messageService;
private readonly ISettingsService _settingsService;
private readonly IUpdateService _updateService;
private readonly IMessageService _messageService;
private List<Tuple<string, double>> _renderScales;
private List<int> _sampleSizes;
private List<Tuple<string, int>> _targetFrameRates;
private readonly PluginSetting<LayerBrushReference> _defaultLayerBrushDescriptor;
private readonly IWindowManager _windowManager;
private bool _canOfferUpdatesIfFound = true;
private List<Tuple<string, double>> _renderScales;
private List<Tuple<string, int>> _targetFrameRates;
public GeneralSettingsTabViewModel(
IKernel kernel,
@ -68,9 +64,6 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
for (int i = 10; i <= 30; i += 5)
TargetFrameRates.Add(new Tuple<string, int>(i + " FPS", i));
// Anything else is kinda broken right now
SampleSizes = new List<int> {1, 9};
List<LayerBrushProvider> layerBrushProviders = pluginManagementService.GetFeaturesOfType<LayerBrushProvider>();
LayerBrushDescriptors = new BindableCollection<LayerBrushDescriptor>(layerBrushProviders.SelectMany(l => l.LayerBrushDescriptors));
@ -111,12 +104,6 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
set => SetAndNotify(ref _renderScales, value);
}
public List<int> SampleSizes
{
get => _sampleSizes;
set => SetAndNotify(ref _sampleSizes, value);
}
public bool StartWithWindows
{
get => _settingsService.GetSetting("UI.AutoRun", false).Value;
@ -239,16 +226,6 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
}
}
public int SampleSize
{
get => _settingsService.GetSetting("Core.SampleSize", 1).Value;
set
{
_settingsService.GetSetting("Core.SampleSize", 1).Value = value;
_settingsService.GetSetting("Core.SampleSize", 1).Save();
}
}
public PluginSetting<int> WebServerPortSetting { get; }
public bool CanOfferUpdatesIfFound
@ -320,7 +297,7 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
File.Delete(autoRunFile);
// TODO: Don't do anything if running a development build, only auto-run release builds
// Create or remove the task if necessary
try
{
@ -363,13 +340,13 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
task.Descendants().First(d => d.Name.LocalName == "RegistrationInfo").Descendants().First(d => d.Name.LocalName == "Date")
.SetValue(DateTime.Now);
task.Descendants().First(d => d.Name.LocalName == "RegistrationInfo").Descendants().First(d => d.Name.LocalName == "Author")
.SetValue(System.Security.Principal.WindowsIdentity.GetCurrent().Name);
.SetValue(WindowsIdentity.GetCurrent().Name);
task.Descendants().First(d => d.Name.LocalName == "Triggers").Descendants().First(d => d.Name.LocalName == "LogonTrigger").Descendants().First(d => d.Name.LocalName == "Delay")
.SetValue(TimeSpan.FromSeconds(AutoRunDelay));
task.Descendants().First(d => d.Name.LocalName == "Principals").Descendants().First(d => d.Name.LocalName == "Principal").Descendants().First(d => d.Name.LocalName == "UserId")
.SetValue(System.Security.Principal.WindowsIdentity.GetCurrent().User.Value);
.SetValue(WindowsIdentity.GetCurrent().User.Value);
task.Descendants().First(d => d.Name.LocalName == "Actions").Descendants().First(d => d.Name.LocalName == "Exec").Descendants().First(d => d.Name.LocalName == "WorkingDirectory")
.SetValue(Constants.ApplicationFolder);