mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-12 07:36:59 +00:00
cleanup
This commit is contained in:
parent
a67da7fd30
commit
bbd11d19d6
8 changed files with 22 additions and 38 deletions
|
|
@ -23,8 +23,6 @@ namespace Ryujinx.Ava.Systems.SetupWizard
|
||||||
}
|
}
|
||||||
|
|
||||||
protected SetupWizardPageBuilder NextPage()
|
protected SetupWizardPageBuilder NextPage()
|
||||||
{
|
=> new(presenter);
|
||||||
return new SetupWizardPageBuilder(presenter);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using Ryujinx.Ava.Systems.SetupWizard;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
@ -17,16 +16,15 @@ namespace Ryujinx.Ava.Systems.SetupWizard
|
||||||
public bool IsFirstPage { get; } = isFirstPage;
|
public bool IsFirstPage { get; } = isFirstPage;
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private string? _title;
|
public partial string? Title { get; set; }
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private object? _content;
|
public partial object? Content { get; set; }
|
||||||
|
|
||||||
|
[ObservableProperty] public partial object? HelpContent { get; set; } = "test";
|
||||||
|
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
private object? _helpContent;
|
public partial object? ActionContent { get; set; } = LocaleManager.Instance[LocaleKeys.SetupWizardActionNext];
|
||||||
|
|
||||||
[ObservableProperty]
|
|
||||||
private object? _actionContent = LocaleManager.Instance[LocaleKeys.SetupWizardActionNext];
|
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void MoveBack()
|
private void MoveBack()
|
||||||
|
|
@ -44,15 +42,14 @@ namespace Ryujinx.Ava.Systems.SetupWizard
|
||||||
|
|
||||||
public async ValueTask<bool> Show(ContentPresenter presenter)
|
public async ValueTask<bool> Show(ContentPresenter presenter)
|
||||||
{
|
{
|
||||||
presenter.Content = new SetupWizardPageView
|
presenter.Content = new SetupWizardPageView { DataContext = this, };
|
||||||
{
|
|
||||||
DataContext = this,
|
|
||||||
};
|
|
||||||
|
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
await Task.Delay(-1, _cancellationTokenSource.Token);
|
await Task.Delay(-1, _cancellationTokenSource.Token);
|
||||||
}
|
}
|
||||||
catch (TaskCanceledException) {
|
catch (TaskCanceledException)
|
||||||
|
{
|
||||||
return _result ?? false;
|
return _result ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Controls.Presenters;
|
using Avalonia.Controls.Presenters;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.Systems.SetupWizard;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.Systems.SetupWizard
|
namespace Ryujinx.Ava.Systems.SetupWizard
|
||||||
|
|
@ -28,7 +27,8 @@ namespace Ryujinx.Ava.Systems.SetupWizard
|
||||||
|
|
||||||
public SetupWizardPageBuilder WithContent(object? content)
|
public SetupWizardPageBuilder WithContent(object? content)
|
||||||
{
|
{
|
||||||
if (content is StyledElement { Parent: ContentControl parent }) {
|
if (content is StyledElement { Parent: ContentControl parent })
|
||||||
|
{
|
||||||
parent.Content = null;
|
parent.Content = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -36,7 +36,8 @@ namespace Ryujinx.Ava.Systems.SetupWizard
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SetupWizardPageBuilder WithHelpContent(LocaleKeys content) => WithHelpContent(LocaleManager.Instance[content]);
|
public SetupWizardPageBuilder WithHelpContent(LocaleKeys content) =>
|
||||||
|
WithHelpContent(LocaleManager.Instance[content]);
|
||||||
|
|
||||||
public SetupWizardPageBuilder WithHelpContent(object? content)
|
public SetupWizardPageBuilder WithHelpContent(object? content)
|
||||||
{
|
{
|
||||||
|
|
@ -46,14 +47,13 @@ namespace Ryujinx.Ava.Systems.SetupWizard
|
||||||
|
|
||||||
public SetupWizardPageBuilder WithContent<TControl>(object? context = null) where TControl : Control, new()
|
public SetupWizardPageBuilder WithContent<TControl>(object? context = null) where TControl : Control, new()
|
||||||
{
|
{
|
||||||
_page.Content = new TControl {
|
_page.Content = new TControl { DataContext = context };
|
||||||
DataContext = context
|
|
||||||
};
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SetupWizardPageBuilder WithActionContent(LocaleKeys content) => WithActionContent(LocaleManager.Instance[content]);
|
public SetupWizardPageBuilder WithActionContent(LocaleKeys content) =>
|
||||||
|
WithActionContent(LocaleManager.Instance[content]);
|
||||||
|
|
||||||
public SetupWizardPageBuilder WithActionContent(object? content)
|
public SetupWizardPageBuilder WithActionContent(object? content)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
||||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
|
||||||
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
|
|
||||||
xmlns:fa="using:Projektanker.Icons.Avalonia"
|
xmlns:fa="using:Projektanker.Icons.Avalonia"
|
||||||
xmlns:wiz="using:Ryujinx.Ava.Systems.SetupWizard"
|
xmlns:wiz="using:Ryujinx.Ava.Systems.SetupWizard"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
|
@ -15,7 +13,6 @@
|
||||||
<Grid RowDefinitions="Auto,*,Auto">
|
<Grid RowDefinitions="Auto,*,Auto">
|
||||||
<TextBlock Grid.Row="0"
|
<TextBlock Grid.Row="0"
|
||||||
TextWrapping="WrapWithOverflow"
|
TextWrapping="WrapWithOverflow"
|
||||||
FontFamily="{StaticResource HyliaGlyph}"
|
|
||||||
FontSize="46"
|
FontSize="46"
|
||||||
Text="{Binding Title}" />
|
Text="{Binding Title}" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
using Avalonia;
|
|
||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Markup.Xaml;
|
|
||||||
using Ryujinx.Ava.Systems.SetupWizard;
|
|
||||||
using Ryujinx.Ava.UI.Controls;
|
using Ryujinx.Ava.UI.Controls;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.Systems.SetupWizard
|
namespace Ryujinx.Ava.Systems.SetupWizard
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ using Avalonia.Controls;
|
||||||
using Avalonia.Platform.Storage;
|
using Avalonia.Platform.Storage;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using Ryujinx.Ava;
|
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.Systems.Configuration;
|
using Ryujinx.Ava.Systems.Configuration;
|
||||||
using Ryujinx.Ava.Systems.SetupWizard;
|
using Ryujinx.Ava.Systems.SetupWizard;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using Ryujinx.Ava.UI.SetupWizard;
|
|
||||||
using Ryujinx.Ava.UI.SetupWizard.Pages;
|
using Ryujinx.Ava.UI.SetupWizard.Pages;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
using Ryujinx.Ava;
|
|
||||||
using Ryujinx.Ava.Systems.Configuration;
|
using Ryujinx.Ava.Systems.Configuration;
|
||||||
using Ryujinx.Ava.Systems.SetupWizard;
|
using Ryujinx.Ava.Systems.SetupWizard;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
using Ryujinx.Ava.UI.SetupWizard;
|
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using Ryujinx.Ava.UI.Windows;
|
using Ryujinx.Ava.UI.Windows;
|
||||||
using Ryujinx.Common.Configuration;
|
using Ryujinx.Common.Configuration;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue