mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
264 lines
18 KiB
XML
264 lines
18 KiB
XML
<UserControl x:Class="Artemis.UI.Screens.Settings.SettingsView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:s="https://github.com/canton7/Stylet"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:xaml="https://github.com/canton7/Stylet"
|
|
xmlns:settings="clr-namespace:Artemis.UI.Screens.Settings"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
mc:Ignorable="d"
|
|
d:DataContext="{d:DesignInstance settings:SettingsViewModel}"
|
|
d:DesignHeight="600" d:DesignWidth="600">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary
|
|
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TextBlock.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<TabControl Style="{StaticResource MaterialDesignTabControl}">
|
|
<TabItem Header="GENERAL" TextElement.Foreground="{DynamicResource MaterialDesignBody}">
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
|
<StackPanel Margin="15" MaxWidth="800">
|
|
<!-- General settings -->
|
|
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="0 15">General</TextBlock>
|
|
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch" Margin="0,0,5,0">
|
|
<StackPanel Margin="15">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}">Start up with Windows</TextBlock>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
|
<ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}" ToolTip="Default ToggleButton Style" />
|
|
</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 MaterialDesignBody1TextBlock}">Start up with Windows minimized</TextBlock>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
|
<ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}" ToolTip="Default ToggleButton Style" />
|
|
</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" VerticalAlignment="Center">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}">Debugger</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}">
|
|
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">
|
|
<Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action ShowDebugger}" Width="150">
|
|
SHOW DEBUGGER
|
|
</Button>
|
|
</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" VerticalAlignment="Center">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}">Logs</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}">
|
|
Opens the directory where logs are stored.
|
|
</TextBlock>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
|
<Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action ShowLogsFolder}" Width="150">
|
|
SHOW LOGS
|
|
</Button>
|
|
</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" VerticalAlignment="Center">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}">Application files</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}">
|
|
Opens the directory where application files like plugins and settings are stored.
|
|
</TextBlock>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
|
<Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action ShowDataFolder}" Width="150">
|
|
SHOW APP FILES
|
|
</Button>
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
</materialDesign:Card>
|
|
|
|
<!-- Rendering settings -->
|
|
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="0 15">Rendering</TextBlock>
|
|
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch" Margin="0,0,5,0">
|
|
<StackPanel Margin="15">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}">Render scale</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" TextWrapping="Wrap">
|
|
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">
|
|
<ComboBox Width="80" SelectedItem="{Binding SelectedRenderScale}" ItemsSource="{Binding RenderScales}" 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 MaterialDesignBody1TextBlock}">Target framerate</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" TextWrapping="Wrap">
|
|
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">
|
|
<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 MaterialDesignBody1TextBlock}">LED sample size</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}" 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>
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</TabItem>
|
|
<TabItem Header="PLUGINS" TextElement.Foreground="{DynamicResource MaterialDesignBody}">
|
|
<DockPanel Margin="15">
|
|
<TextBlock DockPanel.Dock="Top">The list below shows all loaded plugins. You can't really edit it right now. If you're missing something, view your logs folder.</TextBlock>
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
|
<DataGrid Margin="0 8 0 0"
|
|
ItemsSource="{Binding Plugins}"
|
|
CanUserSortColumns="True"
|
|
CanUserAddRows="False"
|
|
AutoGenerateColumns="False"
|
|
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"/>
|
|
<DataGridCheckBoxColumn Header="Enabled"
|
|
Binding="{Binding IsEnabled}"
|
|
ElementStyle="{StaticResource MaterialDesignDataGridCheckBoxColumnStyle}"
|
|
EditingElementStyle="{StaticResource MaterialDesignDataGridCheckBoxColumnEditingStyle}">
|
|
<DataGridCheckBoxColumn.HeaderStyle>
|
|
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}">
|
|
<Setter Property="HorizontalAlignment" Value="Right" />
|
|
<Setter Property="ContentTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding}" TextAlignment="Right" />
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</DataGridCheckBoxColumn.HeaderStyle>
|
|
</DataGridCheckBoxColumn>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</ScrollViewer>
|
|
</DockPanel>
|
|
</TabItem>
|
|
<TabItem Header="DEVICES" TextElement.Foreground="{DynamicResource MaterialDesignBody}">
|
|
<DockPanel Margin="15">
|
|
<TextBlock DockPanel.Dock="Top">Below you view and manage the devices that were detected by Artemis</TextBlock>
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Margin="0 12 0 0">
|
|
<ItemsControl ItemsSource="{Binding DeviceSettingsViewModels}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<ContentControl xaml:View.Model="{Binding}" Margin="5" HorizontalAlignment="Left" VerticalAlignment="Top" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</DockPanel>
|
|
</TabItem>
|
|
</TabControl>
|
|
</UserControl> |