mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Migrate partition panel from Eto.Forms to Avalonia.
This commit is contained in:
24
Aaru.Gui/ViewModels/PartitionViewModel.cs
Normal file
24
Aaru.Gui/ViewModels/PartitionViewModel.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Aaru.CommonTypes;
|
||||
|
||||
namespace Aaru.Gui.ViewModels
|
||||
{
|
||||
public class PartitionViewModel
|
||||
{
|
||||
public PartitionViewModel(Partition partition)
|
||||
{
|
||||
NameText = $"Partition name: {partition.Name}";
|
||||
TypeText = $"Partition type: {partition.Type}";
|
||||
StartText = $"Partition start: sector {partition.Start}, byte {partition.Offset}";
|
||||
LengthText = $"Partition length: {partition.Length} sectors, {partition.Size} bytes";
|
||||
DescriptionLabelText = "Partition description:";
|
||||
DescriptionText = partition.Description;
|
||||
}
|
||||
|
||||
public string NameText { get; }
|
||||
public string TypeText { get; }
|
||||
public string StartText { get; }
|
||||
public string LengthText { get; }
|
||||
public string DescriptionLabelText { get; }
|
||||
public string DescriptionText { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user