SaveManager.axaml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:controls="clr-namespace:Ryujinx.Ava.Ui.Controls"
  6. xmlns:models="clr-namespace:Ryujinx.Ava.Ui.Models"
  7. xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
  8. xmlns:locale="clr-namespace:Ryujinx.Ava.Common.Locale"
  9. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  10. Height="400"
  11. Width="550"
  12. x:Class="Ryujinx.Ava.Ui.Controls.SaveManager"
  13. Focusable="True">
  14. <UserControl.Resources>
  15. <controls:BitmapArrayValueConverter x:Key="ByteImage" />
  16. </UserControl.Resources>
  17. <Grid>
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="Auto" />
  20. <RowDefinition />
  21. </Grid.RowDefinitions>
  22. <Grid Grid.Row="0" HorizontalAlignment="Stretch">
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition Width="Auto" />
  25. <ColumnDefinition />
  26. </Grid.ColumnDefinitions>
  27. <StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
  28. <Label Content="{locale:Locale CommonSort}" VerticalAlignment="Center" />
  29. <ComboBox SelectedIndex="{Binding SortIndex}" Width="100">
  30. <ComboBoxItem>
  31. <Label VerticalAlignment="Center" HorizontalContentAlignment="Left"
  32. Content="{locale:Locale Name}" />
  33. </ComboBoxItem>
  34. <ComboBoxItem>
  35. <Label VerticalAlignment="Center" HorizontalContentAlignment="Left"
  36. Content="{locale:Locale Size}" />
  37. </ComboBoxItem>
  38. </ComboBox>
  39. <ComboBox SelectedIndex="{Binding OrderIndex}" Width="150">
  40. <ComboBoxItem>
  41. <Label VerticalAlignment="Center" HorizontalContentAlignment="Left"
  42. Content="{locale:Locale OrderAscending}" />
  43. </ComboBoxItem>
  44. <ComboBoxItem>
  45. <Label VerticalAlignment="Center" HorizontalContentAlignment="Left"
  46. Content="{locale:Locale Descending}" />
  47. </ComboBoxItem>
  48. </ComboBox>
  49. </StackPanel>
  50. <Grid Grid.Column="1" HorizontalAlignment="Stretch" Margin="10,0, 0, 0">
  51. <Grid.ColumnDefinitions>
  52. <ColumnDefinition Width="Auto"/>
  53. <ColumnDefinition/>
  54. </Grid.ColumnDefinitions>
  55. <Label Content="{locale:Locale Search}" VerticalAlignment="Center"/>
  56. <TextBox Margin="5,0,0,0" Grid.Column="1" HorizontalAlignment="Stretch" Text="{Binding Search}"/>
  57. </Grid>
  58. </Grid>
  59. <Border Grid.Row="1" Margin="0,5" BorderThickness="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  60. <ListBox Name="SaveList" Items="{Binding View}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  61. <ListBox.ItemTemplate>
  62. <DataTemplate x:DataType="models:SaveModel">
  63. <Grid HorizontalAlignment="Stretch" Margin="0,5">
  64. <Grid.ColumnDefinitions>
  65. <ColumnDefinition />
  66. <ColumnDefinition Width="Auto" />
  67. </Grid.ColumnDefinitions>
  68. <StackPanel Grid.Column="0" Orientation="Horizontal">
  69. <Border Height="42" Margin="2" Width="42" Padding="10"
  70. IsVisible="{Binding !InGameList}">
  71. <ui:SymbolIcon Symbol="Help" FontSize="30" HorizontalAlignment="Center"
  72. VerticalAlignment="Center" />
  73. </Border>
  74. <Image IsVisible="{Binding InGameList}"
  75. Margin="2"
  76. Width="42"
  77. Height="42"
  78. Source="{Binding Icon, Converter={StaticResource ByteImage}}" />
  79. <TextBlock MaxLines="3" Width="320" Margin="5" TextWrapping="Wrap"
  80. Text="{Binding Title}" VerticalAlignment="Center" />
  81. </StackPanel>
  82. <StackPanel Grid.Column="1" Spacing="10" HorizontalAlignment="Right"
  83. Orientation="Horizontal">
  84. <Label Content="{Binding SizeString}" IsVisible="{Binding SizeAvailable}"
  85. VerticalAlignment="Center" HorizontalAlignment="Right" />
  86. <Button VerticalAlignment="Center" HorizontalAlignment="Right" Padding="10"
  87. MinWidth="0" MinHeight="0" Name="OpenLocation" Command="{Binding OpenLocation}">
  88. <ui:SymbolIcon Symbol="OpenFolder" HorizontalAlignment="Center"
  89. VerticalAlignment="Center" />
  90. </Button>
  91. <Button VerticalAlignment="Center" HorizontalAlignment="Right" Padding="10"
  92. MinWidth="0" MinHeight="0" Name="Delete" Command="{Binding Delete}">
  93. <ui:SymbolIcon Symbol="Delete" HorizontalAlignment="Center"
  94. VerticalAlignment="Center" />
  95. </Button>
  96. </StackPanel>
  97. </Grid>
  98. </DataTemplate>
  99. </ListBox.ItemTemplate>
  100. </ListBox>
  101. </Border>
  102. </Grid>
  103. </UserControl>