2016-10-12 16:02:51 -07:00
|
|
|
|
using System;
|
2016-10-24 13:51:39 -07:00
|
|
|
|
|
2016-10-24 12:58:57 -07:00
|
|
|
|
using SabreTools.Helper.Data;
|
2016-10-12 16:02:51 -07:00
|
|
|
|
|
2016-10-24 12:58:57 -07:00
|
|
|
|
namespace SabreTools.Helper.Dats
|
2016-09-19 18:04:24 -07:00
|
|
|
|
{
|
2016-10-12 16:02:51 -07:00
|
|
|
|
[Serializable]
|
2016-09-19 18:04:24 -07:00
|
|
|
|
public class Archive : DatItem
|
|
|
|
|
|
{
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a default, empty Archive object
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public Archive()
|
|
|
|
|
|
{
|
|
|
|
|
|
_name = "";
|
|
|
|
|
|
_itemType = ItemType.Archive;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Comparision Methods
|
|
|
|
|
|
|
|
|
|
|
|
public override bool Equals(DatItem other)
|
|
|
|
|
|
{
|
2016-09-19 22:28:17 -07:00
|
|
|
|
// If we don't have an archive, return false
|
|
|
|
|
|
if (_itemType != other.Type)
|
2016-09-19 18:04:24 -07:00
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-09-19 22:28:17 -07:00
|
|
|
|
// Otherwise, treat it as an archive
|
2016-09-19 18:04:24 -07:00
|
|
|
|
Archive newOther = (Archive)other;
|
|
|
|
|
|
|
|
|
|
|
|
// If the archive information matches
|
|
|
|
|
|
return (_name == newOther.Name);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|