From 2962359800f78e5557b794c9d1282ff4d3686d09 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 10 Nov 2019 23:25:55 +0000 Subject: [PATCH] Add ASP.NET formatting attributes to FireWire metadata. --- Metadata/DeviceReportV2.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Metadata/DeviceReportV2.cs b/Metadata/DeviceReportV2.cs index 49736fad5..6b6671b97 100644 --- a/Metadata/DeviceReportV2.cs +++ b/Metadata/DeviceReportV2.cs @@ -38,6 +38,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; @@ -196,12 +197,17 @@ namespace DiscImageChef.CommonTypes.Metadata } [JsonIgnore] - public int Id { get; set; } - public uint VendorID { get; set; } - public uint ProductID { get; set; } - public string Manufacturer { get; set; } - public string Product { get; set; } - public bool RemovableMedia { get; set; } + public int Id { get; set; } + [DisplayName("Vendor ID"), DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "0x{0:X8}")] + public uint VendorID { get; set; } + [DisplayName("Product ID"), DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "0x{0:X8}")] + public uint ProductID { get; set; } + [DisplayFormat(NullDisplayText = "Unknown")] + public string Manufacturer { get; set; } + [DisplayFormat(NullDisplayText = "Unknown")] + public string Product { get; set; } + [DisplayName("Is media removable?")] + public bool RemovableMedia { get; set; } } public class Ata