mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatItems/] Clean these up a bit
This commit is contained in:
@@ -2,131 +2,121 @@
|
||||
|
||||
namespace SabreTools.Library.DatItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents release information about a set
|
||||
/// </summary>
|
||||
public class Release : DatItem
|
||||
{
|
||||
#region Private instance variables
|
||||
/// <summary>
|
||||
/// Represents release information about a set
|
||||
/// </summary>
|
||||
public class Release : DatItem
|
||||
{
|
||||
#region Publicly facing variables
|
||||
|
||||
private string _region;
|
||||
private string _language;
|
||||
private string _date;
|
||||
private bool? _default;
|
||||
/// <summary>
|
||||
/// Release region(s)
|
||||
/// </summary>
|
||||
public string Region { get; set; }
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Release language(s)
|
||||
/// </summary>
|
||||
public string Language { get; set; }
|
||||
|
||||
#region Publicly facing variables
|
||||
/// <summary>
|
||||
/// Date of release
|
||||
/// </summary>
|
||||
public string Date { get; set; }
|
||||
|
||||
public string Region
|
||||
{
|
||||
get { return _region; }
|
||||
set { _region = value; }
|
||||
}
|
||||
public string Language
|
||||
{
|
||||
get { return _language; }
|
||||
set { _language = value; }
|
||||
}
|
||||
public string Date
|
||||
{
|
||||
get { return _date; }
|
||||
set { _date = value; }
|
||||
}
|
||||
public bool? Default
|
||||
{
|
||||
get { return _default; }
|
||||
set { _default = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Default release, if applicable
|
||||
/// </summary>
|
||||
public bool? Default { get; set; }
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Create a default, empty Release object
|
||||
/// </summary>
|
||||
public Release()
|
||||
{
|
||||
_name = "";
|
||||
_itemType = ItemType.Release;
|
||||
_region = "";
|
||||
_language = "";
|
||||
_date = "";
|
||||
_default = null;
|
||||
}
|
||||
/// <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
|
||||
#endregion
|
||||
|
||||
#region Cloning Methods
|
||||
#region Cloning Methods
|
||||
|
||||
public override object Clone()
|
||||
{
|
||||
return new Release()
|
||||
{
|
||||
Name = this.Name,
|
||||
ItemType = this.ItemType,
|
||||
DupeType = this.DupeType,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
SystemID = this.SystemID,
|
||||
System = this.System,
|
||||
SourceID = this.SourceID,
|
||||
Source = this.Source,
|
||||
|
||||
Region = this.Region,
|
||||
Language = this.Language,
|
||||
Date = this.Date,
|
||||
Default = this.Default,
|
||||
};
|
||||
}
|
||||
Region = this.Region,
|
||||
Language = this.Language,
|
||||
Date = this.Date,
|
||||
Default = this.Default,
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Comparision Methods
|
||||
#region Comparision Methods
|
||||
|
||||
public override bool Equals(DatItem other)
|
||||
{
|
||||
// If we don't have a release return false
|
||||
if (_itemType != other.ItemType)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
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;
|
||||
// Otherwise, treat it as a reease
|
||||
Release newOther = (Release)other;
|
||||
|
||||
// If the archive information matches
|
||||
return (_name == newOther.Name
|
||||
&& _region == newOther.Region
|
||||
&& _language == newOther.Language
|
||||
&& _date == newOther.Date
|
||||
&& _default == newOther.Default);
|
||||
}
|
||||
// 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
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user