mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-06 17:49:43 +00:00
Buttons
This commit is contained in:
parent
c547a7d4f2
commit
c9e15b31b7
2 changed files with 13 additions and 62 deletions
|
@ -28,55 +28,9 @@
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="5"
|
CornerRadius="5"
|
||||||
Padding="2.5">
|
Padding="2.5">
|
||||||
<!--
|
|
||||||
<ScrollViewer
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
HorizontalScrollBarVisibility="Auto"
|
|
||||||
VerticalScrollBarVisibility="Auto">
|
|
||||||
<DataGrid
|
|
||||||
Name="DlcDataGrid"
|
|
||||||
MinHeight="200"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
Items="{Binding DownloadableContents}"
|
|
||||||
SelectionMode="Extended">
|
|
||||||
<DataGrid.Columns>
|
|
||||||
<DataGridTemplateColumn Width="90">
|
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataTemplate
|
|
||||||
DataType="models:DownloadableContentModel">
|
|
||||||
<CheckBox
|
|
||||||
Width="50"
|
|
||||||
MinWidth="40"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
IsChecked="{Binding Enabled}" />
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataGridTemplateColumn.Header>
|
|
||||||
<TextBlock Text="{locale:Locale DlcManagerTableHeadingEnabledLabel}" />
|
|
||||||
</DataGridTemplateColumn.Header>
|
|
||||||
</DataGridTemplateColumn>
|
|
||||||
<DataGridTextColumn Width="140" Binding="{Binding TitleId}">
|
|
||||||
<DataGridTextColumn.Header>
|
|
||||||
<TextBlock Text="{locale:Locale DlcManagerTableHeadingTitleIdLabel}" />
|
|
||||||
</DataGridTextColumn.Header>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Width="280" Binding="{Binding FullPath}">
|
|
||||||
<DataGridTextColumn.Header>
|
|
||||||
<TextBlock Text="{locale:Locale DlcManagerTableHeadingFullPathLabel}" />
|
|
||||||
</DataGridTextColumn.Header>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Binding="{Binding ContainerPath}">
|
|
||||||
<DataGridTextColumn.Header>
|
|
||||||
<TextBlock Text="{locale:Locale DlcManagerTableHeadingContainerPathLabel}" />
|
|
||||||
</DataGridTextColumn.Header>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
</DataGrid.Columns>
|
|
||||||
</DataGrid>
|
|
||||||
</ScrollViewer>
|
|
||||||
-->
|
|
||||||
<ListBox
|
<ListBox
|
||||||
VirtualizationMode="None"
|
VirtualizationMode="None"
|
||||||
|
SelectionMode="Multiple"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
SelectedItems="{Binding SelectedDLCs, Mode=TwoWay}"
|
SelectedItems="{Binding SelectedDLCs, Mode=TwoWay}"
|
||||||
Items="{Binding DownloadableContents}">
|
Items="{Binding DownloadableContents}">
|
||||||
|
@ -142,13 +96,6 @@
|
||||||
Command="{ReflectionBinding Add}">
|
Command="{ReflectionBinding Add}">
|
||||||
<TextBlock Text="{locale:Locale SettingsTabGeneralAdd}" />
|
<TextBlock Text="{locale:Locale SettingsTabGeneralAdd}" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
Name="RemoveButton"
|
|
||||||
MinWidth="90"
|
|
||||||
Margin="5"
|
|
||||||
Command="{ReflectionBinding RemoveSelected}">
|
|
||||||
<TextBlock Text="{locale:Locale SettingsTabGeneralRemove}" />
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
Name="RemoveAllButton"
|
Name="RemoveAllButton"
|
||||||
MinWidth="90"
|
MinWidth="90"
|
||||||
|
|
|
@ -4,9 +4,12 @@ using Avalonia.Styling;
|
||||||
using FluentAvalonia.UI.Controls;
|
using FluentAvalonia.UI.Controls;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
|
using Ryujinx.Ava.UI.Models;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using Ryujinx.HLE.FileSystem;
|
using Ryujinx.HLE.FileSystem;
|
||||||
|
using Ryujinx.Ui.Common.Helper;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Button = FluentAvalonia.UI.Controls.Button;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Windows
|
namespace Ryujinx.Ava.UI.Windows
|
||||||
{
|
{
|
||||||
|
@ -27,7 +30,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
RemoveButton.IsEnabled = false;
|
// RemoveButton.IsEnabled = false;
|
||||||
|
|
||||||
// DlcDataGrid.SelectionChanged += DlcDataGrid_SelectionChanged;
|
// DlcDataGrid.SelectionChanged += DlcDataGrid_SelectionChanged;
|
||||||
}
|
}
|
||||||
|
@ -51,11 +54,6 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
await ContentDialogHelper.ShowAsync(contentDialog);
|
await ContentDialogHelper.ShowAsync(contentDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DlcDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
||||||
{
|
|
||||||
// RemoveButton.IsEnabled = (DlcDataGrid.SelectedItems.Count > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SaveAndClose()
|
public void SaveAndClose()
|
||||||
{
|
{
|
||||||
ViewModel.Save();
|
ViewModel.Save();
|
||||||
|
@ -64,12 +62,18 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
private void RemoveDLC(object sender, RoutedEventArgs e)
|
private void RemoveDLC(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
ViewModel.RemoveSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenLocation(object sender, RoutedEventArgs e)
|
private void OpenLocation(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
if (sender is Button button)
|
||||||
|
{
|
||||||
|
if (button.DataContext is DownloadableContentModel model)
|
||||||
|
{
|
||||||
|
OpenHelper.LocateFile(model.ContainerPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue