Meta - Updated Nuget packages

UI - Use Material Design filled input style where possible
This commit is contained in:
Robert committed 2021-04-07 19:27:57 +02:00
1 parent 5d6a2610b9
commit 20452110b1
39 files changed
+419 -460

No files matched your search

@@ -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>