mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-31 10:09:42 -06:00
Add ability to trim and untrim XCI files from the application context menu AND in Bulk (#105)
This commit is contained in:
24
src/Ryujinx/Common/XCIFileTrimmerMainWindowLog.cs
Normal file
24
src/Ryujinx/Common/XCIFileTrimmerMainWindowLog.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Avalonia.Threading;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
|
||||
namespace Ryujinx.Ava.Common
|
||||
{
|
||||
internal class XCIFileTrimmerMainWindowLog : Ryujinx.Common.Logging.XCIFileTrimmerLog
|
||||
{
|
||||
private readonly MainWindowViewModel _viewModel;
|
||||
|
||||
public XCIFileTrimmerMainWindowLog(MainWindowViewModel viewModel)
|
||||
{
|
||||
_viewModel = viewModel;
|
||||
}
|
||||
|
||||
public override void Progress(long current, long total, string text, bool complete)
|
||||
{
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
_viewModel.StatusBarProgressMaximum = (int)(total);
|
||||
_viewModel.StatusBarProgressValue = (int)(current);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user