mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-22 15:27:10 +02:00
misc: chore: Move the windows that are shown via ContentDialogs out of Ryujinx.Ava.UI.Windows (they're not windows)
This commit is contained in:
parent
f3a9cecf72
commit
d87d3235e9
20 changed files with 45 additions and 46 deletions
|
@ -13,6 +13,7 @@ using Ryujinx.Ava.UI.Views.Misc;
|
|||
using Ryujinx.Ava.UI.Windows;
|
||||
using Ryujinx.Ava.Utilities;
|
||||
using Ryujinx.Ava.Systems.AppLibrary;
|
||||
using Ryujinx.Ava.UI.Views.Dialog;
|
||||
using Ryujinx.Common.Configuration;
|
||||
using Ryujinx.Common.Helper;
|
||||
using Ryujinx.HLE.HOS;
|
||||
|
@ -80,13 +81,13 @@ namespace Ryujinx.Ava.UI.Controls
|
|||
public async void OpenTitleUpdateManager_Click(object sender, RoutedEventArgs args)
|
||||
{
|
||||
if (sender is MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
|
||||
await TitleUpdateWindow.Show(viewModel.ApplicationLibrary, viewModel.SelectedApplication);
|
||||
await TitleUpdateManagerView.Show(viewModel.ApplicationLibrary, viewModel.SelectedApplication);
|
||||
}
|
||||
|
||||
public async void OpenDownloadableContentManager_Click(object sender, RoutedEventArgs args)
|
||||
{
|
||||
if (sender is MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
|
||||
await DownloadableContentManagerWindow.Show(viewModel.ApplicationLibrary, viewModel.SelectedApplication);
|
||||
await DownloadableContentManagerView.Show(viewModel.ApplicationLibrary, viewModel.SelectedApplication);
|
||||
}
|
||||
|
||||
public async void OpenCheatManager_Click(object sender, RoutedEventArgs args)
|
||||
|
@ -127,7 +128,7 @@ namespace Ryujinx.Ava.UI.Controls
|
|||
public async void OpenModManager_Click(object sender, RoutedEventArgs args)
|
||||
{
|
||||
if (sender is MenuItem { DataContext: MainWindowViewModel { SelectedApplication: not null } viewModel })
|
||||
await ModManagerWindow.Show(
|
||||
await ModManagerView.Show(
|
||||
viewModel.SelectedApplication.Id,
|
||||
viewModel.SelectedApplication.IdBase,
|
||||
viewModel.ApplicationLibrary,
|
||||
|
|
|
@ -2,9 +2,9 @@ using SkiaSharp;
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
namespace Ryujinx.Ava.UI.Helpers
|
||||
{
|
||||
static class IconColorPicker
|
||||
public static class IconColorPicker
|
||||
{
|
||||
private const int ColorsPerLine = 64;
|
||||
private const int TotalColors = ColorsPerLine * ColorsPerLine;
|
25
src/Ryujinx/UI/RyujinxApp.axaml
Normal file
25
src/Ryujinx/UI/RyujinxApp.axaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<Application
|
||||
x:Class="Ryujinx.Ava.RyujinxApp"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sty="using:FluentAvalonia.Styling">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary>
|
||||
<FontFamily x:Key="JetBrainsMono">avares://Ryujinx/Assets/Fonts/Mono/#JetBrains Mono</FontFamily>
|
||||
</ResourceDictionary>
|
||||
<MergeResourceInclude Source="/Assets/Styles/Themes.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
<Application.Styles>
|
||||
<sty:FluentAvaloniaTheme PreferUserAccentColor="True" PreferSystemTheme="False" />
|
||||
<StyleInclude Source="/Assets/Styles/Styles.xaml" />
|
||||
</Application.Styles>
|
||||
<NativeMenu.Menu>
|
||||
<NativeMenu>
|
||||
<NativeMenuItem Header="About Ryujinx" Click="AboutRyujinx_OnClick" />
|
||||
</NativeMenu>
|
||||
</NativeMenu.Menu>
|
||||
</Application>
|
158
src/Ryujinx/UI/RyujinxApp.axaml.cs
Normal file
158
src/Ryujinx/UI/RyujinxApp.axaml.cs
Normal file
|
@ -0,0 +1,158 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Platform;
|
||||
using Avalonia.Styling;
|
||||
using Avalonia.Threading;
|
||||
using FluentAvalonia.UI.Windowing;
|
||||
using Gommon;
|
||||
using Ryujinx.Ava.Common;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.Helpers;
|
||||
using Ryujinx.Ava.UI.Windows;
|
||||
using Ryujinx.Ava.Utilities;
|
||||
using Ryujinx.Ava.Systems.Configuration;
|
||||
using Ryujinx.Ava.UI.Views.Dialog;
|
||||
using Ryujinx.Ava.UI.Views.Misc;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Logging;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Ryujinx.Ava
|
||||
{
|
||||
public class RyujinxApp : Application
|
||||
{
|
||||
public static event Action ThemeChanged;
|
||||
|
||||
internal static string FormatTitle(LocaleKeys? windowTitleKey = null, bool includeVersion = true)
|
||||
=> windowTitleKey is null
|
||||
? $"{FullAppName}{(includeVersion ? $" {Program.Version}" : string.Empty)}"
|
||||
: $"{FullAppName}{(includeVersion ? $" {Program.Version}" : string.Empty)} - {LocaleManager.Instance[windowTitleKey.Value]}";
|
||||
|
||||
public static readonly string FullAppName = string.Intern(ReleaseInformation.IsCanaryBuild ? "Ryujinx Canary" : "Ryujinx");
|
||||
|
||||
public static MainWindow MainWindow => Current!
|
||||
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>()
|
||||
.MainWindow.Cast<MainWindow>();
|
||||
|
||||
public static IClassicDesktopStyleApplicationLifetime AppLifetime => Current!
|
||||
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>();
|
||||
|
||||
public static bool IsClipboardAvailable(out IClipboard clipboard)
|
||||
{
|
||||
clipboard = MainWindow.Clipboard;
|
||||
return clipboard != null;
|
||||
}
|
||||
|
||||
public static void SetTaskbarProgress(TaskBarProgressBarState state) => MainWindow.PlatformFeatures.SetTaskBarProgressBarState(state);
|
||||
public static void SetTaskbarProgressValue(ulong current, ulong total) => MainWindow.PlatformFeatures.SetTaskBarProgressBarValue(current, total);
|
||||
public static void SetTaskbarProgressValue(long current, long total) => SetTaskbarProgressValue(Convert.ToUInt64(current), Convert.ToUInt64(total));
|
||||
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
Name = FormatTitle();
|
||||
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
|
||||
if (OperatingSystem.IsMacOS())
|
||||
{
|
||||
Process.Start("/usr/bin/defaults", "write org.ryujinx.Ryujinx ApplePressAndHoldEnabled -bool false");
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
{
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
desktop.MainWindow = new MainWindow();
|
||||
}
|
||||
|
||||
base.OnFrameworkInitializationCompleted();
|
||||
|
||||
if (Program.PreviewerDetached)
|
||||
{
|
||||
ApplyConfiguredTheme(ConfigurationState.Instance.UI.BaseStyle);
|
||||
|
||||
ConfigurationState.Instance.UI.BaseStyle.Event += ThemeChanged_Event;
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowRestartDialog()
|
||||
{
|
||||
_ = Dispatcher.UIThread.InvokeAsync(async () =>
|
||||
{
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
UserResult result = await ContentDialogHelper.CreateConfirmationDialog(
|
||||
LocaleManager.Instance[LocaleKeys.DialogThemeRestartMessage],
|
||||
LocaleManager.Instance[LocaleKeys.DialogThemeRestartSubMessage],
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogYes],
|
||||
LocaleManager.Instance[LocaleKeys.InputDialogNo],
|
||||
LocaleManager.Instance[LocaleKeys.DialogRestartRequiredMessage]);
|
||||
|
||||
if (result == UserResult.Yes)
|
||||
{
|
||||
_ = Process.Start(Environment.ProcessPath!, CommandLineState.Arguments);
|
||||
desktop.Shutdown();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void ThemeChanged_Event(object _, ReactiveEventArgs<string> rArgs) => ApplyConfiguredTheme(rArgs.NewValue);
|
||||
|
||||
public void ApplyConfiguredTheme(string baseStyle)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(baseStyle))
|
||||
{
|
||||
ConfigurationState.Instance.UI.BaseStyle.Value = "Auto";
|
||||
|
||||
baseStyle = ConfigurationState.Instance.UI.BaseStyle;
|
||||
}
|
||||
|
||||
ThemeChanged?.Invoke();
|
||||
|
||||
RequestedThemeVariant = baseStyle switch
|
||||
{
|
||||
"Auto" => DetectSystemTheme(),
|
||||
"Light" => ThemeVariant.Light,
|
||||
"Dark" => ThemeVariant.Dark,
|
||||
_ => ThemeVariant.Default,
|
||||
};
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Application, "Failed to apply theme. A restart is needed to apply the selected theme.");
|
||||
|
||||
ShowRestartDialog();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a PlatformThemeVariant value to the corresponding ThemeVariant value.
|
||||
/// </summary>
|
||||
public static ThemeVariant ConvertThemeVariant(PlatformThemeVariant platformThemeVariant) =>
|
||||
platformThemeVariant switch
|
||||
{
|
||||
PlatformThemeVariant.Dark => ThemeVariant.Dark,
|
||||
PlatformThemeVariant.Light => ThemeVariant.Light,
|
||||
_ => ThemeVariant.Default,
|
||||
};
|
||||
|
||||
public static ThemeVariant DetectSystemTheme() =>
|
||||
Current is RyujinxApp { PlatformSettings: not null } app
|
||||
? ConvertThemeVariant(app.PlatformSettings.GetColorValues().ThemeVariant)
|
||||
: ThemeVariant.Default;
|
||||
|
||||
private async void AboutRyujinx_OnClick(object sender, EventArgs e)
|
||||
{
|
||||
await AboutView.Show();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<UserControl
|
||||
x:Class="Ryujinx.Ava.UI.Windows.AboutWindow"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Dialog.AboutView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
@ -1,8 +1,6 @@
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Styling;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.Controls;
|
||||
|
@ -13,11 +11,11 @@ using Ryujinx.Common.Helper;
|
|||
using System.Threading.Tasks;
|
||||
using Button = Avalonia.Controls.Button;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
namespace Ryujinx.Ava.UI.Views.Dialog
|
||||
{
|
||||
public partial class AboutWindow : RyujinxControl<AboutWindowViewModel>
|
||||
public partial class AboutView : RyujinxControl<AboutWindowViewModel>
|
||||
{
|
||||
public AboutWindow()
|
||||
public AboutView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
@ -34,7 +32,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
PrimaryButtonText = string.Empty,
|
||||
SecondaryButtonText = string.Empty,
|
||||
CloseButtonText = LocaleManager.Instance[LocaleKeys.UserProfilesClose],
|
||||
Content = new AboutWindow { ViewModel = viewModel }
|
||||
Content = new AboutView { ViewModel = viewModel }
|
||||
};
|
||||
|
||||
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles());
|
|
@ -7,7 +7,7 @@
|
|||
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Misc.ApplicationDataView"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Dialog.ApplicationDataView"
|
||||
x:DataType="viewModels:ApplicationDataViewModel">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Margin="0"
|
|
@ -12,7 +12,7 @@ using Ryujinx.Ava.Systems.AppLibrary;
|
|||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.Misc
|
||||
namespace Ryujinx.Ava.UI.Views.Dialog
|
||||
{
|
||||
public partial class ApplicationDataView : RyujinxControl<ApplicationDataViewModel>
|
||||
{
|
|
@ -7,7 +7,7 @@
|
|||
xmlns:models="using:Ryujinx.Ava.Common.Models"
|
||||
xmlns:viewModels="using:Ryujinx.Ava.UI.ViewModels"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Misc.DlcSelectView"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Dialog.DlcSelectView"
|
||||
x:DataType="viewModels:DlcSelectViewModel">
|
||||
<Grid RowDefinitions="*,Auto,*">
|
||||
<TextBlock
|
|
@ -9,7 +9,7 @@ using Ryujinx.Ava.UI.ViewModels;
|
|||
using Ryujinx.Ava.Systems.AppLibrary;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Views.Misc
|
||||
namespace Ryujinx.Ava.UI.Views.Dialog
|
||||
{
|
||||
public partial class DlcSelectView : RyujinxControl<DlcSelectViewModel>
|
||||
{
|
|
@ -1,5 +1,5 @@
|
|||
<UserControl
|
||||
x:Class="Ryujinx.Ava.UI.Windows.DownloadableContentManagerWindow"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Dialog.DownloadableContentManagerView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
@ -9,20 +9,20 @@ using Ryujinx.Ava.Systems.AppLibrary;
|
|||
using Ryujinx.Common.Helper;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
namespace Ryujinx.Ava.UI.Views.Dialog
|
||||
{
|
||||
public partial class DownloadableContentManagerWindow : UserControl
|
||||
public partial class DownloadableContentManagerView : UserControl
|
||||
{
|
||||
public DownloadableContentManagerViewModel ViewModel;
|
||||
|
||||
public DownloadableContentManagerWindow()
|
||||
public DownloadableContentManagerView()
|
||||
{
|
||||
DataContext = this;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public DownloadableContentManagerWindow(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
|
||||
public DownloadableContentManagerView(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
|
||||
{
|
||||
DataContext = ViewModel = new DownloadableContentManagerViewModel(applicationLibrary, applicationData);
|
||||
|
||||
|
@ -36,7 +36,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
PrimaryButtonText = string.Empty,
|
||||
SecondaryButtonText = string.Empty,
|
||||
CloseButtonText = string.Empty,
|
||||
Content = new DownloadableContentManagerWindow(applicationLibrary, applicationData),
|
||||
Content = new DownloadableContentManagerView(applicationLibrary, applicationData),
|
||||
Title = string.Format(LocaleManager.Instance[LocaleKeys.DlcWindowTitle], applicationData.Name, applicationData.IdBaseString),
|
||||
};
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
Width="500"
|
||||
Height="380"
|
||||
mc:Ignorable="d"
|
||||
x:Class="Ryujinx.Ava.UI.Windows.ModManagerWindow"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Dialog.ModManagerView"
|
||||
x:CompileBindings="True"
|
||||
x:DataType="viewModels:ModManagerViewModel"
|
||||
Focusable="True">
|
|
@ -11,20 +11,20 @@ using Ryujinx.Common.Helper;
|
|||
using System.Threading.Tasks;
|
||||
using Button = Avalonia.Controls.Button;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
namespace Ryujinx.Ava.UI.Views.Dialog
|
||||
{
|
||||
public partial class ModManagerWindow : UserControl
|
||||
public partial class ModManagerView : UserControl
|
||||
{
|
||||
public readonly ModManagerViewModel ViewModel;
|
||||
|
||||
public ModManagerWindow()
|
||||
public ModManagerView()
|
||||
{
|
||||
DataContext = this;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ModManagerWindow(ulong titleId, ulong titleIdBase, ApplicationLibrary applicationLibrary)
|
||||
public ModManagerView(ulong titleId, ulong titleIdBase, ApplicationLibrary applicationLibrary)
|
||||
{
|
||||
DataContext = ViewModel = new ModManagerViewModel(titleId, titleIdBase, applicationLibrary);
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
PrimaryButtonText = string.Empty,
|
||||
SecondaryButtonText = string.Empty,
|
||||
CloseButtonText = string.Empty,
|
||||
Content = new ModManagerWindow(titleId, titleIdBase, appLibrary),
|
||||
Content = new ModManagerView(titleId, titleIdBase, appLibrary),
|
||||
Title = string.Format(LocaleManager.Instance[LocaleKeys.ModWindowTitle], titleName, titleId.ToString("X16")),
|
||||
};
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<UserControl
|
||||
x:Class="Ryujinx.Ava.UI.Windows.TitleUpdateWindow"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Dialog.TitleUpdateManagerView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
@ -9,20 +9,20 @@ using Ryujinx.Ava.Systems.AppLibrary;
|
|||
using Ryujinx.Common.Helper;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
namespace Ryujinx.Ava.UI.Views.Dialog
|
||||
{
|
||||
public partial class TitleUpdateWindow : UserControl
|
||||
public partial class TitleUpdateManagerView : UserControl
|
||||
{
|
||||
public readonly TitleUpdateViewModel ViewModel;
|
||||
|
||||
public TitleUpdateWindow()
|
||||
public TitleUpdateManagerView()
|
||||
{
|
||||
DataContext = this;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public TitleUpdateWindow(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
|
||||
public TitleUpdateManagerView(ApplicationLibrary applicationLibrary, ApplicationData applicationData)
|
||||
{
|
||||
DataContext = ViewModel = new TitleUpdateViewModel(applicationLibrary, applicationData);
|
||||
|
||||
|
@ -36,7 +36,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
PrimaryButtonText = string.Empty,
|
||||
SecondaryButtonText = string.Empty,
|
||||
CloseButtonText = string.Empty,
|
||||
Content = new TitleUpdateWindow(applicationLibrary, applicationData),
|
||||
Content = new TitleUpdateManagerView(applicationLibrary, applicationData),
|
||||
Title = LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.GameUpdateWindowHeading, applicationData.Name, applicationData.IdBaseString),
|
||||
};
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<UserControl
|
||||
x:Class="Ryujinx.Ava.UI.Windows.XCITrimmerWindow"
|
||||
x:Class="Ryujinx.Ava.UI.Views.Dialog.XciTrimmerView"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
@ -8,20 +8,20 @@ using Ryujinx.Ava.UI.ViewModels;
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
namespace Ryujinx.Ava.UI.Views.Dialog
|
||||
{
|
||||
public partial class XCITrimmerWindow : UserControl
|
||||
public partial class XciTrimmerView : UserControl
|
||||
{
|
||||
public XCITrimmerViewModel ViewModel;
|
||||
|
||||
public XCITrimmerWindow()
|
||||
public XciTrimmerView()
|
||||
{
|
||||
DataContext = this;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public XCITrimmerWindow(MainWindowViewModel mainWindowViewModel)
|
||||
public XciTrimmerView(MainWindowViewModel mainWindowViewModel)
|
||||
{
|
||||
DataContext = ViewModel = new XCITrimmerViewModel(mainWindowViewModel);
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
PrimaryButtonText = string.Empty,
|
||||
SecondaryButtonText = string.Empty,
|
||||
CloseButtonText = string.Empty,
|
||||
Content = new XCITrimmerWindow(RyujinxApp.MainWindow.ViewModel),
|
||||
Content = new XciTrimmerView(RyujinxApp.MainWindow.ViewModel),
|
||||
Title = LocaleManager.Instance[LocaleKeys.XCITrimmerWindowTitle]
|
||||
};
|
||||
|
|
@ -13,7 +13,7 @@ using Ryujinx.Ava.UI.Windows;
|
|||
using Ryujinx.Ava.Utilities;
|
||||
using Ryujinx.Ava.Systems.AppLibrary;
|
||||
using Ryujinx.Ava.Systems.Configuration;
|
||||
using Ryujinx.Ava.UI.Views.Misc;
|
||||
using Ryujinx.Ava.UI.Views.Dialog;
|
||||
using Ryujinx.Common;
|
||||
using Ryujinx.Common.Helper;
|
||||
using Ryujinx.Common.Utilities;
|
||||
|
@ -46,8 +46,8 @@ namespace Ryujinx.Ava.UI.Views.Main
|
|||
CheatManagerMenuItem.Command = Commands.CreateSilentFail(OpenCheatManagerForCurrentApp);
|
||||
InstallFileTypesMenuItem.Command = Commands.Create(InstallFileTypes);
|
||||
UninstallFileTypesMenuItem.Command = Commands.Create(UninstallFileTypes);
|
||||
XciTrimmerMenuItem.Command = Commands.Create(XCITrimmerWindow.Show);
|
||||
AboutWindowMenuItem.Command = Commands.Create(AboutWindow.Show);
|
||||
XciTrimmerMenuItem.Command = Commands.Create(XciTrimmerView.Show);
|
||||
AboutWindowMenuItem.Command = Commands.Create(AboutView.Show);
|
||||
CompatibilityListMenuItem.Command = Commands.Create(() => CompatibilityListWindow.Show());
|
||||
|
||||
UpdateMenuItem.Command = MainWindowViewModel.UpdateCommand;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue