mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Meta - Updated Nuget packages
UI - Use Material Design filled input style where possible
This commit is contained in:
1 parent
5d6a2610b9
commit
20452110b1
39 files changed
+419
-460
No files matched your search
@@ -197,8 +197,8 @@
|
||||
<materialDesign:PackIcon Kind="Message" />
|
||||
</Button>
|
||||
<Button ToolTip="Email" Command="{s:Action OpenUrl}" CommandParameter="https://github.com/SpoinkyNL/Artemis"
|
||||
Background="{DynamicResource SecondaryAccentBrush}"
|
||||
Foreground="{DynamicResource SecondaryAccentForegroundBrush}"
|
||||
Background="{DynamicResource SecondaryHueMidBrush}"
|
||||
Foreground="{DynamicResource SecondaryHueMidForegroundBrush}"
|
||||
>
|
||||
<materialDesign:PackIcon Kind="Email" />
|
||||
</Button>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}" Margin="0 15">Activation requirements</TextBlock>
|
||||
<TextBlock Margin="0 0 0 15" TextWrapping="Wrap" Style="{StaticResource MaterialDesignTextBlock}">
|
||||
This module has built-in activation requirements and won't activate until
|
||||
<Run Text="{Binding ActivationType}" FontWeight="Medium" Foreground="{StaticResource SecondaryAccentBrush}" />. <LineBreak />
|
||||
<Run Text="{Binding ActivationType}" FontWeight="Medium" Foreground="{StaticResource SecondaryHueMidBrush}" />. <LineBreak />
|
||||
These requirements allow the module creator to decide when the module is activated and you cannot override them.
|
||||
</TextBlock>
|
||||
|
||||
|
||||
@@ -14,14 +14,15 @@
|
||||
|
||||
<TextBox materialDesign:HintAssist.Hint="Profile name"
|
||||
Margin="0 8 0 16"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Width="300"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Text="{Binding ProfileName, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 8 8 0" Command="{s:Action Cancel}">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 8 0 0">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 0 8 0" Command="{s:Action Cancel}">
|
||||
CANCEL
|
||||
</Button>
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 8 0" Command="{s:Action Accept}">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 0 0 0" Command="{s:Action Accept}">
|
||||
ACCEPT
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
@@ -14,14 +14,15 @@
|
||||
|
||||
<TextBox materialDesign:HintAssist.Hint="Profile name"
|
||||
Margin="0 8 0 16"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Width="300"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Text="{Binding ProfileName, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 8 8 0" Command="{s:Action Cancel}">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 8 0 0">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 0 8 0" Command="{s:Action Cancel}">
|
||||
CANCEL
|
||||
</Button>
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 8 0" Command="{s:Action Accept}">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 0 0 0" Command="{s:Action Accept}">
|
||||
ACCEPT
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:s="https://github.com/canton7/Stylet"
|
||||
xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid Margin="16" Width="800">
|
||||
@@ -37,14 +38,16 @@
|
||||
the person who exported it, you'll have to select LEDs for each layer in the profile.
|
||||
</TextBlock>
|
||||
|
||||
<avalonedit:TextEditor Grid.Row="3" SyntaxHighlighting="JavaScript"
|
||||
FontFamily="pack://application:,,,/Resources/Fonts/#Roboto Mono"
|
||||
FontSize="10pt"
|
||||
Document="{Binding Document}"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Height="500"
|
||||
Padding="10" />
|
||||
<TextBox Grid.Row="3"
|
||||
Text="{Binding ProfileJson}"
|
||||
Style="{StaticResource MaterialDesignOutlinedTextBox}"
|
||||
FontFamily="Consolas"
|
||||
VerticalAlignment="Top"
|
||||
Height="400"
|
||||
AcceptsReturn="True"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
materialDesign:HintAssist.Hint="Paste profile JSON here"
|
||||
Margin="16" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="4">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 8 8 0" Command="{s:Action Cancel}">
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Artemis.Core.Modules;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.UI.Shared.Services;
|
||||
using ICSharpCode.AvalonEdit.Document;
|
||||
|
||||
namespace Artemis.UI.Screens.ProfileEditor.Dialogs
|
||||
{
|
||||
@@ -15,15 +14,13 @@ namespace Artemis.UI.Screens.ProfileEditor.Dialogs
|
||||
public ProfileImportViewModel(ProfileModule profileModule, IProfileService profileService, IMessageService messageService)
|
||||
{
|
||||
ProfileModule = profileModule;
|
||||
Document = new TextDocument();
|
||||
|
||||
_profileService = profileService;
|
||||
_messageService = messageService;
|
||||
}
|
||||
|
||||
public ProfileModule ProfileModule { get; }
|
||||
public TextDocument Document { get; set; }
|
||||
|
||||
|
||||
public string ProfileJson
|
||||
{
|
||||
get => _profileJson;
|
||||
@@ -32,7 +29,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Dialogs
|
||||
|
||||
public void Accept()
|
||||
{
|
||||
ProfileDescriptor descriptor = _profileService.ImportProfile(Document.Text, ProfileModule);
|
||||
ProfileDescriptor descriptor = _profileService.ImportProfile(ProfileJson, ProfileModule);
|
||||
_messageService.ShowMessage("Profile imported.");
|
||||
Session.Close(descriptor);
|
||||
}
|
||||
|
||||
@@ -15,25 +15,16 @@
|
||||
|
||||
<TextBox materialDesign:HintAssist.Hint="Element name"
|
||||
Margin="0 8 0 16"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Width="300"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Text="{Binding ElementName, UpdateSourceTrigger=PropertyChanged}"
|
||||
Loaded="FrameworkElement_OnLoaded" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 8 8 0" Command="{s:Action Cancel}">
|
||||
<Button.CommandParameter>
|
||||
<system:Boolean xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
False
|
||||
</system:Boolean>
|
||||
</Button.CommandParameter>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 8 0 0">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 0 8 0" Command="{s:Action Cancel}">
|
||||
CANCEL
|
||||
</Button>
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 8 0" Command="{s:Action Accept}">
|
||||
<Button.CommandParameter>
|
||||
<system:Boolean xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
True
|
||||
</system:Boolean>
|
||||
</Button.CommandParameter>
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 0 0 0" Command="{s:Action Accept}">
|
||||
ACCEPT
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
+15
-13
@@ -29,15 +29,16 @@
|
||||
Panel.ZIndex="2">
|
||||
<Grid Margin="10 5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="48" />
|
||||
<RowDefinition Height="48" />
|
||||
<RowDefinition Height="48" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Grid.Row="0"
|
||||
Style="{StaticResource MaterialDesignFloatingHintComboBox}"
|
||||
Style="{StaticResource MaterialDesignFilledComboBox}"
|
||||
Margin="0 5"
|
||||
materialDesign:HintAssist.Hint="Data binding mode"
|
||||
MinWidth="128"
|
||||
SelectedValue="{Binding SelectedDataBindingMode}"
|
||||
@@ -45,17 +46,18 @@
|
||||
SelectedValuePath="Value"
|
||||
DisplayMemberPath="Description" />
|
||||
|
||||
<StackPanel Grid.Row="1">
|
||||
<TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding EasingTime}"
|
||||
materialDesign:TextFieldAssist.HasClearButton="True"
|
||||
materialDesign:TextFieldAssist.SuffixText="ms"
|
||||
materialDesign:HintAssist.Hint="Easing time"
|
||||
IsEnabled="{Binding IsDataBindingEnabled}" />
|
||||
</StackPanel>
|
||||
<TextBox Grid.Row="1"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Margin="0 5"
|
||||
Text="{Binding EasingTime}"
|
||||
materialDesign:TextFieldAssist.HasClearButton="True"
|
||||
materialDesign:TextFieldAssist.SuffixText="ms"
|
||||
materialDesign:HintAssist.Hint="Easing time"
|
||||
IsEnabled="{Binding IsDataBindingEnabled}" />
|
||||
|
||||
<ComboBox Grid.Row="2"
|
||||
Style="{StaticResource MaterialDesignFloatingHintComboBox}"
|
||||
Style="{StaticResource MaterialDesignFilledComboBox}"
|
||||
Margin="0 5"
|
||||
materialDesign:HintAssist.Hint="Easing type"
|
||||
MinWidth="128"
|
||||
IsEnabled="{Binding IsEasingTimeEnabled}"
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
MouseUp="{s:Action TimelineMouseUp}"
|
||||
MouseMove="{s:Action TimelineMouseMove}"
|
||||
Points="-8,0 -8,8 0,20, 8,8 8,0"
|
||||
Fill="{StaticResource SecondaryAccentBrush}" />
|
||||
Fill="{StaticResource SecondaryHueMidBrush}" />
|
||||
<Line Canvas.Left="{Binding TimeCaretPosition}"
|
||||
Cursor="SizeWE"
|
||||
MouseDown="{s:Action TimelineMouseDown}"
|
||||
@@ -258,7 +258,7 @@
|
||||
Y1="0"
|
||||
Y2="{Binding ActualHeight, ElementName=TimelineHeaderScrollViewer}"
|
||||
StrokeThickness="2"
|
||||
Stroke="{StaticResource SecondaryAccentBrush}" />
|
||||
Stroke="{StaticResource SecondaryHueMidBrush}" />
|
||||
</Canvas>
|
||||
</ScrollViewer>
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
Y1="0"
|
||||
Y2="{Binding ActualHeight, ElementName=RailsGrid}"
|
||||
StrokeThickness="2"
|
||||
Stroke="{StaticResource SecondaryAccentBrush}" />
|
||||
Stroke="{StaticResource SecondaryHueMidBrush}" />
|
||||
</Canvas>
|
||||
|
||||
<ContentControl Grid.Column="0" s:View.Model="{Binding TimelineViewModel}" x:Name="PropertyTimeLine" />
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@
|
||||
|
||||
<TextBox materialDesign:HintAssist.Hint="Segment length"
|
||||
materialDesign:TextFieldAssist.SuffixText="seconds"
|
||||
Margin="0 8 0 16"
|
||||
Margin="0 16"
|
||||
Text="{Binding InputValue, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 8 8 0" Command="{s:Action Cancel}">
|
||||
@@ -29,7 +29,7 @@
|
||||
</Button.CommandParameter>
|
||||
CANCEL
|
||||
</Button>
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 8 0" Command="{s:Action Accept}">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 0 0" Command="{s:Action Accept}">
|
||||
<Button.CommandParameter>
|
||||
<system:Boolean xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
True
|
||||
|
||||
+2
-4
@@ -54,12 +54,10 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Timeline.Dialogs
|
||||
RuleFor(m => m.InputValue)
|
||||
.Must(ValidateTime)
|
||||
.WithMessage("Input cannot be converted to a time");
|
||||
RuleFor(m => m.InputValue)
|
||||
.Transform(CreateTime)
|
||||
Transform(m => m.InputValue, CreateTime)
|
||||
.GreaterThanOrEqualTo(TimeSpan.FromMilliseconds(100))
|
||||
.WithMessage("Minimum timeline length is 100ms");
|
||||
RuleFor(m => m.InputValue)
|
||||
.Transform(CreateTime)
|
||||
Transform(m => m.InputValue, CreateTime)
|
||||
.LessThanOrEqualTo(TimeSpan.FromHours(24))
|
||||
.WithMessage("Maximum timeline length is 24 hours");
|
||||
}
|
||||
|
||||
+9
-9
@@ -45,28 +45,28 @@
|
||||
<!-- Mutation points -->
|
||||
<Rectangle x:Name="ResizeTopCenter"
|
||||
Fill="White"
|
||||
Stroke="{DynamicResource SecondaryAccentBrush}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
Cursor="Hand"
|
||||
MouseDown="ResizeOnMouseDown"
|
||||
MouseUp="ResizeOnMouseUp"
|
||||
MouseMove="ResizeOnMouseMove" />
|
||||
<Rectangle x:Name="ResizeRightCenter"
|
||||
Fill="White"
|
||||
Stroke="{DynamicResource SecondaryAccentBrush}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
Cursor="Hand"
|
||||
MouseDown="ResizeOnMouseDown"
|
||||
MouseUp="ResizeOnMouseUp"
|
||||
MouseMove="ResizeOnMouseMove" />
|
||||
<Rectangle x:Name="ResizeBottomCenter"
|
||||
Fill="White"
|
||||
Stroke="{DynamicResource SecondaryAccentBrush}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
Cursor="Hand"
|
||||
MouseDown="ResizeOnMouseDown"
|
||||
MouseUp="ResizeOnMouseUp"
|
||||
MouseMove="ResizeOnMouseMove" />
|
||||
<Rectangle x:Name="ResizeLeftCenter"
|
||||
Fill="White"
|
||||
Stroke="{DynamicResource SecondaryAccentBrush}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
Cursor="Hand"
|
||||
MouseDown="ResizeOnMouseDown"
|
||||
MouseUp="ResizeOnMouseUp"
|
||||
@@ -74,28 +74,28 @@
|
||||
|
||||
<Rectangle x:Name="ResizeTopLeft"
|
||||
Fill="White"
|
||||
Stroke="{DynamicResource SecondaryAccentBrush}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
Cursor="Hand"
|
||||
MouseDown="ResizeOnMouseDown"
|
||||
MouseUp="ResizeOnMouseUp"
|
||||
MouseMove="ResizeOnMouseMove" />
|
||||
<Rectangle x:Name="ResizeTopRight"
|
||||
Fill="White"
|
||||
Stroke="{DynamicResource SecondaryAccentBrush}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
Cursor="Hand"
|
||||
MouseDown="ResizeOnMouseDown"
|
||||
MouseUp="ResizeOnMouseUp"
|
||||
MouseMove="ResizeOnMouseMove" />
|
||||
<Rectangle x:Name="ResizeBottomRight"
|
||||
Fill="White"
|
||||
Stroke="{DynamicResource SecondaryAccentBrush}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
Cursor="Hand"
|
||||
MouseDown="ResizeOnMouseDown"
|
||||
MouseUp="ResizeOnMouseUp"
|
||||
MouseMove="ResizeOnMouseMove" />
|
||||
<Rectangle x:Name="ResizeBottomLeft"
|
||||
Fill="White"
|
||||
Stroke="{DynamicResource SecondaryAccentBrush}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
Cursor="Hand"
|
||||
MouseDown="ResizeOnMouseDown"
|
||||
MouseUp="ResizeOnMouseUp"
|
||||
@@ -104,7 +104,7 @@
|
||||
<!-- Anchor point -->
|
||||
<Ellipse x:Name="AnchorPoint"
|
||||
Fill="White"
|
||||
Stroke="{DynamicResource SecondaryAccentBrush}"
|
||||
Stroke="{DynamicResource SecondaryHueMidBrush}"
|
||||
Cursor="SizeAll"
|
||||
MouseDown="MoveOnMouseDown"
|
||||
MouseUp="MoveOnMouseUp"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
@@ -20,6 +19,7 @@ using MaterialDesignExtensions.Controls;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using Ninject;
|
||||
using Stylet;
|
||||
using Constants = Artemis.Core.Constants;
|
||||
|
||||
namespace Artemis.UI.Screens
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@ using Ookii.Dialogs.Wpf;
|
||||
using RGB.NET.Layout;
|
||||
using SkiaSharp;
|
||||
using Stylet;
|
||||
using Constants = Artemis.Core.Constants;
|
||||
|
||||
namespace Artemis.UI.Screens.Settings.Device
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="40"/>
|
||||
<ColumnDefinition Width="40" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0">
|
||||
@@ -35,22 +35,22 @@
|
||||
<TextBox materialDesign:HintAssist.Hint="X-coordinate"
|
||||
materialDesign:TextFieldAssist.SuffixText="mm"
|
||||
Text="{Binding X, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Margin="0 5" />
|
||||
<TextBox materialDesign:HintAssist.Hint="Y-coordinate"
|
||||
materialDesign:TextFieldAssist.SuffixText="mm"
|
||||
Text="{Binding Y, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Margin="0 5" />
|
||||
<TextBox materialDesign:HintAssist.Hint="Scale"
|
||||
materialDesign:TextFieldAssist.SuffixText="times"
|
||||
Text="{Binding Scale, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Margin="0 5" />
|
||||
<TextBox materialDesign:HintAssist.Hint="Rotation"
|
||||
materialDesign:TextFieldAssist.SuffixText="deg"
|
||||
Text="{Binding Rotation, UpdateSourceTrigger=PropertyChanged}"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Margin="0 5 0 12" />
|
||||
</StackPanel>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
Use the sliders below to adjust the colors of your device so that it matches your other devices.
|
||||
</TextBlock>
|
||||
|
||||
<Grid>
|
||||
<Grid Margin="0 3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -84,12 +84,14 @@
|
||||
VerticalAlignment="Center" />
|
||||
<TextBox Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Width="70"
|
||||
Text="{Binding RedScale, StringFormat={}{0:0.0}, UpdateSourceTrigger=PropertyChanged}"
|
||||
materialDesign:TextFieldAssist.SuffixText="%"
|
||||
Width="50" />
|
||||
materialDesign:HintAssist.IsFloating="False" />
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<Grid Margin="0 3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -105,12 +107,14 @@
|
||||
VerticalAlignment="Center" />
|
||||
<TextBox Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Width="70"
|
||||
Text="{Binding GreenScale, StringFormat={}{0:0.0}, UpdateSourceTrigger=PropertyChanged}"
|
||||
materialDesign:TextFieldAssist.SuffixText="%"
|
||||
Width="50" />
|
||||
materialDesign:HintAssist.IsFloating="False" />
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<Grid Margin="0 2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -127,12 +131,14 @@
|
||||
VerticalAlignment="Center" />
|
||||
<TextBox Grid.Column="2"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Width="70"
|
||||
Text="{Binding BlueScale, StringFormat={}{0:0.0}, UpdateSourceTrigger=PropertyChanged}"
|
||||
materialDesign:TextFieldAssist.SuffixText="%"
|
||||
Width="50" />
|
||||
materialDesign:HintAssist.IsFloating="False" />
|
||||
</Grid>
|
||||
|
||||
<Grid Margin="0 28 0 0">
|
||||
<Grid Margin="0 3 0 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
@@ -142,9 +148,9 @@
|
||||
Content="Show preview"
|
||||
VerticalAlignment="Center" />
|
||||
<shared:ColorPicker Grid.Column="1"
|
||||
Margin="0,0,5,0"
|
||||
HorizontalAlignment="Right"
|
||||
Color="{Binding CurrentColor, Converter={StaticResource SKColorToColorConverter}}"
|
||||
TextBoxStyle="{StaticResource MaterialDesignFilledTextBox}"
|
||||
VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
@@ -161,7 +167,7 @@
|
||||
Select a custom layout below if you want to change the appearance and/or LEDs of this device.
|
||||
</TextBlock>
|
||||
|
||||
<TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
<TextBox Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Text="{Binding Device.CustomLayoutPath}"
|
||||
VerticalAlignment="Center"
|
||||
materialDesign:TextFieldAssist.HasClearButton="True"
|
||||
@@ -177,15 +183,15 @@
|
||||
</StackPanel>
|
||||
|
||||
<!-- Buttons -->
|
||||
<Grid Grid.Row="1" >
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0"
|
||||
Style="{StaticResource MaterialDesignOutlinedButton}"
|
||||
Margin="0 8 8 0"
|
||||
Command="{s:Action SelectPhysicalLayout}"
|
||||
<Button Grid.Column="0"
|
||||
Style="{StaticResource MaterialDesignOutlinedButton}"
|
||||
Margin="0 8 8 0"
|
||||
Command="{s:Action SelectPhysicalLayout}"
|
||||
ToolTip="Restart device setup, allowing you to select a new physical and logical layout">
|
||||
RESTART SETUP
|
||||
</Button>
|
||||
@@ -199,6 +205,6 @@
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -77,7 +77,11 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<TextBox Text="{Binding AutoRunDelay}" IsEnabled="{Binding StartWithWindows}" Width="80" materialDesign:TextFieldAssist.SuffixText="sec"/>
|
||||
<TextBox Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
Text="{Binding AutoRunDelay}"
|
||||
IsEnabled="{Binding StartWithWindows}"
|
||||
Width="100"
|
||||
materialDesign:TextFieldAssist.SuffixText="sec"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
|
||||
@@ -98,7 +102,12 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ComboBox Width="80" SelectedValue="{Binding SelectedColorScheme}" ItemsSource="{Binding ColorSchemes}" SelectedValuePath="Value" DisplayMemberPath="Description" />
|
||||
<ComboBox Style="{StaticResource MaterialDesignFilledComboBox}"
|
||||
Width="100"
|
||||
SelectedValue="{Binding SelectedColorScheme}"
|
||||
ItemsSource="{Binding ColorSchemes}"
|
||||
SelectedValuePath="Value"
|
||||
DisplayMemberPath="Description" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
|
||||
@@ -119,7 +128,12 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ComboBox Width="80" SelectedValue="{Binding SelectedLogLevel}" ItemsSource="{Binding LogLevels}" SelectedValuePath="Value" DisplayMemberPath="Description" />
|
||||
<ComboBox Style="{StaticResource MaterialDesignFilledComboBox}"
|
||||
Width="100"
|
||||
SelectedValue="{Binding SelectedLogLevel}"
|
||||
ItemsSource="{Binding LogLevels}"
|
||||
SelectedValuePath="Value"
|
||||
DisplayMemberPath="Description" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
|
||||
@@ -169,7 +183,7 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<TextBox Text="{Binding WebServerPortSetting.Value}" Width="80" />
|
||||
<TextBox Style="{StaticResource MaterialDesignFilledTextBox}" Text="{Binding WebServerPortSetting.Value}" Width="100" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
@@ -287,10 +301,8 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ComboBox Width="132"
|
||||
Margin="0 2"
|
||||
Padding="0 -1"
|
||||
Height="15"
|
||||
<ComboBox Style="{StaticResource MaterialDesignFilledComboBox}"
|
||||
Width="150"
|
||||
materialDesign:ComboBoxAssist.ClassicMode="True"
|
||||
materialDesign:ValidationAssist.UsePopup="True"
|
||||
HorizontalAlignment="Left"
|
||||
@@ -324,7 +336,9 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ComboBox Width="80" SelectedItem="{Binding PreferredGraphicsContext}" >
|
||||
<ComboBox Style="{StaticResource MaterialDesignFilledComboBox}"
|
||||
Width="100"
|
||||
SelectedItem="{Binding PreferredGraphicsContext}" >
|
||||
<system:String>Software</system:String>
|
||||
<system:String>Vulkan</system:String>
|
||||
</ComboBox>
|
||||
@@ -348,7 +362,11 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ComboBox Width="80" SelectedItem="{Binding SelectedRenderScale}" ItemsSource="{Binding RenderScales}" DisplayMemberPath="Item1" />
|
||||
<ComboBox Style="{StaticResource MaterialDesignFilledComboBox}"
|
||||
Width="100"
|
||||
SelectedItem="{Binding SelectedRenderScale}"
|
||||
ItemsSource="{Binding RenderScales}"
|
||||
DisplayMemberPath="Item1" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
|
||||
@@ -369,7 +387,11 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<ComboBox Width="80" SelectedItem="{Binding SelectedTargetFrameRate}" ItemsSource="{Binding TargetFrameRates}" DisplayMemberPath="Item1" />
|
||||
<ComboBox Style="{StaticResource MaterialDesignFilledComboBox}"
|
||||
Width="100"
|
||||
SelectedItem="{Binding SelectedTargetFrameRate}"
|
||||
ItemsSource="{Binding TargetFrameRates}"
|
||||
DisplayMemberPath="Item1" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
||||
@@ -25,10 +25,15 @@
|
||||
The list below shows all loaded plugins. <LineBreak />
|
||||
If you're missing something, view your logs folder.
|
||||
</TextBlock>
|
||||
<materialDesign:PackIcon Grid.Column="1" Kind="Search" VerticalAlignment="Top" Margin="15 5 0 0" />
|
||||
<materialDesign:PackIcon Grid.Column="1"
|
||||
Kind="Search"
|
||||
VerticalAlignment="Top"
|
||||
Margin="15 8 0 0" />
|
||||
<TextBox Grid.Column="2"
|
||||
Style="{StaticResource MaterialDesignFilledTextBox}"
|
||||
materialDesign:TextFieldAssist.HasClearButton="True"
|
||||
materialDesign:HintAssist.Hint="Search plugin"
|
||||
materialDesign:HintAssist.IsFloating="False"
|
||||
VerticalAlignment="Top"
|
||||
Margin="5 0"
|
||||
Text="{Binding SearchPluginInput, Delay=300, UpdateSourceTrigger=PropertyChanged}" />
|
||||
@@ -51,7 +56,7 @@
|
||||
Margin="15 0 15 15">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ContentControl s:View.Model="{Binding IsAsync=True}" Margin="5" HorizontalAlignment="Center" IsTabStop="False" />
|
||||
<ContentControl s:View.Model="{Binding IsAsync=True}" Margin="5" HorizontalAlignment="Center" IsTabStop="False" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
<ListBox.ItemsPanel>
|
||||
|
||||
@@ -11,6 +11,7 @@ using Artemis.UI.Shared.Services;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using Ninject;
|
||||
using Stylet;
|
||||
using Constants = Artemis.Core.Constants;
|
||||
|
||||
namespace Artemis.UI.Screens.Settings.Tabs.Plugins
|
||||
{
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<UserControl x:Class="Artemis.UI.Screens.SurfaceEditor.Dialogs.SurfaceCreateView"
|
||||
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:s="https://github.com/canton7/Stylet"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="213.053" d:DesignWidth="254.425">
|
||||
<StackPanel Margin="16">
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}">
|
||||
Add a new surface layout
|
||||
</TextBlock>
|
||||
|
||||
<TextBox materialDesign:HintAssist.Hint="Layout name"
|
||||
Margin="0 8 0 16"
|
||||
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
|
||||
Text="{Binding SurfaceName, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsCancel="True" Margin="0 8 8 0"
|
||||
Command="{s:Action Cancel}">
|
||||
<Button.CommandParameter>
|
||||
<system:Boolean xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
False
|
||||
</system:Boolean>
|
||||
</Button.CommandParameter>
|
||||
CANCEL
|
||||
</Button>
|
||||
<Button Style="{StaticResource MaterialDesignFlatButton}" IsDefault="True" Margin="0 8 8 0"
|
||||
Command="{s:Action Accept}">
|
||||
<Button.CommandParameter>
|
||||
<system:Boolean xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
True
|
||||
</system:Boolean>
|
||||
</Button.CommandParameter>
|
||||
ACCEPT
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -1,31 +0,0 @@
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.UI.Shared.Services;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
|
||||
{
|
||||
public class SurfaceCreateViewModel : DialogViewModelBase
|
||||
{
|
||||
private string _surfaceName;
|
||||
|
||||
public SurfaceCreateViewModel(IModelValidator<SurfaceCreateViewModel> validator) : base(validator)
|
||||
{
|
||||
}
|
||||
|
||||
public string SurfaceName
|
||||
{
|
||||
get => _surfaceName;
|
||||
set => SetAndNotify(ref _surfaceName, value);
|
||||
}
|
||||
|
||||
public async Task Accept()
|
||||
{
|
||||
await ValidateAsync();
|
||||
|
||||
if (HasErrors)
|
||||
return;
|
||||
|
||||
Session.Close(SurfaceName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
|
||||
{
|
||||
public class SurfaceCreateViewModelValidator : AbstractValidator<SurfaceCreateViewModel>
|
||||
{
|
||||
public SurfaceCreateViewModelValidator()
|
||||
{
|
||||
RuleFor(m => m.SurfaceName).NotEmpty().WithMessage("Layout name may not be empty");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user