Update serials and details objects

This commit is contained in:
Matt Nadareski
2023-04-19 12:26:54 -04:00
parent f6360492a4
commit fd5fd79b95
9 changed files with 363 additions and 70 deletions

View File

@@ -13,6 +13,18 @@ namespace SabreTools.DatItems.Formats
{
#region Fields
/// <summary>
/// Digital serial 1 value
/// </summary>
[JsonProperty("digital_serial1", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("digital_serial1")]
public string DigitalSerial1 { get; set; }
/// <summary>
/// Digital serial 2 value
/// </summary>
[JsonProperty("digital_serial2", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("digital_serial2")]
public string DigitalSerial2 { get; set; }
/// <summary>
/// Media serial 1 value
/// </summary>
@@ -25,6 +37,12 @@ namespace SabreTools.DatItems.Formats
[JsonProperty("media_serial2", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("media_serial2")]
public string MediaSerial2 { get; set; }
/// <summary>
/// Media serial 3 value
/// </summary>
[JsonProperty("media_serial3", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("media_serial3")]
public string MediaSerial3 { get; set; }
/// <summary>
/// PCB serial value
/// </summary>
@@ -43,12 +61,6 @@ namespace SabreTools.DatItems.Formats
[JsonProperty("romchip_serial2", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("romchip_serial2")]
public string RomChipSerial2 { get; set; }
/// <summary>
/// Chip serial value
/// </summary>
[JsonProperty("chip_serial", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("chip_serial")]
public string ChipSerial { get; set; }
/// <summary>
/// Lockout serial value
/// </summary>
@@ -61,12 +73,30 @@ namespace SabreTools.DatItems.Formats
[JsonProperty("savechip_serial", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("savechip_serial")]
public string SaveChipSerial { get; set; }
/// <summary>
/// Chip serial value
/// </summary>
[JsonProperty("chip_serial", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("chip_serial")]
public string ChipSerial { get; set; }
/// <summary>
/// Box serial value
/// </summary>
[JsonProperty("box_serial", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("box_serial")]
public string BoxSerial { get; set; }
/// <summary>
/// Media stamp value
/// </summary>
[JsonProperty("mediastamp", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("mediastamp")]
public string MediaStamp { get; set; }
/// <summary>
/// Box barcode value
/// </summary>
[JsonProperty("box_barcode", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("box_barcode")]
public string BoxBarcode { get; set; }
#endregion
#region Constructors
@@ -95,15 +125,20 @@ namespace SabreTools.DatItems.Formats
Source = this.Source.Clone() as Source,
Remove = this.Remove,
DigitalSerial1 = this.DigitalSerial1,
DigitalSerial2 = this.DigitalSerial2,
MediaSerial1 = this.MediaSerial1,
MediaSerial2 = this.MediaSerial2,
MediaSerial3 = this.MediaSerial3,
PcbSerial = this.PcbSerial,
RomChipSerial1 = this.RomChipSerial1,
RomChipSerial2 = this.RomChipSerial2,
ChipSerial = this.ChipSerial,
LockoutSerial = this.LockoutSerial,
SaveChipSerial = this.SaveChipSerial,
ChipSerial = this.ChipSerial,
BoxSerial = this.BoxSerial,
MediaStamp = this.MediaStamp,
BoxBarcode = this.BoxBarcode,
};
}
@@ -122,15 +157,20 @@ namespace SabreTools.DatItems.Formats
Serials newOther = other as Serials;
// If the Serials information matches
return (MediaSerial1 == newOther.MediaSerial1
return (DigitalSerial1 == newOther.DigitalSerial1
&& DigitalSerial2 == newOther.DigitalSerial2
&& MediaSerial1 == newOther.MediaSerial1
&& MediaSerial2 == newOther.MediaSerial2
&& MediaSerial3 == newOther.MediaSerial3
&& PcbSerial == newOther.PcbSerial
&& RomChipSerial1 == newOther.RomChipSerial1
&& RomChipSerial2 == newOther.RomChipSerial2
&& ChipSerial == newOther.ChipSerial
&& LockoutSerial == newOther.LockoutSerial
&& SaveChipSerial == newOther.SaveChipSerial
&& MediaStamp == newOther.MediaStamp);
&& ChipSerial == newOther.ChipSerial
&& BoxSerial == newOther.BoxSerial
&& MediaStamp == newOther.MediaStamp
&& BoxBarcode == newOther.BoxBarcode);
}
#endregion