mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Show readable tags in media info panel.
This commit is contained in:
@@ -39,37 +39,49 @@
|
||||
<Label ID="lblImagePath" Visible="False"/>
|
||||
<Label ID="lblFilter" Visible="False"/>
|
||||
<Label ID="lblImageFormat" Visible="False"/>
|
||||
<Label ID="lblApplication" Visible="False"/>
|
||||
<Label ID="lblImageSize" Visible="False"/>
|
||||
<Label ID="lblSectors" Visible="False"/>
|
||||
<Label ID="lblCreator" Visible="False"/>
|
||||
<Label ID="lblCreationTime" Visible="False"/>
|
||||
<Label ID="lblLastModificationTime" Visible="False"/>
|
||||
<Label ID="lblMediaType" Visible="False"/>
|
||||
<Label ID="lblHasPartitions" Visible="False"/>
|
||||
<Label ID="lblHasSessions" Visible="False"/>
|
||||
<GroupBox Text="Comments:" Visible="False" ID="grpComments">
|
||||
<TextArea ID="txtComments" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
<GroupBox Text="Media information" Visible="False" ID="grpMediaInfo">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Label ID="lblMediaSequence" Visible="False"/>
|
||||
<Label ID="lblMediaTitle" Visible="False"/>
|
||||
<Label ID="lblMediaManufacturer" Visible="False"/>
|
||||
<Label ID="lblMediaModel" Visible="False"/>
|
||||
<Label ID="lblMediaSerialNumber" Visible="False"/>
|
||||
<Label ID="lblMediaBarcode" Visible="False"/>
|
||||
<Label ID="lblMediaPartNumber" Visible="False"/>
|
||||
</StackLayout>
|
||||
</GroupBox>
|
||||
<GroupBox Text="Drive information" Visible="False" ID="grpDriveInfo">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Label ID="lblDriveManufacturer" Visible="False"/>
|
||||
<Label ID="lblDriveModel" Visible="False"/>
|
||||
<Label ID="lblDriveSerialNumber" Visible="False"/>
|
||||
<Label ID="lblDriveFirmwareRevision" Visible="False"/>
|
||||
<Label ID="lblMediaGeometry" Visible="False"/>
|
||||
</StackLayout>
|
||||
</GroupBox>
|
||||
<TabControl>
|
||||
<TabPage Text="General">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Label ID="lblApplication" Visible="False"/>
|
||||
<Label ID="lblImageSize" Visible="False"/>
|
||||
<Label ID="lblSectors" Visible="False"/>
|
||||
<Label ID="lblCreator" Visible="False"/>
|
||||
<Label ID="lblCreationTime" Visible="False"/>
|
||||
<Label ID="lblLastModificationTime" Visible="False"/>
|
||||
<Label ID="lblMediaType" Visible="False"/>
|
||||
<Label ID="lblHasPartitions" Visible="False"/>
|
||||
<Label ID="lblHasSessions" Visible="False"/>
|
||||
<GroupBox Text="Comments:" Visible="False" ID="grpComments">
|
||||
<TextArea ID="txtComments" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
<GroupBox Text="Media information" Visible="False" ID="grpMediaInfo">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Label ID="lblMediaSequence" Visible="False"/>
|
||||
<Label ID="lblMediaTitle" Visible="False"/>
|
||||
<Label ID="lblMediaManufacturer" Visible="False"/>
|
||||
<Label ID="lblMediaModel" Visible="False"/>
|
||||
<Label ID="lblMediaSerialNumber" Visible="False"/>
|
||||
<Label ID="lblMediaBarcode" Visible="False"/>
|
||||
<Label ID="lblMediaPartNumber" Visible="False"/>
|
||||
</StackLayout>
|
||||
</GroupBox>
|
||||
<GroupBox Text="Drive information" Visible="False" ID="grpDriveInfo">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Label ID="lblDriveManufacturer" Visible="False"/>
|
||||
<Label ID="lblDriveModel" Visible="False"/>
|
||||
<Label ID="lblDriveSerialNumber" Visible="False"/>
|
||||
<Label ID="lblDriveFirmwareRevision" Visible="False"/>
|
||||
<Label ID="lblMediaGeometry" Visible="False"/>
|
||||
</StackLayout>
|
||||
</GroupBox>
|
||||
<GroupBox Text="Readable media tags" ID="grpMediaTags">
|
||||
<TreeGridView ID="treeMediaTags"/>
|
||||
</GroupBox>
|
||||
<GroupBox Text="Readable sector tags" ID="grpSectorTags">
|
||||
<TreeGridView ID="treeSectorTags"/>
|
||||
</GroupBox>
|
||||
</StackLayout>
|
||||
</TabPage>
|
||||
</TabControl>
|
||||
</StackLayout>
|
||||
</Panel>
|
||||
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Interfaces;
|
||||
using Eto.Forms;
|
||||
@@ -174,40 +175,76 @@ namespace DiscImageChef.Gui.Panels
|
||||
grpDriveInfo.Visible = lblDriveManufacturer.Visible || lblDriveModel.Visible ||
|
||||
lblDriveSerialNumber.Visible || lblDriveFirmwareRevision.Visible ||
|
||||
lblMediaGeometry.Visible;
|
||||
|
||||
if(imageFormat.Info.ReadableMediaTags != null && imageFormat.Info.ReadableMediaTags.Count > 0)
|
||||
{
|
||||
TreeGridItemCollection mediaTagList = new TreeGridItemCollection();
|
||||
|
||||
treeMediaTags.Columns.Add(new GridColumn {HeaderText = "Tag", DataCell = new TextBoxCell(0)});
|
||||
|
||||
treeMediaTags.AllowMultipleSelection = false;
|
||||
treeMediaTags.ShowHeader = false;
|
||||
treeMediaTags.DataStore = mediaTagList;
|
||||
|
||||
foreach(MediaTagType tag in imageFormat.Info.ReadableMediaTags.OrderBy(t => t))
|
||||
mediaTagList.Add(new TreeGridItem {Values = new object[] {tag.ToString()}});
|
||||
|
||||
grpMediaTags.Visible = true;
|
||||
}
|
||||
|
||||
if(imageFormat.Info.ReadableSectorTags != null && imageFormat.Info.ReadableSectorTags.Count > 0)
|
||||
{
|
||||
TreeGridItemCollection sectorTagList = new TreeGridItemCollection();
|
||||
|
||||
treeSectorTags.Columns.Add(new GridColumn {HeaderText = "Tag", DataCell = new TextBoxCell(0)});
|
||||
|
||||
treeSectorTags.AllowMultipleSelection = false;
|
||||
treeSectorTags.ShowHeader = false;
|
||||
treeSectorTags.DataStore = sectorTagList;
|
||||
|
||||
foreach(SectorTagType tag in imageFormat.Info.ReadableSectorTags.OrderBy(t => t))
|
||||
sectorTagList.Add(new TreeGridItem {Values = new object[] {tag.ToString()}});
|
||||
|
||||
grpSectorTags.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
#region XAML controls
|
||||
#pragma warning disable 169
|
||||
#pragma warning disable 649
|
||||
Label lblImagePath;
|
||||
Label lblFilter;
|
||||
Label lblImageFormat;
|
||||
Label lblApplication;
|
||||
Label lblImageSize;
|
||||
Label lblSectors;
|
||||
Label lblCreator;
|
||||
Label lblCreationTime;
|
||||
Label lblLastModificationTime;
|
||||
Label lblMediaType;
|
||||
Label lblHasPartitions;
|
||||
Label lblHasSessions;
|
||||
Label lblComments;
|
||||
TextArea txtComments;
|
||||
Label lblMediaSequence;
|
||||
Label lblMediaTitle;
|
||||
Label lblMediaManufacturer;
|
||||
Label lblMediaModel;
|
||||
Label lblMediaSerialNumber;
|
||||
Label lblMediaBarcode;
|
||||
Label lblMediaPartNumber;
|
||||
Label lblDriveManufacturer;
|
||||
Label lblDriveModel;
|
||||
Label lblDriveSerialNumber;
|
||||
Label lblDriveFirmwareRevision;
|
||||
Label lblMediaGeometry;
|
||||
GroupBox grpComments;
|
||||
GroupBox grpMediaInfo;
|
||||
GroupBox grpDriveInfo;
|
||||
Label lblImagePath;
|
||||
Label lblFilter;
|
||||
Label lblImageFormat;
|
||||
Label lblApplication;
|
||||
Label lblImageSize;
|
||||
Label lblSectors;
|
||||
Label lblCreator;
|
||||
Label lblCreationTime;
|
||||
Label lblLastModificationTime;
|
||||
Label lblMediaType;
|
||||
Label lblHasPartitions;
|
||||
Label lblHasSessions;
|
||||
Label lblComments;
|
||||
TextArea txtComments;
|
||||
Label lblMediaSequence;
|
||||
Label lblMediaTitle;
|
||||
Label lblMediaManufacturer;
|
||||
Label lblMediaModel;
|
||||
Label lblMediaSerialNumber;
|
||||
Label lblMediaBarcode;
|
||||
Label lblMediaPartNumber;
|
||||
Label lblDriveManufacturer;
|
||||
Label lblDriveModel;
|
||||
Label lblDriveSerialNumber;
|
||||
Label lblDriveFirmwareRevision;
|
||||
Label lblMediaGeometry;
|
||||
GroupBox grpComments;
|
||||
GroupBox grpMediaInfo;
|
||||
GroupBox grpDriveInfo;
|
||||
GroupBox grpMediaTags;
|
||||
TreeGridView treeMediaTags;
|
||||
GroupBox grpSectorTags;
|
||||
TreeGridView treeSectorTags;
|
||||
#pragma warning restore 169
|
||||
#pragma warning restore 649
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user