2016-10-12 16:02:51 -07:00
|
|
|
|
using System;
|
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 Sample : DatItem
|
|
|
|
|
|
{
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a default, empty Sample object
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public Sample()
|
|
|
|
|
|
{
|
|
|
|
|
|
_name = "";
|
|
|
|
|
|
_itemType = ItemType.Sample;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Comparision Methods
|
|
|
|
|
|
|
|
|
|
|
|
public override bool Equals(DatItem other)
|
|
|
|
|
|
{
|
2016-09-19 22:28:17 -07:00
|
|
|
|
// If we don't have a sample, 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 a sample
|
2016-09-19 18:04:24 -07:00
|
|
|
|
Sample newOther = (Sample)other;
|
|
|
|
|
|
|
|
|
|
|
|
// If the archive information matches
|
|
|
|
|
|
return (_name == newOther.Name);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|