mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Add media information to device view.
This commit is contained in:
@@ -353,9 +353,6 @@
|
|||||||
<Compile Update="Views\Panels\ImageInfo.xaml.cs">
|
<Compile Update="Views\Panels\ImageInfo.xaml.cs">
|
||||||
<DependentUpon>ImageInfo.xaml</DependentUpon>
|
<DependentUpon>ImageInfo.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Update="Views\Panels\MediaInfo.xaml.cs">
|
|
||||||
<DependentUpon>MediaInfo.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Update="Views\Panels\Partition.xaml.cs">
|
<Compile Update="Views\Panels\Partition.xaml.cs">
|
||||||
<DependentUpon>Partition.xaml</DependentUpon>
|
<DependentUpon>Partition.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
@@ -1,362 +0,0 @@
|
|||||||
// /***************************************************************************
|
|
||||||
// Aaru Data Preservation Suite
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Filename : MediaInfoViewModel.cs
|
|
||||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
||||||
//
|
|
||||||
// Component : GUI view models.
|
|
||||||
//
|
|
||||||
// --[ Description ] ----------------------------------------------------------
|
|
||||||
//
|
|
||||||
// View model and code for the media information panel.
|
|
||||||
//
|
|
||||||
// --[ 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/>.
|
|
||||||
//
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Copyright © 2011-2025 Natalia Portillo
|
|
||||||
// ****************************************************************************/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using Aaru.Gui.ViewModels.Tabs;
|
|
||||||
using Aaru.Gui.ViewModels.Windows;
|
|
||||||
using Aaru.Gui.Views.Tabs;
|
|
||||||
using Aaru.Gui.Views.Windows;
|
|
||||||
using Aaru.Localization;
|
|
||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Media.Imaging;
|
|
||||||
using Avalonia.Platform;
|
|
||||||
using Avalonia.Platform.Storage;
|
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
|
||||||
using CommunityToolkit.Mvvm.Input;
|
|
||||||
using Humanizer.Bytes;
|
|
||||||
using MsBox.Avalonia;
|
|
||||||
using MsBox.Avalonia.Enums;
|
|
||||||
using ScsiInfo = Aaru.Core.Media.Info.ScsiInfo;
|
|
||||||
|
|
||||||
namespace Aaru.Gui.ViewModels.Panels;
|
|
||||||
|
|
||||||
public sealed partial class MediaInfoViewModel : ViewModelBase
|
|
||||||
{
|
|
||||||
readonly string _devicePath;
|
|
||||||
readonly ScsiInfo _scsiInfo;
|
|
||||||
readonly Window _view;
|
|
||||||
[ObservableProperty]
|
|
||||||
BlurayInfo _blurayInfo;
|
|
||||||
[ObservableProperty]
|
|
||||||
CompactDiscInfo _compactDiscInfo;
|
|
||||||
[ObservableProperty]
|
|
||||||
string _densitySupport;
|
|
||||||
[ObservableProperty]
|
|
||||||
DvdInfo _dvdInfo;
|
|
||||||
[ObservableProperty]
|
|
||||||
DvdWritableInfo _dvdWritableInfo;
|
|
||||||
[ObservableProperty]
|
|
||||||
string _generalVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
Bitmap _mediaLogo;
|
|
||||||
[ObservableProperty]
|
|
||||||
string _mediaSerial;
|
|
||||||
[ObservableProperty]
|
|
||||||
string _mediaSize;
|
|
||||||
[ObservableProperty]
|
|
||||||
string _mediaType;
|
|
||||||
[ObservableProperty]
|
|
||||||
string _mediumSupport;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _mmcVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _saveDensitySupportVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _saveGetConfigurationVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _saveMediumSupportVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _saveReadCapacity16Visible;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _saveReadCapacityVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _saveReadMediaSerialVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _saveRecognizedFormatLayersVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _saveWriteProtectionStatusVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
bool _sscVisible;
|
|
||||||
[ObservableProperty]
|
|
||||||
XboxInfo _xboxInfo;
|
|
||||||
|
|
||||||
public MediaInfoViewModel(ScsiInfo scsiInfo, string devicePath, Window view)
|
|
||||||
{
|
|
||||||
_view = view;
|
|
||||||
SaveReadMediaSerialCommand = new AsyncRelayCommand(SaveReadMediaSerial);
|
|
||||||
SaveReadCapacityCommand = new AsyncRelayCommand(SaveReadCapacity);
|
|
||||||
SaveReadCapacity16Command = new AsyncRelayCommand(SaveReadCapacity16);
|
|
||||||
SaveGetConfigurationCommand = new AsyncRelayCommand(SaveGetConfiguration);
|
|
||||||
SaveRecognizedFormatLayersCommand = new AsyncRelayCommand(SaveRecognizedFormatLayers);
|
|
||||||
SaveWriteProtectionStatusCommand = new AsyncRelayCommand(SaveWriteProtectionStatus);
|
|
||||||
SaveDensitySupportCommand = new AsyncRelayCommand(SaveDensitySupport);
|
|
||||||
SaveMediumSupportCommand = new AsyncRelayCommand(SaveMediumSupport);
|
|
||||||
DumpCommand = new AsyncRelayCommand(DumpAsync);
|
|
||||||
ScanCommand = new AsyncRelayCommand(ScanAsync);
|
|
||||||
_devicePath = devicePath;
|
|
||||||
_scsiInfo = scsiInfo;
|
|
||||||
|
|
||||||
var mediaResource = new Uri($"avares://Aaru.Gui/Assets/Logos/Media/{scsiInfo.MediaType}.png");
|
|
||||||
|
|
||||||
MediaLogo = AssetLoader.Exists(mediaResource) ? new Bitmap(AssetLoader.Open(mediaResource)) : null;
|
|
||||||
|
|
||||||
MediaType = scsiInfo.MediaType.ToString();
|
|
||||||
|
|
||||||
if(scsiInfo.Blocks != 0 && scsiInfo.BlockSize != 0)
|
|
||||||
{
|
|
||||||
MediaSize = string.Format(Localization.Core.Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2,
|
|
||||||
scsiInfo.Blocks,
|
|
||||||
scsiInfo.BlockSize,
|
|
||||||
ByteSize.FromBytes(scsiInfo.Blocks * scsiInfo.BlockSize).ToString("0.000"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if(scsiInfo.MediaSerialNumber != null)
|
|
||||||
{
|
|
||||||
var sbSerial = new StringBuilder();
|
|
||||||
|
|
||||||
for(var i = 4; i < scsiInfo.MediaSerialNumber.Length; i++)
|
|
||||||
sbSerial.Append($"{scsiInfo.MediaSerialNumber[i]:X2}");
|
|
||||||
|
|
||||||
MediaSerial = sbSerial.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
SaveReadMediaSerialVisible = scsiInfo.MediaSerialNumber != null;
|
|
||||||
SaveReadCapacityVisible = scsiInfo.ReadCapacity != null;
|
|
||||||
SaveReadCapacity16Visible = scsiInfo.ReadCapacity16 != null;
|
|
||||||
|
|
||||||
SaveGetConfigurationVisible = scsiInfo.MmcConfiguration != null;
|
|
||||||
SaveRecognizedFormatLayersVisible = scsiInfo.RecognizedFormatLayers != null;
|
|
||||||
SaveWriteProtectionStatusVisible = scsiInfo.WriteProtectionStatus != null;
|
|
||||||
|
|
||||||
MmcVisible = SaveGetConfigurationVisible ||
|
|
||||||
SaveRecognizedFormatLayersVisible ||
|
|
||||||
SaveWriteProtectionStatusVisible;
|
|
||||||
|
|
||||||
if(scsiInfo.DensitySupportHeader.HasValue)
|
|
||||||
DensitySupport = Decoders.SCSI.SSC.DensitySupport.PrettifyDensity(scsiInfo.DensitySupportHeader);
|
|
||||||
|
|
||||||
if(scsiInfo.MediaTypeSupportHeader.HasValue)
|
|
||||||
MediumSupport = Decoders.SCSI.SSC.DensitySupport.PrettifyMediumType(scsiInfo.MediaTypeSupportHeader);
|
|
||||||
|
|
||||||
SaveDensitySupportVisible = scsiInfo.DensitySupport != null;
|
|
||||||
SaveMediumSupportVisible = scsiInfo.MediaTypeSupport != null;
|
|
||||||
|
|
||||||
SscVisible = SaveDensitySupportVisible || SaveMediumSupportVisible;
|
|
||||||
|
|
||||||
CompactDiscInfo = new CompactDiscInfo
|
|
||||||
{
|
|
||||||
DataContext = new CompactDiscInfoViewModel(scsiInfo.Toc,
|
|
||||||
scsiInfo.Atip,
|
|
||||||
scsiInfo.DiscInformation,
|
|
||||||
scsiInfo.Session,
|
|
||||||
scsiInfo.RawToc,
|
|
||||||
scsiInfo.Pma,
|
|
||||||
scsiInfo.CdTextLeadIn,
|
|
||||||
scsiInfo.DecodedToc,
|
|
||||||
scsiInfo.DecodedAtip,
|
|
||||||
scsiInfo.DecodedSession,
|
|
||||||
scsiInfo.FullToc,
|
|
||||||
scsiInfo.DecodedCdTextLeadIn,
|
|
||||||
scsiInfo.DecodedDiscInformation,
|
|
||||||
scsiInfo.Mcn,
|
|
||||||
scsiInfo.Isrcs,
|
|
||||||
_view)
|
|
||||||
};
|
|
||||||
|
|
||||||
DvdInfo = new DvdInfo
|
|
||||||
{
|
|
||||||
DataContext = new DvdInfoViewModel(scsiInfo.DvdPfi,
|
|
||||||
scsiInfo.DvdDmi,
|
|
||||||
scsiInfo.DvdCmi,
|
|
||||||
scsiInfo.HddvdCopyrightInformation,
|
|
||||||
scsiInfo.DvdBca,
|
|
||||||
scsiInfo.DvdAacs,
|
|
||||||
scsiInfo.DecodedPfi,
|
|
||||||
_view)
|
|
||||||
};
|
|
||||||
|
|
||||||
XboxInfo = new XboxInfo
|
|
||||||
{
|
|
||||||
DataContext = new XboxInfoViewModel(scsiInfo.XgdInfo,
|
|
||||||
scsiInfo.DvdDmi,
|
|
||||||
scsiInfo.XboxSecuritySector,
|
|
||||||
scsiInfo.DecodedXboxSecuritySector,
|
|
||||||
_view)
|
|
||||||
};
|
|
||||||
|
|
||||||
DvdWritableInfo = new DvdWritableInfo
|
|
||||||
{
|
|
||||||
DataContext = new DvdWritableInfoViewModel(scsiInfo.DvdRamDds,
|
|
||||||
scsiInfo.DvdRamCartridgeStatus,
|
|
||||||
scsiInfo.DvdRamSpareArea,
|
|
||||||
scsiInfo.LastBorderOutRmd,
|
|
||||||
scsiInfo.DvdPreRecordedInfo,
|
|
||||||
scsiInfo.DvdrMediaIdentifier,
|
|
||||||
scsiInfo.DvdrPhysicalInformation,
|
|
||||||
scsiInfo.HddvdrMediumStatus,
|
|
||||||
scsiInfo.HddvdrLastRmd,
|
|
||||||
scsiInfo.DvdrLayerCapacity,
|
|
||||||
scsiInfo.DvdrDlMiddleZoneStart,
|
|
||||||
scsiInfo.DvdrDlJumpIntervalSize,
|
|
||||||
scsiInfo.DvdrDlManualLayerJumpStartLba,
|
|
||||||
scsiInfo.DvdrDlRemapAnchorPoint,
|
|
||||||
scsiInfo.DvdPlusAdip,
|
|
||||||
scsiInfo.DvdPlusDcb,
|
|
||||||
_view)
|
|
||||||
};
|
|
||||||
|
|
||||||
BlurayInfo = new BlurayInfo
|
|
||||||
{
|
|
||||||
DataContext = new BlurayInfoViewModel(scsiInfo.BlurayDiscInformation,
|
|
||||||
scsiInfo.BlurayBurstCuttingArea,
|
|
||||||
scsiInfo.BlurayDds,
|
|
||||||
scsiInfo.BlurayCartridgeStatus,
|
|
||||||
scsiInfo.BluraySpareAreaInformation,
|
|
||||||
scsiInfo.BlurayPowResources,
|
|
||||||
scsiInfo.BlurayTrackResources,
|
|
||||||
scsiInfo.BlurayRawDfl,
|
|
||||||
scsiInfo.BlurayPac,
|
|
||||||
_view)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public ICommand SaveReadMediaSerialCommand { get; }
|
|
||||||
public ICommand SaveReadCapacityCommand { get; }
|
|
||||||
public ICommand SaveReadCapacity16Command { get; }
|
|
||||||
public ICommand SaveGetConfigurationCommand { get; }
|
|
||||||
public ICommand SaveRecognizedFormatLayersCommand { get; }
|
|
||||||
public ICommand SaveWriteProtectionStatusCommand { get; }
|
|
||||||
public ICommand SaveDensitySupportCommand { get; }
|
|
||||||
public ICommand SaveMediumSupportCommand { get; }
|
|
||||||
public ICommand DumpCommand { get; }
|
|
||||||
public ICommand ScanCommand { get; }
|
|
||||||
|
|
||||||
async Task SaveElementAsync(byte[] data)
|
|
||||||
{
|
|
||||||
IStorageFile result = await _view.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
|
|
||||||
{
|
|
||||||
FileTypeChoices = new List<FilePickerFileType>
|
|
||||||
{
|
|
||||||
FilePickerFileTypes.Binary
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if(result is null) return;
|
|
||||||
|
|
||||||
var saveFs = new FileStream(result.Path.AbsolutePath, FileMode.Create);
|
|
||||||
saveFs.Write(data, 0, data.Length);
|
|
||||||
|
|
||||||
saveFs.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
Task SaveReadMediaSerial() => SaveElementAsync(_scsiInfo.MediaSerialNumber);
|
|
||||||
|
|
||||||
Task SaveReadCapacity() => SaveElementAsync(_scsiInfo.ReadCapacity);
|
|
||||||
|
|
||||||
Task SaveReadCapacity16() => SaveElementAsync(_scsiInfo.ReadCapacity16);
|
|
||||||
|
|
||||||
Task SaveGetConfiguration() => SaveElementAsync(_scsiInfo.MmcConfiguration);
|
|
||||||
|
|
||||||
Task SaveRecognizedFormatLayers() => SaveElementAsync(_scsiInfo.RecognizedFormatLayers);
|
|
||||||
|
|
||||||
Task SaveWriteProtectionStatus() => SaveElementAsync(_scsiInfo.WriteProtectionStatus);
|
|
||||||
|
|
||||||
Task SaveDensitySupport() => SaveElementAsync(_scsiInfo.DensitySupport);
|
|
||||||
|
|
||||||
Task SaveMediumSupport() => SaveElementAsync(_scsiInfo.MediaTypeSupport);
|
|
||||||
|
|
||||||
async Task DumpAsync()
|
|
||||||
{
|
|
||||||
switch(_scsiInfo.MediaType)
|
|
||||||
{
|
|
||||||
case CommonTypes.MediaType.GDR or CommonTypes.MediaType.GDROM:
|
|
||||||
await MessageBoxManager
|
|
||||||
.GetMessageBoxStandard(UI.Title_Error,
|
|
||||||
Localization.Core.GD_ROM_dump_support_is_not_yet_implemented,
|
|
||||||
ButtonEnum.Ok,
|
|
||||||
Icon.Error)
|
|
||||||
.ShowWindowDialogAsync(_view);
|
|
||||||
|
|
||||||
return;
|
|
||||||
case CommonTypes.MediaType.XGD or CommonTypes.MediaType.XGD2 or CommonTypes.MediaType.XGD3
|
|
||||||
when _scsiInfo.DeviceInfo.ScsiInquiry?.KreonPresent != true:
|
|
||||||
await MessageBoxManager
|
|
||||||
.GetMessageBoxStandard(UI.Title_Error,
|
|
||||||
Localization.Core
|
|
||||||
.Dumping_Xbox_Game_Discs_requires_a_drive_with_Kreon_firmware,
|
|
||||||
ButtonEnum.Ok,
|
|
||||||
Icon.Error)
|
|
||||||
.ShowWindowDialogAsync(_view);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var mediaDumpWindow = new MediaDump();
|
|
||||||
|
|
||||||
mediaDumpWindow.DataContext =
|
|
||||||
new MediaDumpViewModel(_devicePath, _scsiInfo.DeviceInfo, mediaDumpWindow, _scsiInfo);
|
|
||||||
|
|
||||||
mediaDumpWindow.Show();
|
|
||||||
}
|
|
||||||
|
|
||||||
async Task ScanAsync()
|
|
||||||
{
|
|
||||||
switch(_scsiInfo.MediaType)
|
|
||||||
{
|
|
||||||
// TODO: GD-ROM
|
|
||||||
case CommonTypes.MediaType.GDR:
|
|
||||||
case CommonTypes.MediaType.GDROM:
|
|
||||||
await MessageBoxManager
|
|
||||||
.GetMessageBoxStandard(UI.Title_Error,
|
|
||||||
Localization.Core.GD_ROM_scan_support_is_not_yet_implemented,
|
|
||||||
ButtonEnum.Ok,
|
|
||||||
Icon.Error)
|
|
||||||
.ShowWindowDialogAsync(_view);
|
|
||||||
|
|
||||||
return;
|
|
||||||
|
|
||||||
// TODO: Xbox
|
|
||||||
case CommonTypes.MediaType.XGD:
|
|
||||||
case CommonTypes.MediaType.XGD2:
|
|
||||||
case CommonTypes.MediaType.XGD3:
|
|
||||||
await MessageBoxManager.GetMessageBoxStandard(UI.Title_Error,
|
|
||||||
Localization.Core
|
|
||||||
.Scanning_Xbox_discs_is_not_yet_supported,
|
|
||||||
ButtonEnum.Ok,
|
|
||||||
Icon.Error)
|
|
||||||
.ShowWindowDialogAsync(_view);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var mediaScanWindow = new MediaScan();
|
|
||||||
|
|
||||||
mediaScanWindow.DataContext = new MediaScanViewModel(_devicePath, mediaScanWindow);
|
|
||||||
|
|
||||||
mediaScanWindow.Show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -32,9 +32,11 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using Aaru.CommonTypes.Enums;
|
using Aaru.CommonTypes.Enums;
|
||||||
|
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||||
using Aaru.Core;
|
using Aaru.Core;
|
||||||
using Aaru.Decoders.SCSI.SSC;
|
using Aaru.Decoders.SCSI.SSC;
|
||||||
using Aaru.Devices;
|
using Aaru.Devices;
|
||||||
@@ -43,16 +45,22 @@ using Aaru.Gui.Views.Tabs;
|
|||||||
using Aaru.Gui.Views.Windows;
|
using Aaru.Gui.Views.Windows;
|
||||||
using Aaru.Localization;
|
using Aaru.Localization;
|
||||||
using Aaru.Logging;
|
using Aaru.Logging;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using Avalonia.Media.Imaging;
|
||||||
|
using Avalonia.Platform;
|
||||||
using Avalonia.Platform.Storage;
|
using Avalonia.Platform.Storage;
|
||||||
|
using Avalonia.Svg;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
using Humanizer;
|
using Humanizer;
|
||||||
|
using Humanizer.Bytes;
|
||||||
using Humanizer.Localisation;
|
using Humanizer.Localisation;
|
||||||
using MsBox.Avalonia;
|
using MsBox.Avalonia;
|
||||||
using MsBox.Avalonia.Base;
|
using MsBox.Avalonia.Base;
|
||||||
using MsBox.Avalonia.Enums;
|
using MsBox.Avalonia.Enums;
|
||||||
using DeviceInfo = Aaru.Core.Devices.Info.DeviceInfo;
|
using DeviceInfo = Aaru.Core.Devices.Info.DeviceInfo;
|
||||||
|
using ScsiInfo = Aaru.Core.Media.Info.ScsiInfo;
|
||||||
|
|
||||||
namespace Aaru.Gui.ViewModels.Windows;
|
namespace Aaru.Gui.ViewModels.Windows;
|
||||||
|
|
||||||
@@ -66,6 +74,10 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
string _blockSizeGranularity;
|
string _blockSizeGranularity;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
BlurayInfo _blurayInfo;
|
||||||
|
[ObservableProperty]
|
||||||
|
CompactDiscInfo _compactDiscInfo;
|
||||||
|
[ObservableProperty]
|
||||||
string _densities;
|
string _densities;
|
||||||
Device _dev;
|
Device _dev;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
@@ -73,6 +85,10 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
string _deviceType;
|
string _deviceType;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
DvdInfo _dvdInfo;
|
||||||
|
[ObservableProperty]
|
||||||
|
DvdWritableInfo _dvdWritableInfo;
|
||||||
|
[ObservableProperty]
|
||||||
string _firewireGuid;
|
string _firewireGuid;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
string _firewireManufacturer;
|
string _firewireManufacturer;
|
||||||
@@ -111,12 +127,27 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
string _maxBlockSize;
|
string _maxBlockSize;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
bool _mediaHasInformation;
|
||||||
|
ScsiInfo _mediaInfo;
|
||||||
|
[ObservableProperty]
|
||||||
|
bool _mediaIsInserted;
|
||||||
|
[ObservableProperty]
|
||||||
|
IImage _mediaLogo;
|
||||||
|
[ObservableProperty]
|
||||||
|
string _mediaSerial;
|
||||||
|
[ObservableProperty]
|
||||||
|
string _mediaSize;
|
||||||
|
[ObservableProperty]
|
||||||
|
string _mediaType;
|
||||||
|
[ObservableProperty]
|
||||||
string _mediumDensity;
|
string _mediumDensity;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
string _mediumTypes;
|
string _mediumTypes;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
string _minBlockSize;
|
string _minBlockSize;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
bool _mmcVisible;
|
||||||
|
[ObservableProperty]
|
||||||
string _model;
|
string _model;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
PcmciaInfo _pcmciaInfo;
|
PcmciaInfo _pcmciaInfo;
|
||||||
@@ -201,9 +232,21 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
string _revision;
|
string _revision;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
bool _saveGetConfigurationVisible;
|
||||||
|
[ObservableProperty]
|
||||||
|
bool _saveReadCapacity16Visible;
|
||||||
|
[ObservableProperty]
|
||||||
|
bool _saveReadCapacityVisible;
|
||||||
|
[ObservableProperty]
|
||||||
|
bool _saveReadMediaSerialVisible;
|
||||||
|
[ObservableProperty]
|
||||||
|
bool _saveRecognizedFormatLayersVisible;
|
||||||
|
[ObservableProperty]
|
||||||
bool _saveUsbDescriptorsEnabled;
|
bool _saveUsbDescriptorsEnabled;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
ScsiInfo _scsiInfo;
|
bool _saveWriteProtectionStatusVisible;
|
||||||
|
[ObservableProperty]
|
||||||
|
Views.Tabs.ScsiInfo _scsiInfo;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
string _scsiType;
|
string _scsiType;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
@@ -215,6 +258,8 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
string _statusMessage;
|
string _statusMessage;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
|
bool _statusMessageVisible;
|
||||||
|
[ObservableProperty]
|
||||||
bool _usbConnected;
|
bool _usbConnected;
|
||||||
byte[] _usbDescriptors;
|
byte[] _usbDescriptors;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
@@ -229,6 +274,8 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
string _usbVendorId;
|
string _usbVendorId;
|
||||||
[ObservableProperty]
|
[ObservableProperty]
|
||||||
bool _usbVisible;
|
bool _usbVisible;
|
||||||
|
[ObservableProperty]
|
||||||
|
XboxInfo _xboxInfo;
|
||||||
|
|
||||||
public DeviceViewModel(DeviceView window, string devicePath)
|
public DeviceViewModel(DeviceView window, string devicePath)
|
||||||
{
|
{
|
||||||
@@ -236,9 +283,52 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
DevicePath = devicePath;
|
DevicePath = devicePath;
|
||||||
|
|
||||||
SaveUsbDescriptorsCommand = new AsyncRelayCommand(SaveUsbDescriptorsAsync);
|
SaveUsbDescriptorsCommand = new AsyncRelayCommand(SaveUsbDescriptorsAsync);
|
||||||
|
SaveReadMediaSerialCommand = new AsyncRelayCommand(SaveReadMediaSerialAsync);
|
||||||
|
SaveReadCapacityCommand = new AsyncRelayCommand(SaveReadCapacityAsync);
|
||||||
|
SaveReadCapacity16Command = new AsyncRelayCommand(SaveReadCapacity16Async);
|
||||||
|
SaveGetConfigurationCommand = new AsyncRelayCommand(SaveGetConfigurationAsync);
|
||||||
|
SaveRecognizedFormatLayersCommand = new AsyncRelayCommand(SaveRecognizedFormatLayersAsync);
|
||||||
|
SaveWriteProtectionStatusCommand = new AsyncRelayCommand(SaveWriteProtectionStatusAsync);
|
||||||
|
DumpCommand = new AsyncRelayCommand(DumpAsync);
|
||||||
|
ScanCommand = new AsyncRelayCommand(ScanAsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICommand SaveUsbDescriptorsCommand { get; }
|
public ICommand SaveUsbDescriptorsCommand { get; }
|
||||||
|
public ICommand SaveReadMediaSerialCommand { get; }
|
||||||
|
public ICommand SaveReadCapacityCommand { get; }
|
||||||
|
public ICommand SaveReadCapacity16Command { get; }
|
||||||
|
public ICommand SaveGetConfigurationCommand { get; }
|
||||||
|
public ICommand SaveRecognizedFormatLayersCommand { get; }
|
||||||
|
public ICommand SaveWriteProtectionStatusCommand { get; }
|
||||||
|
public ICommand DumpCommand { get; }
|
||||||
|
public ICommand ScanCommand { get; }
|
||||||
|
|
||||||
|
Task SaveReadMediaSerialAsync() => SaveElementAsync(_mediaInfo.MediaSerialNumber);
|
||||||
|
|
||||||
|
Task SaveReadCapacityAsync() => SaveElementAsync(_mediaInfo.ReadCapacity);
|
||||||
|
|
||||||
|
Task SaveReadCapacity16Async() => SaveElementAsync(_mediaInfo.ReadCapacity16);
|
||||||
|
|
||||||
|
Task SaveGetConfigurationAsync() => SaveElementAsync(_mediaInfo.MmcConfiguration);
|
||||||
|
|
||||||
|
Task SaveRecognizedFormatLayersAsync() => SaveElementAsync(_mediaInfo.RecognizedFormatLayers);
|
||||||
|
|
||||||
|
Task SaveWriteProtectionStatusAsync() => SaveElementAsync(_mediaInfo.WriteProtectionStatus);
|
||||||
|
|
||||||
|
async Task SaveElementAsync(byte[] data)
|
||||||
|
{
|
||||||
|
IStorageFile result = await _window.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
|
||||||
|
{
|
||||||
|
FileTypeChoices = [FilePickerFileTypes.Binary]
|
||||||
|
});
|
||||||
|
|
||||||
|
if(result is null) return;
|
||||||
|
|
||||||
|
var saveFs = new FileStream(result.Path.AbsolutePath, FileMode.Create);
|
||||||
|
await saveFs.WriteAsync(data, 0, data.Length);
|
||||||
|
|
||||||
|
saveFs.Close();
|
||||||
|
}
|
||||||
|
|
||||||
public void LoadData()
|
public void LoadData()
|
||||||
{
|
{
|
||||||
@@ -262,7 +352,11 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
|
|
||||||
void Worker()
|
void Worker()
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Invoke(() => StatusMessage = "Opening device...");
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
|
{
|
||||||
|
StatusMessageVisible = true;
|
||||||
|
StatusMessage = "Opening device...";
|
||||||
|
});
|
||||||
|
|
||||||
var dev = Device.Create(DevicePath, out ErrorNumber devErrno);
|
var dev = Device.Create(DevicePath, out ErrorNumber devErrno);
|
||||||
|
|
||||||
@@ -321,11 +415,11 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
|
|
||||||
Statistics.AddDevice(dev);
|
Statistics.AddDevice(dev);
|
||||||
|
|
||||||
Dispatcher.UIThread.Invoke(() => { StatusMessage = "Querying device information..."; });
|
Dispatcher.UIThread.Invoke(() => StatusMessage = "Querying device information...");
|
||||||
|
|
||||||
var devInfo = new DeviceInfo(dev);
|
var devInfo = new DeviceInfo(dev);
|
||||||
|
|
||||||
Dispatcher.UIThread.Invoke(() => { StatusMessage = "Device information queryied successfully..."; });
|
Dispatcher.UIThread.Invoke(() => StatusMessage = "Device information queryied successfully...");
|
||||||
|
|
||||||
if(devInfo.IsUsb)
|
if(devInfo.IsUsb)
|
||||||
{
|
{
|
||||||
@@ -378,6 +472,8 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
devInfo.AtaMcptError,
|
devInfo.AtaMcptError,
|
||||||
_window)
|
_window)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MediaIsInserted = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,7 +481,7 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
Dispatcher.UIThread.Invoke(() =>
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
{
|
{
|
||||||
ScsiInfo = new ScsiInfo
|
ScsiInfo = new Views.Tabs.ScsiInfo
|
||||||
{
|
{
|
||||||
DataContext = new ScsiInfoViewModel(devInfo.ScsiInquiryData,
|
DataContext = new ScsiInfoViewModel(devInfo.ScsiInquiryData,
|
||||||
devInfo.ScsiInquiry,
|
devInfo.ScsiInquiry,
|
||||||
@@ -519,13 +615,12 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
|
|
||||||
PlextorVariRec = devInfo.PlextorFeatures.VariRec;
|
PlextorVariRec = devInfo.PlextorFeatures.VariRec;
|
||||||
|
|
||||||
if(devInfo.PlextorFeatures.IsDvd)
|
if(!devInfo.PlextorFeatures.IsDvd) return;
|
||||||
{
|
|
||||||
PlextorVariRecDvd = devInfo.PlextorFeatures.VariRecDvd;
|
PlextorVariRecDvd = devInfo.PlextorFeatures.VariRecDvd;
|
||||||
PlextorBitSetting = devInfo.PlextorFeatures.BitSetting;
|
PlextorBitSetting = devInfo.PlextorFeatures.BitSetting;
|
||||||
PlextorBitSettingDl = devInfo.PlextorFeatures.BitSettingDl;
|
PlextorBitSettingDl = devInfo.PlextorFeatures.BitSettingDl;
|
||||||
PlextorDvdPlusWriteTest = devInfo.PlextorFeatures.DvdPlusWriteTest;
|
PlextorDvdPlusWriteTest = devInfo.PlextorFeatures.DvdPlusWriteTest;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -617,6 +712,233 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
DensitySupport.PrettifyMediumType(devInfo.MediumDensitySupport);
|
DensitySupport.PrettifyMediumType(devInfo.MediumDensitySupport);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Invoke(() => StatusMessage = "Querying media information...");
|
||||||
|
|
||||||
|
var mediaInfo = new ScsiInfo(dev);
|
||||||
|
|
||||||
|
if(!mediaInfo.MediaInserted)
|
||||||
|
{
|
||||||
|
Dispatcher.UIThread.Invoke(() => StatusMessageVisible = false);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MediaIsInserted = true;
|
||||||
|
|
||||||
|
var genericHddIcon =
|
||||||
|
new Bitmap(AssetLoader.Open(new Uri("avares://Aaru.Gui/Assets/Icons/oxygen/32x32/drive-harddisk.png")));
|
||||||
|
|
||||||
|
var genericOpticalIcon =
|
||||||
|
new Bitmap(AssetLoader.Open(new Uri("avares://Aaru.Gui/Assets/Icons/oxygen/32x32/drive-optical.png")));
|
||||||
|
|
||||||
|
var genericFolderIcon =
|
||||||
|
new Bitmap(AssetLoader
|
||||||
|
.Open(new Uri("avares://Aaru.Gui/Assets/Icons/oxygen/32x32/inode-directory.png")));
|
||||||
|
|
||||||
|
var mediaResource = new Uri($"avares://Aaru.Gui/Assets/Logos/Media/{mediaInfo.MediaType}.svg");
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
|
{
|
||||||
|
MediaLogo = AssetLoader.Exists(mediaResource)
|
||||||
|
? new SvgImage
|
||||||
|
{
|
||||||
|
Source = SvgSource.Load(AssetLoader.Open(mediaResource))
|
||||||
|
}
|
||||||
|
: dev.ScsiType == PeripheralDeviceTypes.DirectAccess
|
||||||
|
? genericHddIcon
|
||||||
|
: dev.ScsiType == PeripheralDeviceTypes.MultiMediaDevice
|
||||||
|
? genericOpticalIcon
|
||||||
|
: genericFolderIcon;
|
||||||
|
|
||||||
|
MediaType = mediaInfo.MediaType.ToString();
|
||||||
|
});
|
||||||
|
|
||||||
|
if(mediaInfo.Blocks != 0 && mediaInfo.BlockSize != 0)
|
||||||
|
{
|
||||||
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
|
{
|
||||||
|
MediaSize =
|
||||||
|
string.Format(Localization.Core
|
||||||
|
.Media_has_0_blocks_of_1_bytes_each_for_a_total_of_2,
|
||||||
|
mediaInfo.Blocks,
|
||||||
|
mediaInfo.BlockSize,
|
||||||
|
ByteSize.FromBytes(mediaInfo.Blocks *
|
||||||
|
mediaInfo.BlockSize)
|
||||||
|
.ToString("0.000"));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if(mediaInfo.MediaSerialNumber != null)
|
||||||
|
{
|
||||||
|
var sbSerial = new StringBuilder();
|
||||||
|
|
||||||
|
for(var i = 4; i < mediaInfo.MediaSerialNumber.Length; i++)
|
||||||
|
sbSerial.Append($"{mediaInfo.MediaSerialNumber[i]:X2}");
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Invoke(() => MediaSerial = sbSerial.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
|
{
|
||||||
|
MediaHasInformation = true;
|
||||||
|
|
||||||
|
SaveReadMediaSerialVisible = mediaInfo.MediaSerialNumber != null;
|
||||||
|
SaveReadCapacityVisible = mediaInfo.ReadCapacity != null;
|
||||||
|
SaveReadCapacity16Visible = mediaInfo.ReadCapacity16 != null;
|
||||||
|
|
||||||
|
SaveGetConfigurationVisible = mediaInfo.MmcConfiguration != null;
|
||||||
|
|
||||||
|
SaveRecognizedFormatLayersVisible = mediaInfo.RecognizedFormatLayers != null;
|
||||||
|
|
||||||
|
SaveWriteProtectionStatusVisible = mediaInfo.WriteProtectionStatus != null;
|
||||||
|
|
||||||
|
MmcVisible = SaveGetConfigurationVisible ||
|
||||||
|
SaveRecognizedFormatLayersVisible ||
|
||||||
|
SaveWriteProtectionStatusVisible;
|
||||||
|
});
|
||||||
|
|
||||||
|
_mediaInfo = mediaInfo;
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Invoke(() =>
|
||||||
|
{
|
||||||
|
if(_mediaInfo.Toc != null ||
|
||||||
|
_mediaInfo.Atip != null ||
|
||||||
|
_mediaInfo.DiscInformation != null ||
|
||||||
|
_mediaInfo.Session != null ||
|
||||||
|
_mediaInfo.RawToc != null ||
|
||||||
|
_mediaInfo.Pma != null ||
|
||||||
|
_mediaInfo.CdTextLeadIn != null ||
|
||||||
|
_mediaInfo.DecodedToc != null ||
|
||||||
|
_mediaInfo.DecodedAtip != null ||
|
||||||
|
_mediaInfo.DecodedSession != null ||
|
||||||
|
_mediaInfo.FullToc != null ||
|
||||||
|
_mediaInfo.DecodedCdTextLeadIn != null ||
|
||||||
|
_mediaInfo.DecodedDiscInformation != null ||
|
||||||
|
_mediaInfo.Mcn != null ||
|
||||||
|
_mediaInfo.Isrcs != null)
|
||||||
|
{
|
||||||
|
CompactDiscInfo = new CompactDiscInfo
|
||||||
|
{
|
||||||
|
DataContext = new CompactDiscInfoViewModel(_mediaInfo.Toc,
|
||||||
|
_mediaInfo.Atip,
|
||||||
|
_mediaInfo.DiscInformation,
|
||||||
|
_mediaInfo.Session,
|
||||||
|
_mediaInfo.RawToc,
|
||||||
|
_mediaInfo.Pma,
|
||||||
|
_mediaInfo.CdTextLeadIn,
|
||||||
|
_mediaInfo.DecodedToc,
|
||||||
|
_mediaInfo.DecodedAtip,
|
||||||
|
_mediaInfo.DecodedSession,
|
||||||
|
_mediaInfo.FullToc,
|
||||||
|
_mediaInfo.DecodedCdTextLeadIn,
|
||||||
|
_mediaInfo.DecodedDiscInformation,
|
||||||
|
_mediaInfo.Mcn,
|
||||||
|
_mediaInfo.Isrcs,
|
||||||
|
_window)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_mediaInfo.DvdPfi != null ||
|
||||||
|
_mediaInfo.DvdDmi != null ||
|
||||||
|
_mediaInfo.DvdCmi != null ||
|
||||||
|
_mediaInfo.HddvdCopyrightInformation != null ||
|
||||||
|
_mediaInfo.DvdBca != null ||
|
||||||
|
_mediaInfo.DvdAacs != null ||
|
||||||
|
_mediaInfo.DecodedPfi != null)
|
||||||
|
{
|
||||||
|
DvdInfo = new DvdInfo
|
||||||
|
{
|
||||||
|
DataContext = new DvdInfoViewModel(_mediaInfo.DvdPfi,
|
||||||
|
_mediaInfo.DvdDmi,
|
||||||
|
_mediaInfo.DvdCmi,
|
||||||
|
_mediaInfo.HddvdCopyrightInformation,
|
||||||
|
_mediaInfo.DvdBca,
|
||||||
|
_mediaInfo.DvdAacs,
|
||||||
|
_mediaInfo.DecodedPfi,
|
||||||
|
_window)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_mediaInfo.XgdInfo != null ||
|
||||||
|
_mediaInfo.DvdDmi != null ||
|
||||||
|
_mediaInfo.XboxSecuritySector != null ||
|
||||||
|
_mediaInfo.DecodedXboxSecuritySector != null)
|
||||||
|
{
|
||||||
|
XboxInfo = new XboxInfo
|
||||||
|
{
|
||||||
|
DataContext = new XboxInfoViewModel(_mediaInfo.XgdInfo,
|
||||||
|
_mediaInfo.DvdDmi,
|
||||||
|
_mediaInfo.XboxSecuritySector,
|
||||||
|
_mediaInfo.DecodedXboxSecuritySector,
|
||||||
|
_window)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_mediaInfo.DvdRamDds != null ||
|
||||||
|
_mediaInfo.DvdRamCartridgeStatus != null ||
|
||||||
|
_mediaInfo.DvdRamSpareArea != null ||
|
||||||
|
_mediaInfo.LastBorderOutRmd != null ||
|
||||||
|
_mediaInfo.DvdPreRecordedInfo != null ||
|
||||||
|
_mediaInfo.DvdrMediaIdentifier != null ||
|
||||||
|
_mediaInfo.DvdrPhysicalInformation != null ||
|
||||||
|
_mediaInfo.HddvdrMediumStatus != null ||
|
||||||
|
_mediaInfo.HddvdrLastRmd != null ||
|
||||||
|
_mediaInfo.DvdrLayerCapacity != null ||
|
||||||
|
_mediaInfo.DvdrDlMiddleZoneStart != null ||
|
||||||
|
_mediaInfo.DvdrDlJumpIntervalSize != null ||
|
||||||
|
_mediaInfo.DvdrDlManualLayerJumpStartLba != null ||
|
||||||
|
_mediaInfo.DvdrDlRemapAnchorPoint != null ||
|
||||||
|
_mediaInfo.DvdPlusAdip != null ||
|
||||||
|
_mediaInfo.DvdPlusDcb != null)
|
||||||
|
{
|
||||||
|
DvdWritableInfo = new DvdWritableInfo
|
||||||
|
{
|
||||||
|
DataContext = new DvdWritableInfoViewModel(_mediaInfo.DvdRamDds,
|
||||||
|
_mediaInfo.DvdRamCartridgeStatus,
|
||||||
|
_mediaInfo.DvdRamSpareArea,
|
||||||
|
_mediaInfo.LastBorderOutRmd,
|
||||||
|
_mediaInfo.DvdPreRecordedInfo,
|
||||||
|
_mediaInfo.DvdrMediaIdentifier,
|
||||||
|
_mediaInfo.DvdrPhysicalInformation,
|
||||||
|
_mediaInfo.HddvdrMediumStatus,
|
||||||
|
_mediaInfo.HddvdrLastRmd,
|
||||||
|
_mediaInfo.DvdrLayerCapacity,
|
||||||
|
_mediaInfo.DvdrDlMiddleZoneStart,
|
||||||
|
_mediaInfo.DvdrDlJumpIntervalSize,
|
||||||
|
_mediaInfo.DvdrDlManualLayerJumpStartLba,
|
||||||
|
_mediaInfo.DvdrDlRemapAnchorPoint,
|
||||||
|
_mediaInfo.DvdPlusAdip,
|
||||||
|
_mediaInfo.DvdPlusDcb,
|
||||||
|
_window)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_mediaInfo.BlurayDiscInformation != null ||
|
||||||
|
_mediaInfo.BlurayBurstCuttingArea != null ||
|
||||||
|
_mediaInfo.BlurayDds != null ||
|
||||||
|
_mediaInfo.BlurayCartridgeStatus != null ||
|
||||||
|
_mediaInfo.BluraySpareAreaInformation != null ||
|
||||||
|
_mediaInfo.BlurayPowResources != null ||
|
||||||
|
_mediaInfo.BlurayTrackResources != null ||
|
||||||
|
_mediaInfo.BlurayRawDfl != null ||
|
||||||
|
_mediaInfo.BlurayPac != null)
|
||||||
|
{
|
||||||
|
BlurayInfo = new BlurayInfo
|
||||||
|
{
|
||||||
|
DataContext = new BlurayInfoViewModel(_mediaInfo.BlurayDiscInformation,
|
||||||
|
_mediaInfo.BlurayBurstCuttingArea,
|
||||||
|
_mediaInfo.BlurayDds,
|
||||||
|
_mediaInfo.BlurayCartridgeStatus,
|
||||||
|
_mediaInfo.BluraySpareAreaInformation,
|
||||||
|
_mediaInfo.BlurayPowResources,
|
||||||
|
_mediaInfo.BlurayTrackResources,
|
||||||
|
_mediaInfo.BlurayRawDfl,
|
||||||
|
_mediaInfo.BlurayPac,
|
||||||
|
_window)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if(devInfo.CID != null ||
|
if(devInfo.CID != null ||
|
||||||
@@ -636,12 +958,91 @@ public partial class DeviceViewModel : ViewModelBase
|
|||||||
devInfo.ExtendedCSD,
|
devInfo.ExtendedCSD,
|
||||||
devInfo.SCR)
|
devInfo.SCR)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MediaIsInserted = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Invoke(() => StatusMessageVisible = false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Closed()
|
public void Closed()
|
||||||
{
|
{
|
||||||
_dev?.Close();
|
_dev?.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async Task DumpAsync()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
switch(_scsiInfo.MediaType)
|
||||||
|
{
|
||||||
|
case CommonTypes.MediaType.GDR or CommonTypes.MediaType.GDROM:
|
||||||
|
await MessageBoxManager
|
||||||
|
.GetMessageBoxStandard(UI.Title_Error,
|
||||||
|
Localization.Core.GD_ROM_dump_support_is_not_yet_implemented,
|
||||||
|
ButtonEnum.Ok,
|
||||||
|
Icon.Error)
|
||||||
|
.ShowWindowDialogAsync(_view);
|
||||||
|
|
||||||
|
return;
|
||||||
|
case CommonTypes.MediaType.XGD or CommonTypes.MediaType.XGD2 or CommonTypes.MediaType.XGD3
|
||||||
|
when _scsiInfo.DeviceInfo.ScsiInquiry?.KreonPresent != true:
|
||||||
|
await MessageBoxManager
|
||||||
|
.GetMessageBoxStandard(UI.Title_Error,
|
||||||
|
Localization.Core
|
||||||
|
.Dumping_Xbox_Game_Discs_requires_a_drive_with_Kreon_firmware,
|
||||||
|
ButtonEnum.Ok,
|
||||||
|
Icon.Error)
|
||||||
|
.ShowWindowDialogAsync(_view);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var mediaDumpWindow = new MediaDump();
|
||||||
|
|
||||||
|
mediaDumpWindow.DataContext =
|
||||||
|
new MediaDumpViewModel(_devicePath, _scsiInfo.DeviceInfo, mediaDumpWindow, _scsiInfo);
|
||||||
|
|
||||||
|
mediaDumpWindow.Show();
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
async Task ScanAsync()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
switch(_scsiInfo.MediaType)
|
||||||
|
{
|
||||||
|
// TODO: GD-ROM
|
||||||
|
case CommonTypes.MediaType.GDR:
|
||||||
|
case CommonTypes.MediaType.GDROM:
|
||||||
|
await MessageBoxManager
|
||||||
|
.GetMessageBoxStandard(UI.Title_Error,
|
||||||
|
Localization.Core.GD_ROM_scan_support_is_not_yet_implemented,
|
||||||
|
ButtonEnum.Ok,
|
||||||
|
Icon.Error)
|
||||||
|
.ShowWindowDialogAsync(_view);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
// TODO: Xbox
|
||||||
|
case CommonTypes.MediaType.XGD:
|
||||||
|
case CommonTypes.MediaType.XGD2:
|
||||||
|
case CommonTypes.MediaType.XGD3:
|
||||||
|
await MessageBoxManager.GetMessageBoxStandard(UI.Title_Error,
|
||||||
|
Localization.Core
|
||||||
|
.Scanning_Xbox_discs_is_not_yet_supported,
|
||||||
|
ButtonEnum.Ok,
|
||||||
|
Icon.Error)
|
||||||
|
.ShowWindowDialogAsync(_view);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var mediaScanWindow = new MediaScan();
|
||||||
|
|
||||||
|
mediaScanWindow.DataContext = new MediaScanViewModel(_devicePath, mediaScanWindow);
|
||||||
|
|
||||||
|
mediaScanWindow.Show();
|
||||||
|
*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,171 +0,0 @@
|
|||||||
<!--
|
|
||||||
// /***************************************************************************
|
|
||||||
// Aaru Data Preservation Suite
|
|
||||||
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
|
||||||
//
|
|
||||||
// Filename : MediaInfo.xaml
|
|
||||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
||||||
//
|
|
||||||
// Component : GUI panel.
|
|
||||||
//
|
|
||||||
// ‐‐[ Description ] ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
|
||||||
//
|
|
||||||
// Media information panel.
|
|
||||||
//
|
|
||||||
// ‐‐[ 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/>.
|
|
||||||
//
|
|
||||||
// ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐
|
|
||||||
// Copyright © 2011-2025 Natalia Portillo
|
|
||||||
// ****************************************************************************/
|
|
||||||
-->
|
|
||||||
<UserControl xmlns="https://github.com/avaloniaui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:panels="clr-namespace:Aaru.Gui.ViewModels.Panels"
|
|
||||||
xmlns:localization="clr-namespace:Aaru.Localization;assembly=Aaru.Localization"
|
|
||||||
mc:Ignorable="d"
|
|
||||||
d:DesignWidth="800"
|
|
||||||
d:DesignHeight="450"
|
|
||||||
x:DataType="panels:MediaInfoViewModel"
|
|
||||||
x:Class="Aaru.Gui.Views.Panels.MediaInfo">
|
|
||||||
<Design.DataContext>
|
|
||||||
<panels:MediaInfoViewModel />
|
|
||||||
</Design.DataContext>
|
|
||||||
<StackPanel Orientation="Vertical">
|
|
||||||
<TextBlock HorizontalAlignment="Center"
|
|
||||||
Text="{x:Static localization:UI.Title_Media_information}" />
|
|
||||||
<Image Width="128"
|
|
||||||
Height="128"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Source="{Binding MediaLogo}" />
|
|
||||||
<TabControl>
|
|
||||||
<TabItem IsVisible="{Binding GeneralVisible}">
|
|
||||||
<TabItem.Header>
|
|
||||||
<TextBlock Text="{x:Static localization:UI.Title_General}" />
|
|
||||||
</TabItem.Header>
|
|
||||||
<StackPanel Orientation="Vertical">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.Title_Media_type}" />
|
|
||||||
<TextBox Text="{Binding MediaType}"
|
|
||||||
IsReadOnly="True" />
|
|
||||||
</StackPanel>
|
|
||||||
<TextBlock IsVisible="{Binding !!MediaSize}"
|
|
||||||
Text="{Binding MediaSize}" />
|
|
||||||
<StackPanel Orientation="Horizontal"
|
|
||||||
IsVisible="{Binding !!MediaSerial}">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.Title_Media_serial_number}" />
|
|
||||||
<TextBox Text="{Binding MediaSerial}"
|
|
||||||
IsReadOnly="True" />
|
|
||||||
</StackPanel>
|
|
||||||
<Button IsVisible="{Binding SaveReadMediaSerialVisible}"
|
|
||||||
Command="{Binding SaveReadMediaSerialCommand}">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_READ_MEDIA_SERIAL_NUMBER_response}" />
|
|
||||||
</Button>
|
|
||||||
<Button IsVisible="{Binding SaveReadCapacityVisible}"
|
|
||||||
Command="{Binding SaveReadCapacityCommand}">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_READ_CAPACITY_response}" />
|
|
||||||
</Button>
|
|
||||||
<Button IsVisible="{Binding SaveReadCapacity16Visible}"
|
|
||||||
Command="{Binding SaveReadCapacity16Command}">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_READ_CAPACITY_16_response}" />
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem IsVisible="{Binding MmcVisible}">
|
|
||||||
<TabItem.Header>
|
|
||||||
<TextBlock Text="{x:Static localization:Core.Title_MMC}" />
|
|
||||||
</TabItem.Header>
|
|
||||||
<StackPanel Orientation="Vertical">
|
|
||||||
<Button IsVisible="{Binding SaveGetConfigurationVisible}"
|
|
||||||
Command="{Binding SaveGetConfigurationCommand}">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_GET_CONFIGURATION_response}" />
|
|
||||||
</Button>
|
|
||||||
<Button IsVisible="{Binding SaveRecognizedFormatLayersVisible}"
|
|
||||||
Command="{Binding SaveRecognizedFormatLayersCommand}">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_RECOGNIZED_FORMAT_LAYERS_response}" />
|
|
||||||
</Button>
|
|
||||||
<Button IsVisible="{Binding SaveWriteProtectionStatusVisible}"
|
|
||||||
Command="{Binding SaveWriteProtectionStatusCommand}">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_WRITE_PROTECTION_STATUS_response}" />
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem IsVisible="{Binding SscVisible}">
|
|
||||||
<TabItem.Header>
|
|
||||||
<TextBlock Text="{x:Static localization:Core.Title_SSC}" />
|
|
||||||
</TabItem.Header>
|
|
||||||
<StackPanel Orientation="Vertical">
|
|
||||||
<TextBlock IsVisible="{Binding !!DensitySupport}"
|
|
||||||
Text="{x:Static localization:UI.Densities_supported_by_currently_inserted_media}" />
|
|
||||||
<TextBox IsVisible="{Binding !!DensitySupport}"
|
|
||||||
Text="{Binding DensitySupport}"
|
|
||||||
IsReadOnly="True" />
|
|
||||||
<TextBlock IsVisible="{Binding !!MediumSupport}"
|
|
||||||
Text="{x:Static localization:UI.Medium_types_currently_inserted_in_device}" />
|
|
||||||
<TextBox Text="{Binding MediumSupport}"
|
|
||||||
IsReadOnly="True" />
|
|
||||||
<Button IsVisible="{Binding SaveDensitySupportVisible}"
|
|
||||||
Command="{Binding SaveDensitySupportCommand}">
|
|
||||||
<TextBlock
|
|
||||||
Text="{x:Static localization:UI.ButtonLabel_Save_REPORT_DENSITY_SUPPORT_MEDIA_response}" />
|
|
||||||
</Button>
|
|
||||||
<Button IsVisible="{Binding SaveMediumSupportVisible}"
|
|
||||||
Command="{Binding SaveMediumSupportCommand}">
|
|
||||||
<TextBlock
|
|
||||||
Text="{x:Static localization:UI.ButtonLabel_Save_REPORT_DENSITY_SUPPORT_MEDIUM_MEDIA_response}" />
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</TabItem>
|
|
||||||
<TabItem IsVisible="{Binding !!CompactDiscInfo}">
|
|
||||||
<TabItem.Header>
|
|
||||||
<TextBlock Text="{x:Static localization:Core.Title_CompactDisc}" />
|
|
||||||
</TabItem.Header>
|
|
||||||
<ContentControl Content="{Binding CompactDiscInfo}" />
|
|
||||||
</TabItem>
|
|
||||||
<TabItem IsVisible="{Binding !!DvdInfo}">
|
|
||||||
<TabItem.Header>
|
|
||||||
<TextBlock Text="{x:Static localization:Core.Title_DVD}" />
|
|
||||||
</TabItem.Header>
|
|
||||||
<ContentControl Content="{Binding DvdInfo}" />
|
|
||||||
</TabItem>
|
|
||||||
<TabItem IsVisible="{Binding !!DvdWritableInfo}">
|
|
||||||
<TabItem.Header>
|
|
||||||
<TextBlock Text="{x:Static localization:Core.Title_DVD_Plus_Dash_R_W}" />
|
|
||||||
</TabItem.Header>
|
|
||||||
<ContentControl Content="{Binding DvdWritableInfo}" />
|
|
||||||
</TabItem>
|
|
||||||
<TabItem IsVisible="{Binding !!XboxInfo}">
|
|
||||||
<TabItem.Header>
|
|
||||||
<TextBlock Text="{x:Static localization:Core.Title_Xbox}" />
|
|
||||||
</TabItem.Header>
|
|
||||||
<ContentControl Content="{Binding XboxInfo}" />
|
|
||||||
</TabItem>
|
|
||||||
<TabItem IsVisible="{Binding !!BlurayInfo}">
|
|
||||||
<TabItem.Header>
|
|
||||||
<TextBlock Text="{x:Static localization:Core.Title_Blu_ray}" />
|
|
||||||
</TabItem.Header>
|
|
||||||
<ContentControl Content="{Binding BlurayInfo}" />
|
|
||||||
</TabItem>
|
|
||||||
</TabControl>
|
|
||||||
<Button Command="{Binding DumpCommand}">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Dump_media_to_image}" />
|
|
||||||
</Button>
|
|
||||||
<Button Command="{Binding ScanCommand}">
|
|
||||||
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Scan_media_surface}" />
|
|
||||||
</Button>
|
|
||||||
</StackPanel>
|
|
||||||
</UserControl>
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// /***************************************************************************
|
|
||||||
// Aaru Data Preservation Suite
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Filename : MediaInfo.xaml.cs
|
|
||||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
||||||
//
|
|
||||||
// Component : GUI panels.
|
|
||||||
//
|
|
||||||
// --[ Description ] ----------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Media information panel.
|
|
||||||
//
|
|
||||||
// --[ 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/>.
|
|
||||||
//
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// Copyright © 2011-2025 Natalia Portillo
|
|
||||||
// ****************************************************************************/
|
|
||||||
|
|
||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Markup.Xaml;
|
|
||||||
|
|
||||||
namespace Aaru.Gui.Views.Panels;
|
|
||||||
|
|
||||||
public sealed class MediaInfo : UserControl
|
|
||||||
{
|
|
||||||
public MediaInfo() => InitializeComponent();
|
|
||||||
|
|
||||||
void InitializeComponent() => AvaloniaXamlLoader.Load(this);
|
|
||||||
}
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
x:Class="Aaru.Gui.Views.Windows.DeviceView"
|
x:Class="Aaru.Gui.Views.Windows.DeviceView"
|
||||||
x:DataType="windows:DeviceViewModel"
|
x:DataType="windows:DeviceViewModel"
|
||||||
Title="{Binding DevicePath, Mode=OneWay}">
|
Title="{Binding DevicePath, Mode=OneWay}">
|
||||||
<Grid RowDefinitions="Auto,*, Auto"
|
<Grid RowDefinitions="Auto,*, Auto, Auto"
|
||||||
RowSpacing="8"
|
RowSpacing="8"
|
||||||
Margin="12">
|
Margin="12">
|
||||||
<Grid Grid.Row="0"
|
<Grid Grid.Row="0"
|
||||||
@@ -389,34 +389,42 @@
|
|||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Kreon}" />
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Kreon}" />
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<StackPanel Orientation="Vertical" Margin="8">
|
<StackPanel Orientation="Vertical"
|
||||||
|
Margin="8">
|
||||||
<CheckBox IsChecked="{Binding KreonChallengeResponse, Mode=OneWay}"
|
<CheckBox IsChecked="{Binding KreonChallengeResponse, Mode=OneWay}"
|
||||||
IsEnabled="False">
|
IsEnabled="False">
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:Core.Can_do_challenge_response_with_Xbox_discs}" />
|
<controls:SpectreTextBlock
|
||||||
|
Text="{x:Static localization:Core.Can_do_challenge_response_with_Xbox_discs}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox IsChecked="{Binding KreonDecryptSs, Mode=OneWay}"
|
<CheckBox IsChecked="{Binding KreonDecryptSs, Mode=OneWay}"
|
||||||
IsEnabled="False">
|
IsEnabled="False">
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:Core.Can_read_and_decrypt_SS_from_Xbox_discs}" />
|
<controls:SpectreTextBlock
|
||||||
|
Text="{x:Static localization:Core.Can_read_and_decrypt_SS_from_Xbox_discs}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox IsChecked="{Binding KreonXtremeUnlock, Mode=OneWay}"
|
<CheckBox IsChecked="{Binding KreonXtremeUnlock, Mode=OneWay}"
|
||||||
IsEnabled="False">
|
IsEnabled="False">
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:Core.Can_set_xtreme_unlock_state_with_Xbox_discs}" />
|
<controls:SpectreTextBlock
|
||||||
|
Text="{x:Static localization:Core.Can_set_xtreme_unlock_state_with_Xbox_discs}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox IsChecked="{Binding KreonWxripperUnlock, Mode=OneWay}"
|
<CheckBox IsChecked="{Binding KreonWxripperUnlock, Mode=OneWay}"
|
||||||
IsEnabled="False">
|
IsEnabled="False">
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:Core.Can_set_wxripper_unlock_state_with_Xbox_discs}" />
|
<controls:SpectreTextBlock
|
||||||
|
Text="{x:Static localization:Core.Can_set_wxripper_unlock_state_with_Xbox_discs}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox IsChecked="{Binding KreonChallengeResponse360, Mode=OneWay}"
|
<CheckBox IsChecked="{Binding KreonChallengeResponse360, Mode=OneWay}"
|
||||||
IsEnabled="False">
|
IsEnabled="False">
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:Core.Can_do_challenge_response_with_Xbox_360_discs}" />
|
<controls:SpectreTextBlock
|
||||||
|
Text="{x:Static localization:Core.Can_do_challenge_response_with_Xbox_360_discs}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox IsChecked="{Binding KreonDecryptSs360, Mode=OneWay}"
|
<CheckBox IsChecked="{Binding KreonDecryptSs360, Mode=OneWay}"
|
||||||
IsEnabled="False">
|
IsEnabled="False">
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:Core.Can_read_and_decrypt_SS_from_Xbox_360_discs}" />
|
<controls:SpectreTextBlock
|
||||||
|
Text="{x:Static localization:Core.Can_read_and_decrypt_SS_from_Xbox_360_discs}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox IsChecked="{Binding KreonXtremeUnlock360, Mode=OneWay}"
|
<CheckBox IsChecked="{Binding KreonXtremeUnlock360, Mode=OneWay}"
|
||||||
IsEnabled="False">
|
IsEnabled="False">
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:Core.Can_set_xtreme_unlock_state_with_Xbox_360_discs}" />
|
<controls:SpectreTextBlock
|
||||||
|
Text="{x:Static localization:Core.Can_set_xtreme_unlock_state_with_Xbox_360_discs}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
<CheckBox IsChecked="{Binding KreonWxripperUnlock360, Mode=OneWay}"
|
<CheckBox IsChecked="{Binding KreonWxripperUnlock360, Mode=OneWay}"
|
||||||
IsEnabled="False">
|
IsEnabled="False">
|
||||||
@@ -437,8 +445,11 @@
|
|||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
<TextBlock Text="{x:Static localization:UI.SSC_Label}" />
|
<TextBlock Text="{x:Static localization:UI.SSC_Label}" />
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<StackPanel Orientation="Vertical" Margin="8" Spacing="8">
|
<StackPanel Orientation="Vertical"
|
||||||
<StackPanel Orientation="Vertical" Spacing="8"
|
Margin="8"
|
||||||
|
Spacing="8">
|
||||||
|
<StackPanel Orientation="Vertical"
|
||||||
|
Spacing="8"
|
||||||
IsVisible="{Binding BlockLimits, Mode=OneWay}">
|
IsVisible="{Binding BlockLimits, Mode=OneWay}">
|
||||||
<controls:SpectreTextBlock Text="{Binding MinBlockSize, Mode=OneWay}"
|
<controls:SpectreTextBlock Text="{Binding MinBlockSize, Mode=OneWay}"
|
||||||
IsVisible="{Binding !!MinBlockSize, Mode=OneWay}" />
|
IsVisible="{Binding !!MinBlockSize, Mode=OneWay}" />
|
||||||
@@ -447,15 +458,19 @@
|
|||||||
<controls:SpectreTextBlock Text="{Binding BlockSizeGranularity, Mode=OneWay}"
|
<controls:SpectreTextBlock Text="{Binding BlockSizeGranularity, Mode=OneWay}"
|
||||||
IsVisible="{Binding !!BlockSizeGranularity, Mode=OneWay}" />
|
IsVisible="{Binding !!BlockSizeGranularity, Mode=OneWay}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Vertical" Spacing="8"
|
<StackPanel Orientation="Vertical"
|
||||||
|
Spacing="8"
|
||||||
IsVisible="{Binding !!Densities, Mode=OneWay}">
|
IsVisible="{Binding !!Densities, Mode=OneWay}">
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:UI.Densities_supported_by_device}" VerticalAlignment="Center"/>
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Densities_supported_by_device}"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
<TextBox Text="{Binding Densities, Mode=OneWay}"
|
<TextBox Text="{Binding Densities, Mode=OneWay}"
|
||||||
IsReadOnly="True" />
|
IsReadOnly="True" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Orientation="Vertical" Spacing="8"
|
<StackPanel Orientation="Vertical"
|
||||||
|
Spacing="8"
|
||||||
IsVisible="{Binding !!MediumTypes, Mode=OneWay}">
|
IsVisible="{Binding !!MediumTypes, Mode=OneWay}">
|
||||||
<controls:SpectreTextBlock Text="{x:Static localization:UI.Medium_types_supported_by_device}" VerticalAlignment="Center"/>
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Medium_types_supported_by_device}"
|
||||||
|
VerticalAlignment="Center" />
|
||||||
<TextBox Text="{Binding MediumTypes, Mode=OneWay}"
|
<TextBox Text="{Binding MediumTypes, Mode=OneWay}"
|
||||||
IsReadOnly="True" />
|
IsReadOnly="True" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -466,30 +481,148 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem IsVisible="{Binding !!PcmciaInfo, Mode=OneWay}">
|
<TabItem IsVisible="{Binding !!PcmciaInfo, Mode=OneWay}">
|
||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
<TextBlock Text="{x:Static localization:UI.Title_PCMCIA}" />
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Title_PCMCIA}" />
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<ContentControl Content="{Binding PcmciaInfo, Mode=OneWay}" />
|
<ContentControl Content="{Binding PcmciaInfo, Mode=OneWay}" />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem IsVisible="{Binding !!AtaInfo, Mode=OneWay}">
|
<TabItem IsVisible="{Binding !!AtaInfo, Mode=OneWay}">
|
||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
<TextBlock Text="{x:Static localization:UI.Title_ATA_ATAPI}" />
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Title_ATA_ATAPI}" />
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<ContentControl Content="{Binding AtaInfo, Mode=OneWay}" />
|
<ContentControl Content="{Binding AtaInfo, Mode=OneWay}" />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem IsVisible="{Binding !!ScsiInfo, Mode=OneWay}">
|
<TabItem IsVisible="{Binding !!ScsiInfo, Mode=OneWay}">
|
||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
<TextBlock Text="{x:Static localization:UI.Title_SCSI}" />
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Title_SCSI}" />
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<ContentControl Content="{Binding ScsiInfo, Mode=OneWay}" />
|
<ContentControl Content="{Binding ScsiInfo, Mode=OneWay}" />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem IsVisible="{Binding !!SdMmcInfo, Mode=OneWay}">
|
<TabItem IsVisible="{Binding !!SdMmcInfo, Mode=OneWay}">
|
||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
<TextBlock Text="{x:Static localization:UI.Title_SD_MMC}" />
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Title_SD_MMC}" />
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<ContentControl Content="{Binding SdMmcInfo, Mode=OneWay}" />
|
<ContentControl Content="{Binding SdMmcInfo, Mode=OneWay}" />
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
<TabItem IsVisible="{Binding MediaHasInformation, Mode=OneWay}">
|
||||||
|
<TabItem.Header>
|
||||||
|
<controls:SpectreTextBlock Text="{x:Static localization:UI.Title_Media_information}" />
|
||||||
|
</TabItem.Header>
|
||||||
|
<Grid RowDefinitions="Auto,*,Auto"
|
||||||
|
Margin="8"
|
||||||
|
RowSpacing="8">
|
||||||
|
<Border Grid.Row="0"
|
||||||
|
Width="160"
|
||||||
|
Height="160"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Background="LightGray"
|
||||||
|
CornerRadius="80"
|
||||||
|
Padding="16">
|
||||||
|
<Image Width="128"
|
||||||
|
Height="128"
|
||||||
|
Source="{Binding MediaLogo, Mode=OneWay}" />
|
||||||
|
</Border>
|
||||||
|
<StackPanel Grid.Row="1"
|
||||||
|
Orientation="Vertical">
|
||||||
|
<Grid ColumnDefinitions="Auto, *"
|
||||||
|
ColumnSpacing="8">
|
||||||
|
<controls:SpectreTextBlock Grid.Column="0"
|
||||||
|
Text="{x:Static localization:UI.Title_Media_type}" />
|
||||||
|
<controls:SpectreTextBlock Grid.Column="1"
|
||||||
|
Text="{Binding MediaType, Mode=OneWay}" />
|
||||||
|
</Grid>
|
||||||
|
<controls:SpectreTextBlock IsVisible="{Binding !!MediaSize, Mode=OneWay}"
|
||||||
|
Text="{Binding MediaSize, Mode=OneWay}" />
|
||||||
|
<Grid ColumnDefinitions="Auto, *"
|
||||||
|
ColumnSpacing="8"
|
||||||
|
IsVisible="{Binding !!MediaSerial, Mode=OneWay}">
|
||||||
|
<controls:SpectreTextBlock Grid.Column="0"
|
||||||
|
Text="{x:Static localization:UI.Title_Media_serial_number}" />
|
||||||
|
<controls:SpectreTextBlock Grid.Column="1"
|
||||||
|
Text="{Binding MediaSerial, Mode=OneWay}" />
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Row="2"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<Button IsVisible="{Binding SaveReadMediaSerialVisible, Mode=OneWay}"
|
||||||
|
Command="{Binding SaveReadMediaSerialCommand, Mode=OneWay}">
|
||||||
|
<TextBlock
|
||||||
|
Text="{x:Static localization:UI.ButtonLabel_Save_READ_MEDIA_SERIAL_NUMBER_response}" />
|
||||||
|
</Button>
|
||||||
|
<Button IsVisible="{Binding SaveReadCapacityVisible, Mode=OneWay}"
|
||||||
|
Command="{Binding SaveReadCapacityCommand, Mode=OneWay}">
|
||||||
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_READ_CAPACITY_response}" />
|
||||||
|
</Button>
|
||||||
|
<Button IsVisible="{Binding SaveReadCapacity16Visible, Mode=OneWay}"
|
||||||
|
Command="{Binding SaveReadCapacity16Command, Mode=OneWay}">
|
||||||
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_READ_CAPACITY_16_response}" />
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem IsVisible="{Binding MmcVisible, Mode=OneWay}">
|
||||||
|
<TabItem.Header>
|
||||||
|
<TextBlock Text="{x:Static localization:Core.Title_MMC}" />
|
||||||
|
</TabItem.Header>
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Button IsVisible="{Binding SaveGetConfigurationVisible, Mode=OneWay}"
|
||||||
|
Command="{Binding SaveGetConfigurationCommand, Mode=OneWay}">
|
||||||
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_GET_CONFIGURATION_response}" />
|
||||||
|
</Button>
|
||||||
|
<Button IsVisible="{Binding SaveRecognizedFormatLayersVisible, Mode=OneWay}"
|
||||||
|
Command="{Binding SaveRecognizedFormatLayersCommand, Mode=OneWay}">
|
||||||
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_RECOGNIZED_FORMAT_LAYERS_response}" />
|
||||||
|
</Button>
|
||||||
|
<Button IsVisible="{Binding SaveWriteProtectionStatusVisible, Mode=OneWay}"
|
||||||
|
Command="{Binding SaveWriteProtectionStatusCommand, Mode=OneWay}">
|
||||||
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Save_WRITE_PROTECTION_STATUS_response}" />
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem IsVisible="{Binding !!CompactDiscInfo, Mode=OneWay}">
|
||||||
|
<TabItem.Header>
|
||||||
|
<TextBlock Text="{x:Static localization:Core.Title_CompactDisc}" />
|
||||||
|
</TabItem.Header>
|
||||||
|
<ContentControl Content="{Binding CompactDiscInfo, Mode=OneWay}" />
|
||||||
|
</TabItem>
|
||||||
|
<TabItem IsVisible="{Binding !!DvdInfo, Mode=OneWay}">
|
||||||
|
<TabItem.Header>
|
||||||
|
<TextBlock Text="{x:Static localization:Core.Title_DVD}" />
|
||||||
|
</TabItem.Header>
|
||||||
|
<ContentControl Content="{Binding DvdInfo, Mode=OneWay}" />
|
||||||
|
</TabItem>
|
||||||
|
<TabItem IsVisible="{Binding !!DvdWritableInfo, Mode=OneWay}">
|
||||||
|
<TabItem.Header>
|
||||||
|
<TextBlock Text="{x:Static localization:Core.Title_DVD_Plus_Dash_R_W}" />
|
||||||
|
</TabItem.Header>
|
||||||
|
<ContentControl Content="{Binding DvdWritableInfo, Mode=OneWay}" />
|
||||||
|
</TabItem>
|
||||||
|
<TabItem IsVisible="{Binding !!XboxInfo, Mode=OneWay}">
|
||||||
|
<TabItem.Header>
|
||||||
|
<TextBlock Text="{x:Static localization:Core.Title_Xbox}" />
|
||||||
|
</TabItem.Header>
|
||||||
|
<ContentControl Content="{Binding XboxInfo, Mode=OneWay}" />
|
||||||
|
</TabItem>
|
||||||
|
<TabItem IsVisible="{Binding !!BlurayInfo, Mode=OneWay}">
|
||||||
|
<TabItem.Header>
|
||||||
|
<TextBlock Text="{x:Static localization:Core.Title_Blu_ray}" />
|
||||||
|
</TabItem.Header>
|
||||||
|
<ContentControl Content="{Binding BlurayInfo, Mode=OneWay}" />
|
||||||
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<TextBlock Grid.Row="2"
|
<StackPanel Grid.Row="2"
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="8"
|
||||||
|
HorizontalAlignment="Right">
|
||||||
|
<Button Command="{Binding DumpCommand, Mode=OneWay}">
|
||||||
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Dump_media_to_image}" />
|
||||||
|
</Button>
|
||||||
|
<Button Command="{Binding ScanCommand, Mode=OneWay}">
|
||||||
|
<TextBlock Text="{x:Static localization:UI.ButtonLabel_Scan_media_surface}" />
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<TextBlock Grid.Row="3"
|
||||||
|
IsVisible="{Binding StatusMessageVisible, Mode=OneWay}"
|
||||||
Text="{Binding StatusMessage, Mode=OneWay}" />
|
Text="{Binding StatusMessage, Mode=OneWay}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
Reference in New Issue
Block a user