Files
Aaru/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs

615 lines
23 KiB
C#
Raw Normal View History

2020-04-17 21:45:50 +01:00
// /***************************************************************************
// Aaru Data Preservation Suite
// ----------------------------------------------------------------------------
//
// Filename : ImageConvertViewModel.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// Component : GUI view models.
//
// --[ Description ] ----------------------------------------------------------
//
// View model and code for the image conversion window.
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General public License for more details.
//
// You should have received a copy of the GNU General public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
2024-12-19 10:45:18 +00:00
// Copyright © 2011-2025 Natalia Portillo
2020-04-17 21:45:50 +01:00
// ****************************************************************************/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
2022-11-15 01:35:06 +00:00
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
2025-08-20 21:19:43 +01:00
using System.Windows.Input;
using Aaru.CommonTypes;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Metadata;
using Aaru.Core;
using Aaru.Gui.Models;
using Aaru.Localization;
using Aaru.Logging;
using Avalonia.Controls;
using Avalonia.Platform.Storage;
using Avalonia.Threading;
2025-08-20 21:19:43 +01:00
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
2023-09-26 01:29:07 +01:00
using MsBox.Avalonia;
using MsBox.Avalonia.Enums;
2025-08-20 18:51:05 +01:00
using Sentry;
using Convert = Aaru.Core.Image.Convert;
namespace Aaru.Gui.ViewModels.Windows;
2022-11-15 01:35:06 +00:00
[SuppressMessage("ReSharper", "AsyncVoidLambda")]
2025-08-20 21:19:43 +01:00
public sealed partial class ImageConvertViewModel : ViewModelBase
{
readonly IMediaImage _inputFormat;
readonly Window _view;
Metadata _aaruMetadata;
2025-08-20 21:19:43 +01:00
[ObservableProperty]
bool _aaruMetadataFromImageVisible;
bool _cancel;
[ObservableProperty]
bool _closeVisible;
[ObservableProperty]
string _commentsText;
[ObservableProperty]
bool _commentsVisible;
[ObservableProperty]
string _creatorText;
[ObservableProperty]
bool _creatorVisible;
[ObservableProperty]
bool _destinationEnabled;
[ObservableProperty]
string _destinationText;
[ObservableProperty]
bool _destinationVisible;
[ObservableProperty]
string _driveFirmwareRevisionText;
[ObservableProperty]
bool _driveFirmwareRevisionVisible;
[ObservableProperty]
string _driveManufacturerText;
[ObservableProperty]
bool _driveManufacturerVisible;
[ObservableProperty]
string _driveModelText;
[ObservableProperty]
bool _driveModelVisible;
[ObservableProperty]
string _driveSerialNumberText;
[ObservableProperty]
bool _driveSerialNumberVisible;
[ObservableProperty]
bool _forceChecked;
[ObservableProperty]
bool _formatReadOnly;
[ObservableProperty]
double _lastMediaSequenceValue;
[ObservableProperty]
bool _lastMediaSequenceVisible;
[ObservableProperty]
string _mediaBarcodeText;
[ObservableProperty]
bool _mediaBarcodeVisible;
[ObservableProperty]
string _mediaManufacturerText;
[ObservableProperty]
bool _mediaManufacturerVisible;
[ObservableProperty]
string _mediaModelText;
[ObservableProperty]
bool _mediaModelVisible;
[ObservableProperty]
string _mediaPartNumberText;
[ObservableProperty]
bool _mediaPartNumberVisible;
[ObservableProperty]
double _mediaSequenceValue;
[ObservableProperty]
bool _mediaSequenceVisible;
[ObservableProperty]
string _mediaSerialNumberText;
[ObservableProperty]
bool _mediaSerialNumberVisible;
[ObservableProperty]
string _mediaTitleText;
[ObservableProperty]
bool _mediaTitleVisible;
[ObservableProperty]
string _metadataJsonText;
[ObservableProperty]
bool _optionsVisible;
[ObservableProperty]
bool _progress1Visible;
[ObservableProperty]
bool _progress2Indeterminate;
[ObservableProperty]
double _progress2MaxValue;
[ObservableProperty]
string _progress2Text;
[ObservableProperty]
double _progress2Value;
[ObservableProperty]
bool _progress2Visible;
[ObservableProperty]
bool _progressIndeterminate;
[ObservableProperty]
double _progressMaxValue;
[ObservableProperty]
string _progressText;
[ObservableProperty]
double _progressValue;
[ObservableProperty]
bool _progressVisible;
[ObservableProperty]
bool _resumeFileFromImageVisible;
[ObservableProperty]
string _resumeFileText;
[ObservableProperty]
double _sectorsValue;
[ObservableProperty]
ImagePluginModel _selectedPlugin;
[ObservableProperty]
string _sourceText;
[ObservableProperty]
bool _startVisible;
[ObservableProperty]
bool _stopEnabled;
[ObservableProperty]
bool _stopVisible;
Resume _resume;
Convert _converter;
2022-03-06 13:29:38 +00:00
2022-11-15 01:35:06 +00:00
public ImageConvertViewModel([JetBrains.Annotations.NotNull] IMediaImage inputFormat, string imageSource,
2023-10-03 23:27:57 +01:00
Window view)
2022-03-06 13:29:38 +00:00
{
_view = view;
_inputFormat = inputFormat;
_cancel = false;
2025-08-20 21:19:43 +01:00
DestinationCommand = new AsyncRelayCommand(DestinationAsync);
CreatorCommand = new RelayCommand(Creator);
MediaTitleCommand = new RelayCommand(MediaTitle);
MediaManufacturerCommand = new RelayCommand(MediaManufacturer);
MediaModelCommand = new RelayCommand(MediaModel);
MediaSerialNumberCommand = new RelayCommand(MediaSerialNumber);
MediaBarcodeCommand = new RelayCommand(MediaBarcode);
MediaPartNumberCommand = new RelayCommand(MediaPartNumber);
MediaSequenceCommand = new RelayCommand(MediaSequence);
LastMediaSequenceCommand = new RelayCommand(LastMediaSequence);
DriveManufacturerCommand = new RelayCommand(DriveManufacturer);
DriveModelCommand = new RelayCommand(DriveModel);
DriveSerialNumberCommand = new RelayCommand(DriveSerialNumber);
DriveFirmwareRevisionCommand = new RelayCommand(DriveFirmwareRevision);
CommentsCommand = new RelayCommand(Comments);
AaruMetadataFromImageCommand = new RelayCommand(AaruMetadataFromImage);
AaruMetadataCommand = new AsyncRelayCommand(AaruMetadataAsync);
ResumeFileFromImageCommand = new RelayCommand(ResumeFileFromImage);
ResumeFileCommand = new AsyncRelayCommand(ResumeFileAsync);
StartCommand = new AsyncRelayCommand(StartAsync);
CloseCommand = new RelayCommand(Close);
StopCommand = new RelayCommand(Stop);
2022-03-06 13:29:38 +00:00
SourceText = imageSource;
CreatorVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.Creator);
MediaTitleVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.MediaTitle);
CommentsVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.Comments);
MediaManufacturerVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.MediaManufacturer);
MediaModelVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.MediaModel);
MediaSerialNumberVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.MediaSerialNumber);
MediaBarcodeVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.MediaBarcode);
MediaPartNumberVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.MediaPartNumber);
MediaSequenceVisible = inputFormat.Info.MediaSequence != 0 && inputFormat.Info.LastMediaSequence != 0;
LastMediaSequenceVisible = inputFormat.Info.MediaSequence != 0 && inputFormat.Info.LastMediaSequence != 0;
DriveManufacturerVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.DriveManufacturer);
DriveModelVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.DriveModel);
DriveSerialNumberVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.DriveSerialNumber);
DriveFirmwareRevisionVisible = !string.IsNullOrWhiteSpace(inputFormat.Info.DriveFirmwareRevision);
PluginsList = [];
2022-03-06 13:29:38 +00:00
PluginRegister plugins = PluginRegister.Singleton;
2022-03-06 13:29:38 +00:00
foreach(IBaseWritableImage plugin in plugins.WritableImages.Values)
{
2024-05-01 04:05:22 +01:00
if(plugin is null) continue;
if(plugin.SupportedMediaTypes.Contains(inputFormat.Info.MediaType))
2023-10-03 23:27:57 +01:00
{
PluginsList.Add(new ImagePluginModel
{
Plugin = plugin
});
2023-10-03 23:27:57 +01:00
}
}
AaruMetadataFromImageVisible = inputFormat.AaruMetadata != null;
ResumeFileFromImageVisible = inputFormat.DumpHardware?.Any() == true;
_aaruMetadata = inputFormat.AaruMetadata;
List<DumpHardware> dumpHardware = inputFormat.DumpHardware?.Any() == true ? inputFormat.DumpHardware : null;
MetadataJsonText = _aaruMetadata == null ? "" : UI._From_image_;
ResumeFileText = dumpHardware == null ? "" : UI._From_image_;
SelectedPlugin = PluginsList[0];
SectorsValue = 512;
DestinationVisible = true;
DestinationEnabled = true;
OptionsVisible = true;
StartVisible = true;
CloseVisible = true;
2022-03-06 13:29:38 +00:00
}
2025-10-25 12:53:52 +01:00
public ObservableCollection<ImagePluginModel> PluginsList { get; }
public ICommand DestinationCommand { get; }
public ICommand CreatorCommand { get; }
public ICommand MediaTitleCommand { get; }
public ICommand MediaManufacturerCommand { get; }
public ICommand MediaModelCommand { get; }
public ICommand MediaSerialNumberCommand { get; }
public ICommand MediaBarcodeCommand { get; }
public ICommand MediaPartNumberCommand { get; }
public ICommand MediaSequenceCommand { get; }
public ICommand LastMediaSequenceCommand { get; }
public ICommand DriveManufacturerCommand { get; }
public ICommand DriveModelCommand { get; }
public ICommand DriveSerialNumberCommand { get; }
public ICommand DriveFirmwareRevisionCommand { get; }
public ICommand CommentsCommand { get; }
public ICommand AaruMetadataFromImageCommand { get; }
public ICommand AaruMetadataCommand { get; }
public ICommand ResumeFileFromImageCommand { get; }
public ICommand ResumeFileCommand { get; }
public ICommand StartCommand { get; }
public ICommand CloseCommand { get; }
public ICommand StopCommand { get; }
2025-08-20 21:19:43 +01:00
async Task StartAsync()
2022-03-06 13:29:38 +00:00
{
if(SelectedPlugin is null)
{
2024-05-01 04:05:22 +01:00
await MessageBoxManager
.GetMessageBoxStandard(UI.Title_Error, UI.Error_trying_to_find_selected_plugin, icon: Icon.Error)
.ShowWindowDialogAsync(_view);
2022-03-06 13:29:38 +00:00
return;
}
2022-03-06 13:29:38 +00:00
new Thread(DoWork).Start(SelectedPlugin.Plugin);
}
2022-11-15 01:35:06 +00:00
[SuppressMessage("ReSharper", "AsyncVoidMethod")]
2022-03-06 13:29:38 +00:00
async void DoWork(object plugin)
{
var warning = false;
2022-03-06 13:29:38 +00:00
2022-11-14 01:20:28 +00:00
if(plugin is not IWritableImage outputFormat)
{
2024-05-01 04:05:22 +01:00
await MessageBoxManager
.GetMessageBoxStandard(UI.Title_Error, UI.Error_trying_to_find_selected_plugin, icon: Icon.Error)
.ShowWindowDialogAsync(_view);
2022-03-06 13:29:38 +00:00
return;
}
Dictionary<string, string> parsedOptions = [];
uint nominalNegativeSectors = _inputFormat.Info.NegativeSectors;
uint nominalOverflowSectors = _inputFormat.Info.OverflowSectors;
PluginRegister plugins = PluginRegister.Singleton;
_converter = new Convert(_inputFormat,
outputFormat,
_inputFormat.Info.MediaType,
ForceChecked,
DestinationText,
parsedOptions,
nominalNegativeSectors,
nominalOverflowSectors,
CommentsText,
CreatorText,
DriveFirmwareRevisionText,
DriveManufacturerText,
DriveModelText,
DriveSerialNumberText,
(int)LastMediaSequenceValue,
MediaBarcodeText,
MediaManufacturerText,
MediaModelText,
MediaPartNumberText,
(int)MediaSequenceValue,
MediaSerialNumberText,
MediaTitleText,
false,
(uint)SectorsValue,
plugins,
true,
false,
false,
false,
null,
_resume,
_aaruMetadata);
2022-03-06 13:29:38 +00:00
// Prepare UI
await Dispatcher.UIThread.InvokeAsync(() =>
{
2022-03-06 13:29:38 +00:00
CloseVisible = false;
StartVisible = false;
StopVisible = true;
ProgressVisible = true;
OptionsVisible = false;
StopEnabled = true;
FormatReadOnly = true;
DestinationVisible = false;
});
_converter.UpdateStatus += static text => AaruLogging.WriteLine(text);
_converter.ErrorMessage += text =>
2022-03-06 13:29:38 +00:00
{
warning = true;
AaruLogging.Error(text);
2022-03-06 13:29:38 +00:00
};
_converter.StoppingErrorMessage += text =>
2023-10-03 23:27:57 +01:00
{
_ = Dispatcher.UIThread.InvokeAsync(() => MessageBoxManager
.GetMessageBoxStandard(UI.Title_Error, text, icon: Icon.Error)
.ShowWindowDialogAsync(_view));
};
2022-03-06 13:29:38 +00:00
_converter.UpdateProgress += (text, current, maximum) =>
2022-03-06 13:29:38 +00:00
{
Dispatcher.UIThread.Invoke(() =>
{
ProgressText = text;
ProgressValue = current;
ProgressMaxValue = maximum;
ProgressIndeterminate = false;
});
};
_converter.PulseProgress += text =>
2022-03-06 13:29:38 +00:00
{
Dispatcher.UIThread.Invoke(() =>
{
ProgressText = text;
ProgressIndeterminate = true;
});
};
_converter.InitProgress += () => Dispatcher.UIThread.Invoke(() => Progress1Visible = true);
_converter.EndProgress += () => Dispatcher.UIThread.Invoke(() => Progress1Visible = false);
_converter.InitProgress2 += () => Dispatcher.UIThread.Invoke(() => Progress2Visible = true);
_converter.EndProgress2 += () => Dispatcher.UIThread.Invoke(() => Progress2Visible = false);
_converter.UpdateProgress2 += (text, current, maximum) =>
2022-03-06 13:29:38 +00:00
{
Dispatcher.UIThread.Invoke(() =>
2022-03-06 13:29:38 +00:00
{
Progress2Text = text;
Progress2Value = current;
Progress2MaxValue = maximum;
2022-03-06 13:29:38 +00:00
Progress2Indeterminate = false;
});
};
_converter.Start();
2022-03-06 13:29:38 +00:00
if(_cancel)
{
2023-09-25 22:58:48 +01:00
await Dispatcher.UIThread.InvokeAsync(async () =>
{
2024-05-01 04:05:22 +01:00
await MessageBoxManager
.GetMessageBoxStandard(UI.Title_Error,
UI.Operation_canceled_the_output_file_is_not_correct,
icon: Icon.Error)
.ShowWindowDialogAsync(_view);
CloseVisible = true;
StopVisible = false;
ProgressVisible = false;
});
2022-03-06 13:29:38 +00:00
return;
}
2023-09-25 22:58:48 +01:00
await Dispatcher.UIThread.InvokeAsync(async () =>
2022-03-06 13:29:38 +00:00
{
await MessageBoxManager.GetMessageBoxStandard(warning ? UI.Title_Warning : UI.Title_Conversion_success,
warning
? UI.Some_warnings_happened_Check_console
: UI.Image_converted_successfully,
2024-05-01 04:05:22 +01:00
icon: warning ? Icon.Warning : Icon.Info)
.ShowWindowDialogAsync(_view);
2022-03-06 13:29:38 +00:00
CloseVisible = true;
StopVisible = false;
ProgressVisible = false;
});
2022-03-06 13:29:38 +00:00
Statistics.AddCommand("convert-image");
}
2025-08-20 21:19:43 +01:00
void Close() => _view.Close();
2025-08-20 21:19:43 +01:00
internal void Stop()
2022-03-06 13:29:38 +00:00
{
_cancel = true;
_converter.Abort();
2022-03-06 13:29:38 +00:00
StopEnabled = false;
}
2025-08-20 21:19:43 +01:00
async Task DestinationAsync()
2022-03-06 13:29:38 +00:00
{
2024-05-01 04:05:22 +01:00
if(SelectedPlugin is null) return;
2022-03-06 13:29:38 +00:00
IStorageFile result = await _view.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
2022-03-06 13:29:38 +00:00
{
Title = UI.Dialog_Choose_destination_file,
FileTypeChoices =
[
new FilePickerFileType(SelectedPlugin.Plugin.Name)
{
Patterns = SelectedPlugin.Plugin.KnownExtensions.ToList()
}
]
2022-03-06 13:29:38 +00:00
});
if(result is null)
2022-03-06 13:29:38 +00:00
{
DestinationText = "";
2022-03-06 13:29:38 +00:00
return;
}
DestinationText = result.Path.LocalPath;
if(string.IsNullOrEmpty(Path.GetExtension(DestinationText)))
DestinationText += SelectedPlugin.Plugin.KnownExtensions.First();
2022-03-06 13:29:38 +00:00
}
2025-08-20 21:19:43 +01:00
void Creator() => CreatorText = _inputFormat.Info.Creator;
2025-08-20 21:19:43 +01:00
void MediaTitle() => MediaTitleText = _inputFormat.Info.MediaTitle;
2025-08-20 21:19:43 +01:00
void Comments() => CommentsText = _inputFormat.Info.Comments;
2025-08-20 21:19:43 +01:00
void MediaManufacturer() => MediaManufacturerText = _inputFormat.Info.MediaManufacturer;
2025-08-20 21:19:43 +01:00
void MediaModel() => MediaModelText = _inputFormat.Info.MediaModel;
2025-08-20 21:19:43 +01:00
void MediaSerialNumber() => MediaSerialNumberText = _inputFormat.Info.MediaSerialNumber;
2025-08-20 21:19:43 +01:00
void MediaBarcode() => MediaBarcodeText = _inputFormat.Info.MediaBarcode;
2025-08-20 21:19:43 +01:00
void MediaPartNumber() => MediaPartNumberText = _inputFormat.Info.MediaPartNumber;
2025-08-20 21:19:43 +01:00
void MediaSequence() => MediaSequenceValue = _inputFormat.Info.MediaSequence;
2025-08-20 21:19:43 +01:00
void LastMediaSequence() => LastMediaSequenceValue = _inputFormat.Info.LastMediaSequence;
2025-08-20 21:19:43 +01:00
void DriveManufacturer() => DriveManufacturerText = _inputFormat.Info.DriveManufacturer;
2025-08-20 21:19:43 +01:00
void DriveModel() => DriveModelText = _inputFormat.Info.DriveModel;
2025-08-20 21:19:43 +01:00
void DriveSerialNumber() => DriveSerialNumberText = _inputFormat.Info.DriveSerialNumber;
2025-08-20 21:19:43 +01:00
void DriveFirmwareRevision() => DriveFirmwareRevisionText = _inputFormat.Info.DriveFirmwareRevision;
2025-08-20 21:19:43 +01:00
void AaruMetadataFromImage()
2022-03-06 13:29:38 +00:00
{
MetadataJsonText = UI._From_image_;
_aaruMetadata = _inputFormat.AaruMetadata;
2022-03-06 13:29:38 +00:00
}
2025-08-20 21:19:43 +01:00
async Task AaruMetadataAsync()
2022-03-06 13:29:38 +00:00
{
_aaruMetadata = null;
MetadataJsonText = "";
2022-03-06 13:29:38 +00:00
IReadOnlyList<IStorageFile> result = await _view.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
{
Title = UI.Dialog_Choose_existing_metadata_sidecar,
AllowMultiple = false,
FileTypeFilter = [FilePickerFileTypes.AaruMetadata]
});
if(result.Count != 1) return;
2022-03-06 13:29:38 +00:00
try
{
var fs = new FileStream(result[0].Path.LocalPath, FileMode.Open);
_aaruMetadata =
(await JsonSerializer.DeserializeAsync(fs, typeof(MetadataJson), MetadataJsonContext.Default) as
MetadataJson)?.AaruMetadata;
fs.Close();
MetadataJsonText = result[0].Path.LocalPath;
}
2025-08-20 18:51:05 +01:00
catch(Exception ex)
{
2025-08-20 18:51:05 +01:00
SentrySdk.CaptureException(ex);
2024-05-01 04:05:22 +01:00
await MessageBoxManager
.GetMessageBoxStandard(UI.Title_Error, UI.Incorrect_metadata_sidecar_file, icon: Icon.Error)
.ShowWindowDialogAsync(_view);
}
2022-03-06 13:29:38 +00:00
}
2025-08-20 21:19:43 +01:00
void ResumeFileFromImage()
2022-03-06 13:29:38 +00:00
{
ResumeFileText = UI._From_image_;
2022-03-06 13:29:38 +00:00
}
2025-08-20 21:19:43 +01:00
async Task ResumeFileAsync()
2022-03-06 13:29:38 +00:00
{
_resume = null;
2022-03-06 13:29:38 +00:00
ResumeFileText = "";
IReadOnlyList<IStorageFile> result = await _view.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
{
Title = UI.Dialog_Choose_existing_resume_file,
AllowMultiple = false,
FileTypeFilter = [FilePickerFileTypes.AaruResumeFile]
});
if(result.Count != 1) return;
2022-03-06 13:29:38 +00:00
try
{
var fs = new FileStream(result[0].Path.LocalPath, FileMode.Open);
Resume resume =
2024-05-01 04:05:22 +01:00
(await JsonSerializer.DeserializeAsync(fs, typeof(ResumeJson), ResumeJsonContext.Default) as ResumeJson)
?.Resume;
fs.Close();
2022-03-17 00:46:26 +00:00
if(resume?.Tries?.Any() == false)
{
_resume = resume;
ResumeFileText = result[0].Path.LocalPath;
}
2022-03-06 13:29:38 +00:00
else
2023-10-03 23:27:57 +01:00
{
2024-05-01 04:05:22 +01:00
await MessageBoxManager
.GetMessageBoxStandard(UI.Title_Error,
UI.Resume_file_does_not_contain_dump_hardware_information,
icon: Icon.Error)
.ShowWindowDialogAsync(_view);
2023-10-03 23:27:57 +01:00
}
2022-03-06 13:29:38 +00:00
}
2025-08-20 18:51:05 +01:00
catch(Exception ex)
2022-03-06 13:29:38 +00:00
{
2025-08-20 18:51:05 +01:00
SentrySdk.CaptureException(ex);
2024-05-01 04:05:22 +01:00
await MessageBoxManager.GetMessageBoxStandard(UI.Title_Error, UI.Incorrect_resume_file, icon: Icon.Error)
.ShowWindowDialogAsync(_view);
}
}
}