2017-10-09 12:58:46 -07:00
|
|
|
|
using SabreTools.Library.Data;
|
2016-10-12 16:02:51 -07:00
|
|
|
|
|
2017-11-02 15:44:15 -07:00
|
|
|
|
namespace SabreTools.Library.DatItems
|
2016-09-19 18:04:24 -07:00
|
|
|
|
{
|
2019-01-08 17:40:12 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents release information about a set
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public class Release : DatItem
|
|
|
|
|
|
{
|
|
|
|
|
|
#region Publicly facing variables
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Release region(s)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Region { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Release language(s)
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Language { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Date of release
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string Date { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Default release, if applicable
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool? Default { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a default, empty Release object
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public Release()
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Name = "";
|
|
|
|
|
|
this.ItemType = ItemType.Release;
|
|
|
|
|
|
this.Region = "";
|
|
|
|
|
|
this.Language = "";
|
|
|
|
|
|
this.Date = "";
|
|
|
|
|
|
this.Default = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Cloning Methods
|
|
|
|
|
|
|
|
|
|
|
|
public override object Clone()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new Release()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = this.Name,
|
|
|
|
|
|
ItemType = this.ItemType,
|
|
|
|
|
|
DupeType = this.DupeType,
|
|
|
|
|
|
|
|
|
|
|
|
Supported = this.Supported,
|
|
|
|
|
|
Publisher = this.Publisher,
|
|
|
|
|
|
Infos = this.Infos,
|
|
|
|
|
|
PartName = this.PartName,
|
|
|
|
|
|
PartInterface = this.PartInterface,
|
|
|
|
|
|
Features = this.Features,
|
|
|
|
|
|
AreaName = this.AreaName,
|
|
|
|
|
|
AreaSize = this.AreaSize,
|
|
|
|
|
|
|
|
|
|
|
|
MachineName = this.MachineName,
|
|
|
|
|
|
Comment = this.Comment,
|
|
|
|
|
|
MachineDescription = this.MachineDescription,
|
|
|
|
|
|
Year = this.Year,
|
|
|
|
|
|
Manufacturer = this.Manufacturer,
|
|
|
|
|
|
RomOf = this.RomOf,
|
|
|
|
|
|
CloneOf = this.CloneOf,
|
|
|
|
|
|
SampleOf = this.SampleOf,
|
|
|
|
|
|
SourceFile = this.SourceFile,
|
|
|
|
|
|
Runnable = this.Runnable,
|
|
|
|
|
|
Board = this.Board,
|
|
|
|
|
|
RebuildTo = this.RebuildTo,
|
|
|
|
|
|
Devices = this.Devices,
|
|
|
|
|
|
MachineType = this.MachineType,
|
|
|
|
|
|
|
|
|
|
|
|
SystemID = this.SystemID,
|
|
|
|
|
|
System = this.System,
|
|
|
|
|
|
SourceID = this.SourceID,
|
|
|
|
|
|
Source = this.Source,
|
|
|
|
|
|
|
|
|
|
|
|
Region = this.Region,
|
|
|
|
|
|
Language = this.Language,
|
|
|
|
|
|
Date = this.Date,
|
|
|
|
|
|
Default = this.Default,
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Comparision Methods
|
|
|
|
|
|
|
|
|
|
|
|
public override bool Equals(DatItem other)
|
|
|
|
|
|
{
|
|
|
|
|
|
// If we don't have a release return false
|
|
|
|
|
|
if (this.ItemType != other.ItemType)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Otherwise, treat it as a reease
|
|
|
|
|
|
Release newOther = (Release)other;
|
|
|
|
|
|
|
|
|
|
|
|
// If the archive information matches
|
|
|
|
|
|
return (this.Name == newOther.Name
|
|
|
|
|
|
&& this.Region == newOther.Region
|
|
|
|
|
|
&& this.Language == newOther.Language
|
|
|
|
|
|
&& this.Date == newOther.Date
|
|
|
|
|
|
&& this.Default == newOther.Default);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
2016-09-19 18:04:24 -07:00
|
|
|
|
}
|