mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Decode SecureDigital / MultiMediaCard device tags from image info in GUI.
This commit is contained in:
@@ -36,7 +36,7 @@ using DiscImageChef.Decoders.Bluray;
|
||||
using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
|
||||
namespace DiscImageChef.Gui.Panels
|
||||
namespace DiscImageChef.Gui.Tabs
|
||||
{
|
||||
public class tabBlurayInfo : TabPage
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
using Tuple = DiscImageChef.Decoders.PCMCIA.Tuple;
|
||||
|
||||
namespace DiscImageChef.Gui.Panels
|
||||
namespace DiscImageChef.Gui.Tabs
|
||||
{
|
||||
public class tabPcmciaInfo : TabPage
|
||||
{
|
||||
|
||||
53
DiscImageChef.Gui/Tabs/tabSdMmcInfo.xeto
Normal file
53
DiscImageChef.Gui/Tabs/tabSdMmcInfo.xeto
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!--
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ============================================================================
|
||||
//
|
||||
// Filename : pnlDeviceInfo.xeto
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : Device information panel.
|
||||
//
|
||||
// ==[ Description ] ==========================================================
|
||||
//
|
||||
// Defines the structure for the device 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-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
-->
|
||||
<TabPage Text="SD/MMC" Visible="False" xmlns="http://schema.picoe.ca/eto.forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<TabControl>
|
||||
<TabPage ID="tabCid" Text="CID" Visible="False">
|
||||
<TextArea ID="txtCid" ReadOnly="True"/>
|
||||
</TabPage>
|
||||
<TabPage ID="tabCsd" Text="CSD" Visible="False">
|
||||
<TextArea ID="txtCsd" ReadOnly="True"/>
|
||||
</TabPage>
|
||||
<TabPage ID="tabOcr" Text="OCR" Visible="False">
|
||||
<TextArea ID="txtOcr" ReadOnly="True"/>
|
||||
</TabPage>
|
||||
<TabPage ID="tabExtendedCsd" Text="Extended CSD" Visible="False">
|
||||
<TextArea ID="txtExtendedCsd" ReadOnly="True"/>
|
||||
</TabPage>
|
||||
<TabPage ID="tabScr" Text="SCR" Visible="False">
|
||||
<TextArea ID="txtScr" ReadOnly="True"/>
|
||||
</TabPage>
|
||||
</TabControl>
|
||||
</TabPage>
|
||||
131
DiscImageChef.Gui/Tabs/tabSdMmcInfo.xeto.cs
Normal file
131
DiscImageChef.Gui/Tabs/tabSdMmcInfo.xeto.cs
Normal file
@@ -0,0 +1,131 @@
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : pnlDeviceInfo.xeto.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : Device information.
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Implements the device 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-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using DiscImageChef.Devices;
|
||||
using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
|
||||
namespace DiscImageChef.Gui.Tabs
|
||||
{
|
||||
public class tabSdMmcInfo : TabPage
|
||||
{
|
||||
public tabSdMmcInfo()
|
||||
{
|
||||
XamlReader.Load(this);
|
||||
}
|
||||
|
||||
internal void LoadData(DeviceType deviceType, byte[] cid, byte[] csd, byte[] ocr, byte[] extendedCsd,
|
||||
byte[] scr)
|
||||
{
|
||||
switch(deviceType)
|
||||
{
|
||||
case DeviceType.MMC:
|
||||
{
|
||||
Text = "MultiMediaCard";
|
||||
if(cid != null)
|
||||
{
|
||||
tabCid.Visible = true;
|
||||
txtCid.Text = Decoders.MMC.Decoders.PrettifyCID(cid);
|
||||
}
|
||||
|
||||
if(csd != null)
|
||||
{
|
||||
tabCsd.Visible = true;
|
||||
txtCid.Text = Decoders.MMC.Decoders.PrettifyCSD(csd);
|
||||
}
|
||||
|
||||
if(ocr != null)
|
||||
{
|
||||
tabOcr.Visible = true;
|
||||
txtCid.Text = Decoders.MMC.Decoders.PrettifyOCR(ocr);
|
||||
}
|
||||
|
||||
if(extendedCsd != null)
|
||||
{
|
||||
tabExtendedCsd.Visible = true;
|
||||
txtCid.Text = Decoders.MMC.Decoders.PrettifyExtendedCSD(extendedCsd);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DeviceType.SecureDigital:
|
||||
{
|
||||
Text = "SecureDigital";
|
||||
if(cid != null)
|
||||
{
|
||||
tabCid.Visible = true;
|
||||
|
||||
txtCid.Text = Decoders.SecureDigital.Decoders.PrettifyCID(cid);
|
||||
}
|
||||
|
||||
if(csd != null)
|
||||
{
|
||||
tabCsd.Visible = true;
|
||||
|
||||
txtCid.Text = Decoders.SecureDigital.Decoders.PrettifyCSD(csd);
|
||||
}
|
||||
|
||||
if(ocr != null)
|
||||
{
|
||||
tabOcr.Visible = true;
|
||||
txtCid.Text = Decoders.SecureDigital.Decoders.PrettifyOCR(ocr);
|
||||
}
|
||||
|
||||
if(scr != null)
|
||||
{
|
||||
tabScr.Visible = true;
|
||||
txtCid.Text = Decoders.SecureDigital.Decoders.PrettifySCR(scr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Visible = tabCid.Visible || tabCsd.Visible || tabOcr.Visible || tabExtendedCsd.Visible || tabScr.Visible;
|
||||
}
|
||||
|
||||
#region XAML controls
|
||||
#pragma warning disable 169
|
||||
#pragma warning disable 649
|
||||
TabPage tabCid;
|
||||
TextArea txtCid;
|
||||
TabPage tabCsd;
|
||||
TextArea txtCsd;
|
||||
TabPage tabOcr;
|
||||
TextArea txtOcr;
|
||||
TabPage tabExtendedCsd;
|
||||
TextArea txtExtendedCsd;
|
||||
TabPage tabScr;
|
||||
TextArea txtScr;
|
||||
#pragma warning restore 169
|
||||
#pragma warning restore 649
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ using DiscImageChef.Decoders.Xbox;
|
||||
using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
|
||||
namespace DiscImageChef.Gui.Panels
|
||||
namespace DiscImageChef.Gui.Tabs
|
||||
{
|
||||
public class tabXboxInfo : TabPage
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user