2022-07-28 18:16:23 +01:00
|
|
|
<UserControl
|
2023-01-11 05:20:19 +00:00
|
|
|
x:Class="Ryujinx.Ava.UI.Views.User.UserEditorView"
|
2022-07-28 18:16:23 +01:00
|
|
|
xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2022-12-29 14:24:05 +00:00
|
|
|
xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
|
2022-07-28 18:16:23 +01:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
2023-01-11 05:20:19 +00:00
|
|
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
2022-07-28 18:16:23 +01:00
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2022-12-29 14:24:05 +00:00
|
|
|
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
2023-01-11 05:20:19 +00:00
|
|
|
xmlns:models="clr-namespace:Ryujinx.Ava.UI.Models"
|
2022-07-28 18:16:23 +01:00
|
|
|
Margin="0"
|
2022-12-02 13:16:43 +00:00
|
|
|
MinWidth="500"
|
2022-07-28 18:16:23 +01:00
|
|
|
Padding="0"
|
2022-12-05 22:04:18 +00:00
|
|
|
mc:Ignorable="d"
|
2023-01-11 05:20:19 +00:00
|
|
|
Focusable="True"
|
|
|
|
x:CompileBindings="True"
|
|
|
|
x:DataType="models:TempProfile">
|
2022-07-24 18:38:38 +01:00
|
|
|
<UserControl.Resources>
|
2022-12-29 14:24:05 +00:00
|
|
|
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
|
2022-07-24 18:38:38 +01:00
|
|
|
</UserControl.Resources>
|
|
|
|
<Grid Margin="0">
|
|
|
|
<Grid.ColumnDefinitions>
|
2022-07-28 18:16:23 +01:00
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition />
|
2022-07-24 18:38:38 +01:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
2022-07-28 18:16:23 +01:00
|
|
|
<RowDefinition Height="*" />
|
|
|
|
<RowDefinition Height="Auto" />
|
2022-07-24 18:38:38 +01:00
|
|
|
</Grid.RowDefinitions>
|
2022-07-28 18:16:23 +01:00
|
|
|
<StackPanel
|
|
|
|
Grid.Row="0"
|
2023-01-11 05:20:19 +00:00
|
|
|
Grid.Column="0"
|
2022-07-28 18:16:23 +01:00
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
Orientation="Vertical"
|
|
|
|
Spacing="10">
|
2022-12-29 14:24:05 +00:00
|
|
|
<TextBlock Text="{locale:Locale UserProfilesName}" />
|
2022-07-28 18:16:23 +01:00
|
|
|
<TextBox
|
|
|
|
Name="NameBox"
|
|
|
|
Width="300"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
MaxLength="{Binding MaxProfileNameLength}"
|
2023-01-11 05:20:19 +00:00
|
|
|
Watermark="{locale:Locale ProfileNameSelectionWatermark}"
|
2022-07-28 18:16:23 +01:00
|
|
|
Text="{Binding Name}" />
|
2022-12-29 14:24:05 +00:00
|
|
|
<TextBlock Name="IdText" Text="{locale:Locale UserProfilesUserId}" />
|
2023-01-11 05:20:19 +00:00
|
|
|
<TextBox
|
|
|
|
Name="IdLabel"
|
|
|
|
Width="300"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
IsReadOnly="True"
|
|
|
|
Text="{Binding UserIdString}" />
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.Column="1"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
Orientation="Vertical">
|
|
|
|
<Border
|
|
|
|
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
|
|
|
|
BorderThickness="1">
|
|
|
|
<Panel>
|
|
|
|
<ui:SymbolIcon
|
|
|
|
FontSize="60"
|
|
|
|
Width="96"
|
|
|
|
Height="96"
|
|
|
|
Margin="0"
|
|
|
|
Foreground="{DynamicResource AppListHoverBackgroundColor}"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
Symbol="Camera" />
|
|
|
|
<Image
|
|
|
|
Name="ProfileImage"
|
|
|
|
Width="96"
|
|
|
|
Height="96"
|
|
|
|
Margin="0"
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
Source="{Binding Image, Converter={StaticResource ByteImage}}" />
|
|
|
|
</Panel>
|
|
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
|
|
Grid.Row="1"
|
|
|
|
Grid.Column="0"
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Orientation="Horizontal"
|
|
|
|
Margin="0 24 0 0"
|
|
|
|
Spacing="10">
|
|
|
|
<Button
|
|
|
|
Width="50"
|
|
|
|
MinWidth="50"
|
|
|
|
Click="BackButton_Click">
|
|
|
|
<ui:SymbolIcon Symbol="Back" />
|
|
|
|
</Button>
|
2022-07-24 18:38:38 +01:00
|
|
|
</StackPanel>
|
2022-07-28 18:16:23 +01:00
|
|
|
<StackPanel
|
|
|
|
Grid.Row="1"
|
|
|
|
Grid.Column="0"
|
|
|
|
Grid.ColumnSpan="2"
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
Orientation="Horizontal"
|
2023-01-11 05:20:19 +00:00
|
|
|
Margin="0 24 0 0"
|
2022-07-28 18:16:23 +01:00
|
|
|
Spacing="10">
|
2023-01-11 05:20:19 +00:00
|
|
|
<Button
|
|
|
|
Name="DeleteButton"
|
|
|
|
Click="DeleteButton_Click"
|
|
|
|
Content="{locale:Locale UserProfilesDelete}" />
|
|
|
|
<Button
|
|
|
|
Name="ChangePictureButton"
|
|
|
|
Click="ChangePictureButton_Click"
|
|
|
|
Content="{locale:Locale UserProfilesChangeProfileImage}" />
|
|
|
|
<Button
|
|
|
|
Name="AddPictureButton"
|
|
|
|
Click="ChangePictureButton_Click"
|
|
|
|
Content="{locale:Locale UserProfilesSetProfileImage}" />
|
2022-07-28 18:16:23 +01:00
|
|
|
<Button
|
|
|
|
Name="SaveButton"
|
|
|
|
Click="SaveButton_Click"
|
2022-12-29 14:24:05 +00:00
|
|
|
Content="{locale:Locale Save}" />
|
2022-07-24 18:38:38 +01:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
2023-01-11 05:20:19 +00:00
|
|
|
</UserControl>
|