diff --git a/SabreTools.Library/DatItems/BiosSet.cs b/SabreTools.Library/DatItems/BiosSet.cs index 107dd728..63eb72c1 100644 --- a/SabreTools.Library/DatItems/BiosSet.cs +++ b/SabreTools.Library/DatItems/BiosSet.cs @@ -133,13 +133,13 @@ namespace SabreTools.Library.DatItems return false; // Filter on description - if (filter.Description.MatchesPositiveSet(Description) == false) + if (filter.DatItem_Description.MatchesPositiveSet(Description) == false) return false; - if (filter.Description.MatchesNegativeSet(Description) == true) + if (filter.DatItem_Description.MatchesNegativeSet(Description) == true) return false; // Filter on default - if (filter.Default.MatchesNeutral(null, Default) == false) + if (filter.DatItem_Default.MatchesNeutral(null, Default) == false) return false; return true; diff --git a/SabreTools.Library/DatItems/DatItem.cs b/SabreTools.Library/DatItems/DatItem.cs index a415d8ac..7b0cae03 100644 --- a/SabreTools.Library/DatItems/DatItem.cs +++ b/SabreTools.Library/DatItems/DatItem.cs @@ -581,15 +581,15 @@ namespace SabreTools.Library.DatItems #region Common // Filter on item name - if (filter.ItemName.MatchesPositiveSet(Name) == false) + if (filter.DatItem_Name.MatchesPositiveSet(Name) == false) return false; - if (filter.ItemName.MatchesNegativeSet(Name) == true) + if (filter.DatItem_Name.MatchesNegativeSet(Name) == true) return false; // Filter on item type - if (filter.ItemTypes.MatchesPositiveSet(ItemType.ToString()) == false) + if (filter.DatItem_Type.MatchesPositiveSet(ItemType.ToString()) == false) return false; - if (filter.ItemTypes.MatchesNegativeSet(ItemType.ToString()) == true) + if (filter.DatItem_Type.MatchesNegativeSet(ItemType.ToString()) == true) return false; #endregion @@ -597,15 +597,15 @@ namespace SabreTools.Library.DatItems #region AttractMode // Filter on alt name - if (filter.AltName.MatchesPositiveSet(AltName) == false) + if (filter.DatItem_AltName.MatchesPositiveSet(AltName) == false) return false; - if (filter.AltName.MatchesNegativeSet(AltName) == true) + if (filter.DatItem_AltName.MatchesNegativeSet(AltName) == true) return false; // Filter on alt title - if (filter.AltTitle.MatchesPositiveSet(AltTitle) == false) + if (filter.DatItem_AltTitle.MatchesPositiveSet(AltTitle) == false) return false; - if (filter.AltTitle.MatchesNegativeSet(AltTitle) == true) + if (filter.DatItem_AltTitle.MatchesNegativeSet(AltTitle) == true) return false; #endregion @@ -613,33 +613,33 @@ namespace SabreTools.Library.DatItems #region OpenMSX // Filter on original - if (filter.Original.MatchesPositiveSet(Original?.Content) == false) + if (filter.DatItem_Original.MatchesPositiveSet(Original?.Content) == false) return false; - if (filter.Original.MatchesNegativeSet(Original?.Content) == true) + if (filter.DatItem_Original.MatchesNegativeSet(Original?.Content) == true) return false; // Filter on OpenMSX subtype - if (filter.SubType.MatchesPositiveSet(OpenMSXSubType) == false) + if (filter.DatItem_OpenMSXSubType.MatchesPositiveSet(OpenMSXSubType) == false) return false; - if (filter.SubType.MatchesNegativeSet(OpenMSXSubType) == true) + if (filter.DatItem_OpenMSXSubType.MatchesNegativeSet(OpenMSXSubType) == true) return false; // Filter on OpenMSX type - if (filter.OpenMSXType.MatchesPositiveSet(OpenMSXType) == false) + if (filter.DatItem_OpenMSXType.MatchesPositiveSet(OpenMSXType) == false) return false; - if (filter.OpenMSXType.MatchesNegativeSet(OpenMSXType) == true) + if (filter.DatItem_OpenMSXType.MatchesNegativeSet(OpenMSXType) == true) return false; // Filter on remark - if (filter.Remark.MatchesPositiveSet(Remark) == false) + if (filter.DatItem_Remark.MatchesPositiveSet(Remark) == false) return false; - if (filter.Remark.MatchesNegativeSet(Remark) == true) + if (filter.DatItem_Remark.MatchesNegativeSet(Remark) == true) return false; // Filter on boot - if (filter.Boot.MatchesPositiveSet(Boot) == false) + if (filter.DatItem_Boot.MatchesPositiveSet(Boot) == false) return false; - if (filter.Boot.MatchesNegativeSet(Boot) == true) + if (filter.DatItem_Boot.MatchesNegativeSet(Boot) == true) return false; #endregion @@ -647,53 +647,53 @@ namespace SabreTools.Library.DatItems #region SoftwareList // Filter on part name - if (filter.PartName.MatchesPositiveSet(Part?.Name) == false) + if (filter.DatItem_Part_Name.MatchesPositiveSet(Part?.Name) == false) return false; - if (filter.PartName.MatchesNegativeSet(Part?.Name) == true) + if (filter.DatItem_Part_Name.MatchesNegativeSet(Part?.Name) == true) return false; // Filter on part interface - if (filter.PartInterface.MatchesPositiveSet(Part?.Interface) == false) + if (filter.DatItem_Part_Interface.MatchesPositiveSet(Part?.Interface) == false) return false; - if (filter.PartInterface.MatchesNegativeSet(Part?.Interface) == true) + if (filter.DatItem_Part_Interface.MatchesNegativeSet(Part?.Interface) == true) return false; // Filter on area name - if (filter.AreaName.MatchesPositiveSet(AreaName) == false) + if (filter.DatItem_AreaName.MatchesPositiveSet(AreaName) == false) return false; - if (filter.AreaName.MatchesNegativeSet(AreaName) == true) + if (filter.DatItem_AreaName.MatchesNegativeSet(AreaName) == true) return false; // Filter on area size - if (filter.AreaSize.MatchesNeutral(null, AreaSize) == false) + if (filter.DatItem_AreaSize.MatchesNeutral(null, AreaSize) == false) return false; - else if (filter.AreaSize.MatchesPositive(null, AreaSize) == false) + else if (filter.DatItem_AreaSize.MatchesPositive(null, AreaSize) == false) return false; - else if (filter.AreaSize.MatchesNegative(null, AreaSize) == false) + else if (filter.DatItem_AreaSize.MatchesNegative(null, AreaSize) == false) return false; // Filter on area byte width - if (filter.AreaWidth.MatchesPositiveSet(AreaWidth) == false) + if (filter.DatItem_AreaWidth.MatchesPositiveSet(AreaWidth) == false) return false; - if (filter.AreaWidth.MatchesNegativeSet(AreaWidth) == true) + if (filter.DatItem_AreaWidth.MatchesNegativeSet(AreaWidth) == true) return false; // Filter on area endianness - if (filter.AreaEndianness.MatchesPositiveSet(AreaEndianness) == false) + if (filter.DatItem_AreaEndianness.MatchesPositiveSet(AreaEndianness) == false) return false; - if (filter.AreaEndianness.MatchesNegativeSet(AreaEndianness) == true) + if (filter.DatItem_AreaEndianness.MatchesNegativeSet(AreaEndianness) == true) return false; // Filter on softwarelist value - if (filter.Value.MatchesPositiveSet(Value) == false) + if (filter.DatItem_Value.MatchesPositiveSet(Value) == false) return false; - if (filter.Value.MatchesNegativeSet(Value) == true) + if (filter.DatItem_Value.MatchesNegativeSet(Value) == true) return false; // Filter on load flag - if (filter.LoadFlag.MatchesPositiveSet(LoadFlag) == false) + if (filter.DatItem_LoadFlag.MatchesPositiveSet(LoadFlag) == false) return false; - if (filter.LoadFlag.MatchesNegativeSet(LoadFlag) == true) + if (filter.DatItem_LoadFlag.MatchesNegativeSet(LoadFlag) == true) return false; #endregion diff --git a/SabreTools.Library/DatItems/Disk.cs b/SabreTools.Library/DatItems/Disk.cs index f98d080f..85091676 100644 --- a/SabreTools.Library/DatItems/Disk.cs +++ b/SabreTools.Library/DatItems/Disk.cs @@ -476,73 +476,73 @@ namespace SabreTools.Library.DatItems return false; // Filter on MD5 - if (filter.MD5.MatchesPositiveSet(MD5) == false) + if (filter.DatItem_MD5.MatchesPositiveSet(MD5) == false) return false; - if (filter.MD5.MatchesNegativeSet(MD5) == true) + if (filter.DatItem_MD5.MatchesNegativeSet(MD5) == true) return false; #if NET_FRAMEWORK // Filter on RIPEMD160 - if (filter.RIPEMD160.MatchesPositiveSet(RIPEMD160) == false) + if (filter.DatItem_RIPEMD160.MatchesPositiveSet(RIPEMD160) == false) return false; - if (filter.RIPEMD160.MatchesNegativeSet(RIPEMD160) == true) + if (filter.DatItem_RIPEMD160.MatchesNegativeSet(RIPEMD160) == true) return false; #endif // Filter on SHA-1 - if (filter.SHA1.MatchesPositiveSet(SHA1) == false) + if (filter.DatItem_SHA1.MatchesPositiveSet(SHA1) == false) return false; - if (filter.SHA1.MatchesNegativeSet(SHA1) == true) + if (filter.DatItem_SHA1.MatchesNegativeSet(SHA1) == true) return false; // Filter on SHA-256 - if (filter.SHA256.MatchesPositiveSet(SHA256) == false) + if (filter.DatItem_SHA256.MatchesPositiveSet(SHA256) == false) return false; - if (filter.SHA256.MatchesNegativeSet(SHA256) == true) + if (filter.DatItem_SHA256.MatchesNegativeSet(SHA256) == true) return false; // Filter on SHA-384 - if (filter.SHA384.MatchesPositiveSet(SHA384) == false) + if (filter.DatItem_SHA384.MatchesPositiveSet(SHA384) == false) return false; - if (filter.SHA384.MatchesNegativeSet(SHA384) == true) + if (filter.DatItem_SHA384.MatchesNegativeSet(SHA384) == true) return false; // Filter on SHA-512 - if (filter.SHA512.MatchesPositiveSet(SHA512) == false) + if (filter.DatItem_SHA512.MatchesPositiveSet(SHA512) == false) return false; - if (filter.SHA512.MatchesNegativeSet(SHA512) == true) + if (filter.DatItem_SHA512.MatchesNegativeSet(SHA512) == true) return false; // Filter on merge tag - if (filter.MergeTag.MatchesPositiveSet(MergeTag) == false) + if (filter.DatItem_Merge.MatchesPositiveSet(MergeTag) == false) return false; - if (filter.MergeTag.MatchesNegativeSet(MergeTag) == true) + if (filter.DatItem_Merge.MatchesNegativeSet(MergeTag) == true) return false; // Filter on region - if (filter.Region.MatchesPositiveSet(Region) == false) + if (filter.DatItem_Region.MatchesPositiveSet(Region) == false) return false; - if (filter.Region.MatchesNegativeSet(Region) == true) + if (filter.DatItem_Region.MatchesNegativeSet(Region) == true) return false; // Filter on index - if (filter.Index.MatchesPositiveSet(Index) == false) + if (filter.DatItem_Index.MatchesPositiveSet(Index) == false) return false; - if (filter.Index.MatchesNegativeSet(Index) == true) + if (filter.DatItem_Index.MatchesNegativeSet(Index) == true) return false; // Filter on writable - if (filter.Writable.MatchesNeutral(null, Writable) == false) + if (filter.DatItem_Writable.MatchesNeutral(null, Writable) == false) return false; // Filter on status - if (filter.Status.MatchesPositive(ItemStatus.NULL, ItemStatus) == false) + if (filter.DatItem_Status.MatchesPositive(ItemStatus.NULL, ItemStatus) == false) return false; - if (filter.Status.MatchesNegative(ItemStatus.NULL, ItemStatus) == true) + if (filter.DatItem_Status.MatchesNegative(ItemStatus.NULL, ItemStatus) == true) return false; // Filter on optional - if (filter.Optional.MatchesNeutral(null, Optional) == false) + if (filter.DatItem_Optional.MatchesNeutral(null, Optional) == false) return false; return true; diff --git a/SabreTools.Library/DatItems/Release.cs b/SabreTools.Library/DatItems/Release.cs index ceb35f8e..865cf676 100644 --- a/SabreTools.Library/DatItems/Release.cs +++ b/SabreTools.Library/DatItems/Release.cs @@ -161,25 +161,25 @@ namespace SabreTools.Library.DatItems return false; // Filter on region - if (filter.Region.MatchesPositiveSet(Region) == false) + if (filter.DatItem_Region.MatchesPositiveSet(Region) == false) return false; - if (filter.Region.MatchesNegativeSet(Region) == true) + if (filter.DatItem_Region.MatchesNegativeSet(Region) == true) return false; // Filter on language - if (filter.Language.MatchesPositiveSet(Language) == false) + if (filter.DatItem_Language.MatchesPositiveSet(Language) == false) return false; - if (filter.Language.MatchesNegativeSet(Language) == true) + if (filter.DatItem_Language.MatchesNegativeSet(Language) == true) return false; // Filter on date - if (filter.Date.MatchesPositiveSet(Date) == false) + if (filter.DatItem_Date.MatchesPositiveSet(Date) == false) return false; - if (filter.Date.MatchesNegativeSet(Date) == true) + if (filter.DatItem_Date.MatchesNegativeSet(Date) == true) return false; // Filter on default - if (filter.Default.MatchesNeutral(null, Default) == false) + if (filter.DatItem_Default.MatchesNeutral(null, Default) == false) return false; return true; diff --git a/SabreTools.Library/DatItems/Rom.cs b/SabreTools.Library/DatItems/Rom.cs index ae4b89ad..d4ce5d34 100644 --- a/SabreTools.Library/DatItems/Rom.cs +++ b/SabreTools.Library/DatItems/Rom.cs @@ -513,99 +513,99 @@ namespace SabreTools.Library.DatItems return false; // Filter on bios - if (filter.Bios.MatchesPositiveSet(Bios) == false) + if (filter.DatItem_Bios.MatchesPositiveSet(Bios) == false) return false; - if (filter.Bios.MatchesNegativeSet(Bios) == true) + if (filter.DatItem_Bios.MatchesNegativeSet(Bios) == true) return false; // Filter on rom size - if (filter.Size.MatchesNeutral(-1, Size) == false) + if (filter.DatItem_Size.MatchesNeutral(-1, Size) == false) return false; - else if (filter.Size.MatchesPositive(-1, Size) == false) + else if (filter.DatItem_Size.MatchesPositive(-1, Size) == false) return false; - else if (filter.Size.MatchesNegative(-1, Size) == false) + else if (filter.DatItem_Size.MatchesNegative(-1, Size) == false) return false; // Filter on CRC - if (filter.CRC.MatchesPositiveSet(CRC) == false) + if (filter.DatItem_CRC.MatchesPositiveSet(CRC) == false) return false; - if (filter.CRC.MatchesNegativeSet(CRC) == true) + if (filter.DatItem_CRC.MatchesNegativeSet(CRC) == true) return false; // Filter on MD5 - if (filter.MD5.MatchesPositiveSet(MD5) == false) + if (filter.DatItem_MD5.MatchesPositiveSet(MD5) == false) return false; - if (filter.MD5.MatchesNegativeSet(MD5) == true) + if (filter.DatItem_MD5.MatchesNegativeSet(MD5) == true) return false; #if NET_FRAMEWORK // Filter on RIPEMD160 - if (filter.RIPEMD160.MatchesPositiveSet(RIPEMD160) == false) + if (filter.DatItem_RIPEMD160.MatchesPositiveSet(RIPEMD160) == false) return false; - if (filter.RIPEMD160.MatchesNegativeSet(RIPEMD160) == true) + if (filter.DatItem_RIPEMD160.MatchesNegativeSet(RIPEMD160) == true) return false; #endif // Filter on SHA-1 - if (filter.SHA1.MatchesPositiveSet(SHA1) == false) + if (filter.DatItem_SHA1.MatchesPositiveSet(SHA1) == false) return false; - if (filter.SHA1.MatchesNegativeSet(SHA1) == true) + if (filter.DatItem_SHA1.MatchesNegativeSet(SHA1) == true) return false; // Filter on SHA-256 - if (filter.SHA256.MatchesPositiveSet(SHA256) == false) + if (filter.DatItem_SHA256.MatchesPositiveSet(SHA256) == false) return false; - if (filter.SHA256.MatchesNegativeSet(SHA256) == true) + if (filter.DatItem_SHA256.MatchesNegativeSet(SHA256) == true) return false; // Filter on SHA-384 - if (filter.SHA384.MatchesPositiveSet(SHA384) == false) + if (filter.DatItem_SHA384.MatchesPositiveSet(SHA384) == false) return false; - if (filter.SHA384.MatchesNegativeSet(SHA384) == true) + if (filter.DatItem_SHA384.MatchesNegativeSet(SHA384) == true) return false; // Filter on SHA-512 - if (filter.SHA512.MatchesPositiveSet(SHA512) == false) + if (filter.DatItem_SHA512.MatchesPositiveSet(SHA512) == false) return false; - if (filter.SHA512.MatchesNegativeSet(SHA512) == true) + if (filter.DatItem_SHA512.MatchesNegativeSet(SHA512) == true) return false; // Filter on merge tag - if (filter.MergeTag.MatchesPositiveSet(MergeTag) == false) + if (filter.DatItem_Merge.MatchesPositiveSet(MergeTag) == false) return false; - if (filter.MergeTag.MatchesNegativeSet(MergeTag) == true) + if (filter.DatItem_Merge.MatchesNegativeSet(MergeTag) == true) return false; // Filter on region - if (filter.Region.MatchesPositiveSet(Region) == false) + if (filter.DatItem_Region.MatchesPositiveSet(Region) == false) return false; - if (filter.Region.MatchesNegativeSet(Region) == true) + if (filter.DatItem_Region.MatchesNegativeSet(Region) == true) return false; // Filter on offset - if (filter.Offset.MatchesPositiveSet(Offset) == false) + if (filter.DatItem_Offset.MatchesPositiveSet(Offset) == false) return false; - if (filter.Offset.MatchesNegativeSet(Offset) == true) + if (filter.DatItem_Offset.MatchesNegativeSet(Offset) == true) return false; // Filter on date - if (filter.Date.MatchesPositiveSet(Date) == false) + if (filter.DatItem_Date.MatchesPositiveSet(Date) == false) return false; - if (filter.Date.MatchesNegativeSet(Date) == true) + if (filter.DatItem_Date.MatchesNegativeSet(Date) == true) return false; // Filter on status - if (filter.Status.MatchesPositive(ItemStatus.NULL, ItemStatus) == false) + if (filter.DatItem_Status.MatchesPositive(ItemStatus.NULL, ItemStatus) == false) return false; - if (filter.Status.MatchesNegative(ItemStatus.NULL, ItemStatus) == true) + if (filter.DatItem_Status.MatchesNegative(ItemStatus.NULL, ItemStatus) == true) return false; // Filter on optional - if (filter.Optional.MatchesNeutral(null, Optional) == false) + if (filter.DatItem_Optional.MatchesNeutral(null, Optional) == false) return false; // Filter on inverted - if (filter.Inverted.MatchesNeutral(null, Inverted) == false) + if (filter.DatItem_Inverted.MatchesNeutral(null, Inverted) == false) return false; return true; diff --git a/SabreTools.Library/Filtering/Filter.cs b/SabreTools.Library/Filtering/Filter.cs index 76975dff..8c0d9e96 100644 --- a/SabreTools.Library/Filtering/Filter.cs +++ b/SabreTools.Library/Filtering/Filter.cs @@ -272,215 +272,83 @@ namespace SabreTools.Library.Filtering #region Common - /// - /// Include or exclude item names - /// - public FilterItem ItemName { get; private set; } = new FilterItem(); - - /// - /// Include or exclude item types - /// - public FilterItem ItemTypes { get; private set; } = new FilterItem(); + public FilterItem DatItem_Name { get; private set; } = new FilterItem(); + public FilterItem DatItem_Type { get; private set; } = new FilterItem(); #endregion #region AttractMode - /// - /// Include or exclude alt names - /// - public FilterItem AltName { get; private set; } = new FilterItem(); - - /// - /// Include or exclude alt titles - /// - public FilterItem AltTitle { get; private set; } = new FilterItem(); + public FilterItem DatItem_AltName { get; private set; } = new FilterItem(); + public FilterItem DatItem_AltTitle { get; private set; } = new FilterItem(); #endregion #region OpenMSX - /// - /// Include or exclude original value - /// - public FilterItem Original { get; private set; } = new FilterItem(); - - /// - /// Include or exclude items of a certain OpenMSX subtype - /// - public FilterItem SubType { get; private set; } = new FilterItem() { Positive = OpenMSXSubType.NULL, Negative = OpenMSXSubType.NULL }; - - /// - /// Include or exclude OpenMSX type - /// - public FilterItem OpenMSXType { get; private set; } = new FilterItem(); - - /// - /// Include or exclude remarks - /// - public FilterItem Remark { get; private set; } = new FilterItem(); - - /// - /// Include or exclude boots - /// - public FilterItem Boot { get; private set; } = new FilterItem(); + public FilterItem DatItem_Original { get; private set; } = new FilterItem(); + public FilterItem DatItem_OpenMSXSubType { get; private set; } = new FilterItem() { Positive = OpenMSXSubType.NULL, Negative = OpenMSXSubType.NULL }; + public FilterItem DatItem_OpenMSXType { get; private set; } = new FilterItem(); + public FilterItem DatItem_Remark { get; private set; } = new FilterItem(); + public FilterItem DatItem_Boot { get; private set; } = new FilterItem(); #endregion #region SoftwareList - /// - /// Include or exclude part names - /// - public FilterItem PartName { get; private set; } = new FilterItem(); + // Part + public FilterItem DatItem_Part { get; private set; } = new FilterItem() { Neutral = null }; + public FilterItem DatItem_Part_Name { get; private set; } = new FilterItem(); + public FilterItem DatItem_Part_Interface { get; private set; } = new FilterItem(); - /// - /// Include or exclude part interfaces - /// - public FilterItem PartInterface { get; private set; } = new FilterItem(); + // Feature + public FilterItem DatItem_Features { get; private set; } = new FilterItem() { Neutral = null }; + public FilterItem DatItem_Feature_Name { get; private set; } = new FilterItem(); + public FilterItem DatItem_Feature_Value { get; private set; } = new FilterItem(); - // TODO: DatItem.Features - List - - /// - /// Include or exclude area names - /// - public FilterItem AreaName { get; private set; } = new FilterItem(); - - /// - /// Include or exclude area sizes - /// - /// Positive means "Greater than or equal", Negative means "Less than or equal", Neutral means "Equal" - public FilterItem AreaSize { get; private set; } = new FilterItem() { Positive = null, Negative = null, Neutral = null }; - - /// - /// Include or exclude area byte widths - /// - public FilterItem AreaWidth { get; private set; } = new FilterItem(); - - /// - /// Include or exclude area endianness - /// - public FilterItem AreaEndianness { get; private set; } = new FilterItem(); - - /// - /// Include or exclude softwarelist value - /// - public FilterItem Value { get; private set; } = new FilterItem(); - - /// - /// Include or exclude load flag - /// - public FilterItem LoadFlag { get; private set; } = new FilterItem(); + public FilterItem DatItem_AreaName { get; private set; } = new FilterItem(); + public FilterItem DatItem_AreaSize { get; private set; } = new FilterItem() { Positive = null, Negative = null, Neutral = null }; + public FilterItem DatItem_AreaWidth { get; private set; } = new FilterItem(); + public FilterItem DatItem_AreaEndianness { get; private set; } = new FilterItem(); + public FilterItem DatItem_Value { get; private set; } = new FilterItem(); + public FilterItem DatItem_LoadFlag { get; private set; } = new FilterItem(); #endregion - /// - /// Include or exclude items with the "Default" tag - /// - public FilterItem Default { get; private set; } = new FilterItem() { Neutral = null }; + #region Item-Specific - /// - /// Include or exclude descriptions - /// - public FilterItem Description { get; private set; } = new FilterItem(); - - /// - /// Include or exclude item sizes - /// - /// Positive means "Greater than or equal", Negative means "Less than or equal", Neutral means "Equal" - public FilterItem Size { get; private set; } = new FilterItem() { Positive = -1, Negative = -1, Neutral = -1 }; - - /// - /// Include or exclude CRC32 hashes - /// - public FilterItem CRC { get; private set; } = new FilterItem(); - - /// - /// Include or exclude MD5 hashes - /// - public FilterItem MD5 { get; private set; } = new FilterItem(); + // BiosSet + public FilterItem DatItem_Default { get; private set; } = new FilterItem() { Neutral = null }; + public FilterItem DatItem_Description { get; private set; } = new FilterItem(); + // Disk + public FilterItem DatItem_MD5 { get; private set; } = new FilterItem(); #if NET_FRAMEWORK - /// - /// Include or exclude RIPEMD160 hashes - /// - public FilterItem RIPEMD160 { get; private set; } = new FilterItem(); + public FilterItem DatItem_RIPEMD160 { get; private set; } = new FilterItem(); #endif + public FilterItem DatItem_SHA1 { get; private set; } = new FilterItem(); + public FilterItem DatItem_SHA256 { get; private set; } = new FilterItem(); + public FilterItem DatItem_SHA384 { get; private set; } = new FilterItem(); + public FilterItem DatItem_SHA512 { get; private set; } = new FilterItem(); + public FilterItem DatItem_Merge { get; private set; } = new FilterItem(); + public FilterItem DatItem_Region { get; private set; } = new FilterItem(); + public FilterItem DatItem_Index { get; private set; } = new FilterItem(); + public FilterItem DatItem_Writable { get; private set; } = new FilterItem() { Neutral = null }; + public FilterItem DatItem_Optional { get; private set; } = new FilterItem() { Neutral = null }; + public FilterItem DatItem_Status { get; private set; } = new FilterItem() { Positive = ItemStatus.NULL, Negative = ItemStatus.NULL }; - /// - /// Include or exclude SHA-1 hashes - /// - public FilterItem SHA1 { get; private set; } = new FilterItem(); + // Release + public FilterItem DatItem_Language { get; private set; } = new FilterItem(); + public FilterItem DatItem_Date { get; private set; } = new FilterItem(); - /// - /// Include or exclude SHA-256 hashes - /// - public FilterItem SHA256 { get; private set; } = new FilterItem(); + // Rom + public FilterItem DatItem_Bios { get; private set; } = new FilterItem(); + public FilterItem DatItem_Size { get; private set; } = new FilterItem() { Positive = -1, Negative = -1, Neutral = -1 }; + public FilterItem DatItem_CRC { get; private set; } = new FilterItem(); + public FilterItem DatItem_Offset { get; private set; } = new FilterItem(); + public FilterItem DatItem_Inverted { get; private set; } = new FilterItem(); - /// - /// Include or exclude SHA-384 hashes - /// - public FilterItem SHA384 { get; private set; } = new FilterItem(); - - /// - /// Include or exclude SHA-512 hashes - /// - public FilterItem SHA512 { get; private set; } = new FilterItem(); - - /// - /// Include or exclude merge tags - /// - public FilterItem MergeTag { get; private set; } = new FilterItem(); - - /// - /// Include or exclude regions - /// - public FilterItem Region { get; private set; } = new FilterItem(); - - /// - /// Include or exclude indexes - /// - public FilterItem Index { get; private set; } = new FilterItem(); - - /// - /// Include or exclude items with the "Writable" tag - /// - public FilterItem Writable { get; private set; } = new FilterItem() { Neutral = null }; - - /// - /// Include or exclude items with the "Writable" tag - /// - public FilterItem Optional { get; private set; } = new FilterItem() { Neutral = null }; - - /// - /// Include or exclude item statuses - /// - public FilterItem Status { get; private set; } = new FilterItem() { Positive = ItemStatus.NULL, Negative = ItemStatus.NULL }; - - /// - /// Include or exclude languages - /// - public FilterItem Language { get; private set; } = new FilterItem(); - - /// - /// Include or exclude dates - /// - public FilterItem Date { get; private set; } = new FilterItem(); - - /// - /// Include or exclude bioses - /// - public FilterItem Bios { get; private set; } = new FilterItem(); - - /// - /// Include or exclude offsets - /// - public FilterItem Offset { get; private set; } = new FilterItem(); - - /// - /// Include or exclude offsets - /// - public FilterItem Inverted { get; private set; } = new FilterItem(); + #endregion #endregion // DatItem Filters @@ -871,9 +739,9 @@ namespace SabreTools.Library.Filtering case Field.DatItem_Name: if (negate) - ItemName.NegativeSet.Add(value); + DatItem_Name.NegativeSet.Add(value); else - ItemName.PositiveSet.Add(value); + DatItem_Name.PositiveSet.Add(value); break; case Field.DatItem_Type: @@ -881,9 +749,9 @@ namespace SabreTools.Library.Filtering return; if (negate) - ItemTypes.NegativeSet.Add(value); + DatItem_Type.NegativeSet.Add(value); else - ItemTypes.PositiveSet.Add(value); + DatItem_Type.PositiveSet.Add(value); break; #endregion @@ -892,16 +760,16 @@ namespace SabreTools.Library.Filtering case Field.DatItem_AltName: if (negate) - AltName.NegativeSet.Add(value); + DatItem_AltName.NegativeSet.Add(value); else - AltName.PositiveSet.Add(value); + DatItem_AltName.PositiveSet.Add(value); break; case Field.DatItem_AltTitle: if (negate) - AltTitle.NegativeSet.Add(value); + DatItem_AltTitle.NegativeSet.Add(value); else - AltTitle.PositiveSet.Add(value); + DatItem_AltTitle.PositiveSet.Add(value); break; #endregion @@ -910,37 +778,37 @@ namespace SabreTools.Library.Filtering case Field.DatItem_Original: if (negate) - Original.NegativeSet.Add(value); + DatItem_Original.NegativeSet.Add(value); else - Original.PositiveSet.Add(value); + DatItem_Original.PositiveSet.Add(value); break; case Field.DatItem_OpenMSXSubType: if (negate) - SubType.Negative |= value.AsOpenMSXSubType(); + DatItem_OpenMSXSubType.Negative |= value.AsOpenMSXSubType(); else - SubType.Positive |= value.AsOpenMSXSubType(); + DatItem_OpenMSXSubType.Positive |= value.AsOpenMSXSubType(); break; case Field.DatItem_OpenMSXType: if (negate) - OpenMSXType.NegativeSet.Add(value); + DatItem_OpenMSXType.NegativeSet.Add(value); else - OpenMSXType.PositiveSet.Add(value); + DatItem_OpenMSXType.PositiveSet.Add(value); break; case Field.DatItem_Remark: if (negate) - Remark.NegativeSet.Add(value); + DatItem_Remark.NegativeSet.Add(value); else - Remark.PositiveSet.Add(value); + DatItem_Remark.PositiveSet.Add(value); break; case Field.DatItem_Boot: if (negate) - Boot.NegativeSet.Add(value); + DatItem_Boot.NegativeSet.Add(value); else - Boot.PositiveSet.Add(value); + DatItem_Boot.PositiveSet.Add(value); break; #endregion @@ -949,23 +817,23 @@ namespace SabreTools.Library.Filtering case Field.DatItem_Part_Name: if (negate) - PartName.NegativeSet.Add(value); + DatItem_Part_Name.NegativeSet.Add(value); else - PartName.PositiveSet.Add(value); + DatItem_Part_Name.PositiveSet.Add(value); break; case Field.DatItem_Part_Interface: if (negate) - PartInterface.NegativeSet.Add(value); + DatItem_Part_Interface.NegativeSet.Add(value); else - PartInterface.PositiveSet.Add(value); + DatItem_Part_Interface.PositiveSet.Add(value); break; case Field.DatItem_AreaName: if (negate) - AreaName.NegativeSet.Add(value); + DatItem_AreaName.NegativeSet.Add(value); else - AreaName.PositiveSet.Add(value); + DatItem_AreaName.PositiveSet.Add(value); break; case Field.DatItem_AreaSize: @@ -984,84 +852,84 @@ namespace SabreTools.Library.Filtering // Equal if (asOperation == null && !negate) { - AreaSize.Neutral = areasize; + DatItem_AreaSize.Neutral = areasize; } // Not Equal else if (asOperation == null && negate) { - AreaSize.Negative = areasize - 1; - AreaSize.Positive = areasize + 1; + DatItem_AreaSize.Negative = areasize - 1; + DatItem_AreaSize.Positive = areasize + 1; } // Greater Than or Equal else if (asOperation == true && !negate) { - AreaSize.Positive = areasize; + DatItem_AreaSize.Positive = areasize; } // Strictly Less Than else if (asOperation == true && negate) { - AreaSize.Negative = areasize - 1; + DatItem_AreaSize.Negative = areasize - 1; } // Less Than or Equal else if (asOperation == false && !negate) { - AreaSize.Negative = areasize; + DatItem_AreaSize.Negative = areasize; } // Strictly Greater Than else if (asOperation == false && negate) { - AreaSize.Positive = areasize + 1; + DatItem_AreaSize.Positive = areasize + 1; } break; case Field.DatItem_AreaWidth: if (negate) - AreaWidth.NegativeSet.Add(value); + DatItem_AreaWidth.NegativeSet.Add(value); else - AreaWidth.PositiveSet.Add(value); + DatItem_AreaWidth.PositiveSet.Add(value); break; case Field.DatItem_AreaEndianness: if (negate) - AreaEndianness.NegativeSet.Add(value); + DatItem_AreaEndianness.NegativeSet.Add(value); else - AreaEndianness.PositiveSet.Add(value); + DatItem_AreaEndianness.PositiveSet.Add(value); break; case Field.DatItem_Value: if (negate) - Value.NegativeSet.Add(value); + DatItem_Value.NegativeSet.Add(value); else - Value.PositiveSet.Add(value); + DatItem_Value.PositiveSet.Add(value); break; case Field.DatItem_LoadFlag: if (negate) - LoadFlag.NegativeSet.Add(value); + DatItem_LoadFlag.NegativeSet.Add(value); else - LoadFlag.PositiveSet.Add(value); + DatItem_LoadFlag.PositiveSet.Add(value); break; #endregion case Field.DatItem_Default: if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase)) - Default.Neutral = false; + DatItem_Default.Neutral = false; else - Default.Neutral = true; + DatItem_Default.Neutral = true; break; case Field.DatItem_Description: if (negate) - Description.NegativeSet.Add(value); + DatItem_Description.NegativeSet.Add(value); else - Description.PositiveSet.Add(value); + DatItem_Description.PositiveSet.Add(value); break; case Field.DatItem_Size: @@ -1080,168 +948,168 @@ namespace SabreTools.Library.Filtering // Equal if (sOperation == null && !negate) { - Size.Neutral = size; + DatItem_Size.Neutral = size; } // Not Equal else if (sOperation == null && negate) { - Size.Negative = size - 1; - Size.Positive = size + 1; + DatItem_Size.Negative = size - 1; + DatItem_Size.Positive = size + 1; } // Greater Than or Equal else if (sOperation == true && !negate) { - Size.Positive = size; + DatItem_Size.Positive = size; } // Strictly Less Than else if (sOperation == true && negate) { - Size.Negative = size - 1; + DatItem_Size.Negative = size - 1; } // Less Than or Equal else if (sOperation == false && !negate) { - Size.Negative = size; + DatItem_Size.Negative = size; } // Strictly Greater Than else if (sOperation == false && negate) { - Size.Positive = size + 1; + DatItem_Size.Positive = size + 1; } break; case Field.DatItem_CRC: if (negate) - CRC.NegativeSet.Add(value); + DatItem_CRC.NegativeSet.Add(value); else - CRC.PositiveSet.Add(value); + DatItem_CRC.PositiveSet.Add(value); break; case Field.DatItem_MD5: if (negate) - MD5.NegativeSet.Add(value); + DatItem_MD5.NegativeSet.Add(value); else - MD5.PositiveSet.Add(value); + DatItem_MD5.PositiveSet.Add(value); break; #if NET_FRAMEWORK case Field.DatItem_RIPEMD160: if (negate) - RIPEMD160.NegativeSet.Add(value); + DatItem_RIPEMD160.NegativeSet.Add(value); else - RIPEMD160.PositiveSet.Add(value); + DatItem_RIPEMD160.PositiveSet.Add(value); break; #endif case Field.DatItem_SHA1: if (negate) - SHA1.NegativeSet.Add(value); + DatItem_SHA1.NegativeSet.Add(value); else - SHA1.PositiveSet.Add(value); + DatItem_SHA1.PositiveSet.Add(value); break; case Field.DatItem_SHA256: if (negate) - SHA256.NegativeSet.Add(value); + DatItem_SHA256.NegativeSet.Add(value); else - SHA256.PositiveSet.Add(value); + DatItem_SHA256.PositiveSet.Add(value); break; case Field.DatItem_SHA384: if (negate) - SHA384.NegativeSet.Add(value); + DatItem_SHA384.NegativeSet.Add(value); else - SHA384.PositiveSet.Add(value); + DatItem_SHA384.PositiveSet.Add(value); break; case Field.DatItem_SHA512: if (negate) - SHA512.NegativeSet.Add(value); + DatItem_SHA512.NegativeSet.Add(value); else - SHA512.PositiveSet.Add(value); + DatItem_SHA512.PositiveSet.Add(value); break; case Field.DatItem_Merge: if (negate) - MergeTag.NegativeSet.Add(value); + DatItem_Merge.NegativeSet.Add(value); else - MergeTag.PositiveSet.Add(value); + DatItem_Merge.PositiveSet.Add(value); break; case Field.DatItem_Region: if (negate) - Region.NegativeSet.Add(value); + DatItem_Region.NegativeSet.Add(value); else - Region.PositiveSet.Add(value); + DatItem_Region.PositiveSet.Add(value); break; case Field.DatItem_Index: if (negate) - Index.NegativeSet.Add(value); + DatItem_Index.NegativeSet.Add(value); else - Index.PositiveSet.Add(value); + DatItem_Index.PositiveSet.Add(value); break; case Field.DatItem_Writable: if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase)) - Writable.Neutral = false; + DatItem_Writable.Neutral = false; else - Writable.Neutral = true; + DatItem_Writable.Neutral = true; break; case Field.DatItem_Optional: if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase)) - Optional.Neutral = false; + DatItem_Optional.Neutral = false; else - Optional.Neutral = true; + DatItem_Optional.Neutral = true; break; case Field.DatItem_Status: if (negate) - Status.Negative |= value.AsItemStatus(); + DatItem_Status.Negative |= value.AsItemStatus(); else - Status.Positive |= value.AsItemStatus(); + DatItem_Status.Positive |= value.AsItemStatus(); break; case Field.DatItem_Language: if (negate) - Language.NegativeSet.Add(value); + DatItem_Language.NegativeSet.Add(value); else - Language.PositiveSet.Add(value); + DatItem_Language.PositiveSet.Add(value); break; case Field.DatItem_Date: if (negate) - Date.NegativeSet.Add(value); + DatItem_Date.NegativeSet.Add(value); else - Date.PositiveSet.Add(value); + DatItem_Date.PositiveSet.Add(value); break; case Field.DatItem_Bios: if (negate) - Bios.NegativeSet.Add(value); + DatItem_Bios.NegativeSet.Add(value); else - Bios.PositiveSet.Add(value); + DatItem_Bios.PositiveSet.Add(value); break; case Field.DatItem_Offset: if (negate) - Offset.NegativeSet.Add(value); + DatItem_Offset.NegativeSet.Add(value); else - Offset.PositiveSet.Add(value); + DatItem_Offset.PositiveSet.Add(value); break; case Field.DatItem_Inverted: if (negate || value.Equals("false", StringComparison.OrdinalIgnoreCase)) - Inverted.Neutral = false; + DatItem_Inverted.Neutral = false; else - Inverted.Neutral = true; + DatItem_Inverted.Neutral = true; break; #endregion // DatItem Filters