Migrate media tags decoding window from Eto.Forms to Avalonia.

This commit is contained in:
2020-04-14 17:44:46 +01:00
parent fb8ea8b72d
commit 3b10f60e16
8 changed files with 307 additions and 310 deletions

View File

@@ -27,15 +27,16 @@ namespace Aaru.Gui.ViewModels
{
public class ImageInfoViewModel : ViewModelBase
{
readonly IMediaImage _imageFormat;
readonly string _imagePath;
readonly Window _view;
IFilter _filter;
ImageChecksumWindow _imageChecksumWindow;
ImageConvertWindow _imageConvertWindow;
ImageEntropyWindow _imageEntropyWindow;
ImageVerifyWindow _imageVerifyWindow;
ViewSectorWindow _viewSectorWindow;
readonly IMediaImage _imageFormat;
readonly string _imagePath;
readonly Window _view;
DecodeMediaTagsWindow _decodeMediaTagsWindow;
IFilter _filter;
ImageChecksumWindow _imageChecksumWindow;
ImageConvertWindow _imageConvertWindow;
ImageEntropyWindow _imageEntropyWindow;
ImageVerifyWindow _imageVerifyWindow;
ViewSectorWindow _viewSectorWindow;
public ImageInfoViewModel(string imagePath, IFilter filter, IMediaImage imageFormat, Window view)
@@ -830,23 +831,22 @@ namespace Aaru.Gui.ViewModels
protected void ExecuteDecodeMediaTagCommand()
{
/* TODO: frmDecodeMediaTags
if(frmDecodeMediaTags != null)
if(_decodeMediaTagsWindow != null)
{
frmDecodeMediaTags.Show();
_decodeMediaTagsWindow.Show();
return;
}
frmDecodeMediaTags = new frmDecodeMediaTags(imageFormat);
frmDecodeMediaTags.Closed += (s, ea) =>
_decodeMediaTagsWindow = new DecodeMediaTagsWindow
{
frmDecodeMediaTags = null;
DataContext = new DecodeMediaTagsViewModel(_imageFormat)
};
frmDecodeMediaTags.Show();
*/
_decodeMediaTagsWindow.Closed += (sender, args) =>
{
_decodeMediaTagsWindow = null;
};
}
}
}