mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Show filesystem information on GUI.
This commit is contained in:
2
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
2
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -1622,6 +1622,8 @@
|
||||
<e p="Panels" t="Include">
|
||||
<e p="pnlDeviceInfo.xeto" t="Include" />
|
||||
<e p="pnlDeviceInfo.xeto.cs" t="Include" />
|
||||
<e p="pnlFilesystem.xeto" t="Include" />
|
||||
<e p="pnlFilesystem.xeto.cs" t="Include" />
|
||||
<e p="pnlImageInfo.xeto" t="Include" />
|
||||
<e p="pnlImageInfo.xeto.cs" t="Include" />
|
||||
<e p="pnlPartition.xeto" t="Include" />
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace DiscImageChef.Gui.Forms
|
||||
foreach(string pluginName in idPlugins)
|
||||
if(plugins.PluginsList.TryGetValue(pluginName, out plugin))
|
||||
{
|
||||
plugin.GetInformation(imageFormat, partition, out string _, null);
|
||||
plugin.GetInformation(imageFormat, partition, out string information, null);
|
||||
|
||||
TreeGridItem filesystemGridItem = new TreeGridItem
|
||||
{
|
||||
@@ -260,7 +260,7 @@ namespace DiscImageChef.Gui.Forms
|
||||
plugin.XmlFsType.VolumeName is null
|
||||
? $"{plugin.XmlFsType.Type}"
|
||||
: $"{plugin.XmlFsType.VolumeName} ({plugin.XmlFsType.Type})",
|
||||
null, null // TODO: Filesystem panel
|
||||
null, new pnlFilesystem(plugin.XmlFsType, information)
|
||||
}
|
||||
};
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace DiscImageChef.Gui.Forms
|
||||
foreach(string pluginName in idPlugins)
|
||||
if(plugins.PluginsList.TryGetValue(pluginName, out plugin))
|
||||
{
|
||||
plugin.GetInformation(imageFormat, wholePart, out string _, null);
|
||||
plugin.GetInformation(imageFormat, wholePart, out string information, null);
|
||||
|
||||
TreeGridItem filesystemGridItem = new TreeGridItem
|
||||
{
|
||||
@@ -304,7 +304,7 @@ namespace DiscImageChef.Gui.Forms
|
||||
plugin.XmlFsType.VolumeName is null
|
||||
? $"{plugin.XmlFsType.Type}"
|
||||
: $"{plugin.XmlFsType.VolumeName} ({plugin.XmlFsType.Type})",
|
||||
null, null // TODO: Filesystem panel
|
||||
null, new pnlFilesystem(plugin.XmlFsType, information)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
58
DiscImageChef.Gui/Panels/pnlFilesystem.xeto
Normal file
58
DiscImageChef.Gui/Panels/pnlFilesystem.xeto
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><!--
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ============================================================================
|
||||
//
|
||||
// Filename : pnlScsiInfo.xeto
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// Component : SCSI media information panel.
|
||||
//
|
||||
// ==[ Description ] ==========================================================
|
||||
//
|
||||
// Defines the structure for the SCSI 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-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
-->
|
||||
<Panel xmlns="http://schema.picoe.ca/eto.forms" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Label ID="lblType"/>
|
||||
<Label ID="lblVolumeName"/>
|
||||
<Label ID="lblSerialNumber"/>
|
||||
<Label ID="lblApplicationIdentifier"/>
|
||||
<Label ID="lblSystemIdentifier"/>
|
||||
<Label ID="lblVolumeSetIdentifier"/>
|
||||
<Label ID="lblDataPreparerIdentifier"/>
|
||||
<Label ID="lblPublisherIdentifier"/>
|
||||
<Label ID="lblCreationDate"/>
|
||||
<Label ID="lblEffectiveDate"/>
|
||||
<Label ID="lblModificationDate"/>
|
||||
<Label ID="lblExpirationDate"/>
|
||||
<Label ID="lblBackupDate"/>
|
||||
<Label ID="lblClusters"/>
|
||||
<Label ID="lblFreeClusters"/>
|
||||
<Label ID="lblFiles"/>
|
||||
<CheckBox ID="chkBootable" Enabled="False" Text="Filesystem contains boot code"/>
|
||||
<CheckBox ID="chkDirty" Enabled="False" Text="Filesystem has not been unmounted correctly or contains errors"/>
|
||||
<GroupBox ID="grpInformation" Text="Details">
|
||||
<TextArea ID="txtInformation" ReadOnly="True"/>
|
||||
</GroupBox>
|
||||
</StackLayout>
|
||||
</Panel>
|
||||
111
DiscImageChef.Gui/Panels/pnlFilesystem.xeto.cs
Normal file
111
DiscImageChef.Gui/Panels/pnlFilesystem.xeto.cs
Normal file
@@ -0,0 +1,111 @@
|
||||
// /***************************************************************************
|
||||
// The Disc Image Chef
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : pnlScsiInfo.xeto.cs
|
||||
// Author(s) : Natalia Portillo claunia@claunia.com>
|
||||
//
|
||||
// Component : SCSI media information panel.
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Implements the SCSI 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-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
using Schemas;
|
||||
|
||||
namespace DiscImageChef.Gui.Panels
|
||||
{
|
||||
public class pnlFilesystem : Panel
|
||||
{
|
||||
public pnlFilesystem(FileSystemType xmlFsType, string information)
|
||||
{
|
||||
XamlReader.Load(this);
|
||||
|
||||
lblType.Text = $"Filesystem type: {xmlFsType.Type}";
|
||||
lblVolumeName.Text = $"Volume name: {xmlFsType.VolumeName}";
|
||||
lblSerialNumber.Text = $"Serial number: {xmlFsType.VolumeSerial}";
|
||||
lblApplicationIdentifier.Text = $"Application identifier: {xmlFsType.ApplicationIdentifier}";
|
||||
lblSystemIdentifier.Text = $"System identifier: {xmlFsType.SystemIdentifier}";
|
||||
lblVolumeSetIdentifier.Text = $"Volume set identifier: {xmlFsType.VolumeSetIdentifier}";
|
||||
lblDataPreparerIdentifier.Text = $"Data preparer identifier: {xmlFsType.DataPreparerIdentifier}";
|
||||
lblPublisherIdentifier.Text = $"Publisher identifier: {xmlFsType.PublisherIdentifier}";
|
||||
lblCreationDate.Text = $"Volume created on {xmlFsType.CreationDate:F}";
|
||||
lblEffectiveDate.Text = $"Volume effective from {xmlFsType.EffectiveDate:F}";
|
||||
lblModificationDate.Text = $"Volume last modified on {xmlFsType.ModificationDate:F}";
|
||||
lblExpirationDate.Text = $"Volume expired on {xmlFsType.ExpirationDate:F}";
|
||||
lblBackupDate.Text = $"Volume last backed up on {xmlFsType.BackupDate:F}";
|
||||
lblClusters.Text =
|
||||
$"Volume has {xmlFsType.Clusters} clusters of {xmlFsType.ClusterSize} bytes each (total of {xmlFsType.Clusters * xmlFsType.ClusterSize} bytes)";
|
||||
lblFreeClusters.Text =
|
||||
$"Volume has {xmlFsType.FreeClusters} {xmlFsType.FreeClusters / xmlFsType.Clusters:P}";
|
||||
lblFiles.Text = $"Volume contains {xmlFsType.Files} files";
|
||||
chkBootable.Checked = xmlFsType.Bootable;
|
||||
chkDirty.Checked = xmlFsType.Dirty;
|
||||
txtInformation.Text = information;
|
||||
|
||||
lblVolumeName.Visible = !string.IsNullOrEmpty(xmlFsType.VolumeName);
|
||||
lblSerialNumber.Visible = !string.IsNullOrEmpty(xmlFsType.VolumeSerial);
|
||||
lblApplicationIdentifier.Visible = !string.IsNullOrEmpty(xmlFsType.ApplicationIdentifier);
|
||||
lblSystemIdentifier.Visible = !string.IsNullOrEmpty(xmlFsType.SystemIdentifier);
|
||||
lblVolumeSetIdentifier.Visible = !string.IsNullOrEmpty(xmlFsType.VolumeSetIdentifier);
|
||||
lblDataPreparerIdentifier.Visible = !string.IsNullOrEmpty(xmlFsType.DataPreparerIdentifier);
|
||||
lblPublisherIdentifier.Visible = !string.IsNullOrEmpty(xmlFsType.PublisherIdentifier);
|
||||
lblCreationDate.Visible = xmlFsType.CreationDateSpecified;
|
||||
lblEffectiveDate.Visible = xmlFsType.EffectiveDateSpecified;
|
||||
lblModificationDate.Visible = xmlFsType.ModificationDateSpecified;
|
||||
lblExpirationDate.Visible = xmlFsType.ExpirationDateSpecified;
|
||||
lblBackupDate.Visible = xmlFsType.BackupDateSpecified;
|
||||
lblFreeClusters.Visible = xmlFsType.FreeClustersSpecified;
|
||||
lblFiles.Visible = xmlFsType.FilesSpecified;
|
||||
grpInformation.Visible = !string.IsNullOrEmpty(information);
|
||||
}
|
||||
|
||||
#region XAML controls
|
||||
#pragma warning disable 169
|
||||
#pragma warning disable 649
|
||||
Label lblType;
|
||||
Label lblVolumeName;
|
||||
Label lblSerialNumber;
|
||||
Label lblApplicationIdentifier;
|
||||
Label lblSystemIdentifier;
|
||||
Label lblVolumeSetIdentifier;
|
||||
Label lblDataPreparerIdentifier;
|
||||
Label lblPublisherIdentifier;
|
||||
Label lblCreationDate;
|
||||
Label lblEffectiveDate;
|
||||
Label lblModificationDate;
|
||||
Label lblExpirationDate;
|
||||
Label lblBackupDate;
|
||||
Label lblClusters;
|
||||
Label lblFreeClusters;
|
||||
Label lblFiles;
|
||||
CheckBox chkBootable;
|
||||
CheckBox chkDirty;
|
||||
GroupBox grpInformation;
|
||||
TextArea txtInformation;
|
||||
#pragma warning restore 169
|
||||
#pragma warning restore 649
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user