示例#1
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a Slot, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a Slot
            Slot newOther = other as Slot;

            // If the Slot information matches
            bool match = (Name == newOther.Name);

            if (!match)
            {
                return(match);
            }

            // If the slot options match
            if (SlotOptionsSpecified)
            {
                foreach (SlotOption slotOption in SlotOptions)
                {
                    match &= newOther.SlotOptions.Contains(slotOption);
                }
            }

            return(match);
        }
示例#2
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a Driver to replace from, ignore specific fields
            if (item.ItemType != ItemType.Driver)
            {
                return;
            }

            // Cast for easier access
            Driver newItem = item as Driver;

            // Replace the fields
            if (fields.Contains(Field.DatItem_SupportStatus))
            {
                Status = newItem.Status;
            }

            if (fields.Contains(Field.DatItem_EmulationStatus))
            {
                Emulation = newItem.Emulation;
            }

            if (fields.Contains(Field.DatItem_CocktailStatus))
            {
                Cocktail = newItem.Cocktail;
            }

            if (fields.Contains(Field.DatItem_SaveStateStatus))
            {
                SaveState = newItem.SaveState;
            }
        }
示例#3
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a Instance to replace from, ignore specific fields
            if (item.ItemType != ItemType.Instance)
            {
                return;
            }

            // Cast for easier access
            Instance newItem = item as Instance;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Instance_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_Instance_BriefName))
            {
                BriefName = newItem.BriefName;
            }
        }
示例#4
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a Chip to replace from, ignore specific fields
            if (item.ItemType != ItemType.Chip)
            {
                return;
            }

            // Cast for easier access
            Chip newItem = item as Chip;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_Tag))
            {
                Tag = newItem.Tag;
            }

            if (fields.Contains(Field.DatItem_ChipType))
            {
                ChipType = newItem.ChipType;
            }

            if (fields.Contains(Field.DatItem_Clock))
            {
                Clock = newItem.Clock;
            }
        }
示例#5
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a Input, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a Input
            Input newOther = other as Input;

            // If the Input information matches
            bool match = (Service == newOther.Service &&
                          Tilt == newOther.Tilt &&
                          Players == newOther.Players &&
                          Coins == newOther.Coins);

            if (!match)
            {
                return(match);
            }

            // If the controls match
            if (ControlsSpecified)
            {
                foreach (Control control in Controls)
                {
                    match &= newOther.Controls.Contains(control);
                }
            }

            return(match);
        }
示例#6
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a Control, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a Control
            Control newOther = other as Control;

            // If the Control information matches
            return(ControlType == newOther.ControlType &&
                   Player == newOther.Player &&
                   Buttons == newOther.Buttons &&
                   RequiredButtons == newOther.RequiredButtons &&
                   Minimum == newOther.Minimum &&
                   Maximum == newOther.Maximum &&
                   Sensitivity == newOther.Sensitivity &&
                   KeyDelta == newOther.KeyDelta &&
                   Reverse == newOther.Reverse &&
                   Ways == newOther.Ways &&
                   Ways2 == newOther.Ways2 &&
                   Ways3 == newOther.Ways3);
        }
示例#7
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a PartFeature to replace from, ignore specific fields
            if (item.ItemType != ItemType.PartFeature)
            {
                return;
            }

            // Cast for easier access
            PartFeature newItem = item as PartFeature;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Part_Feature_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_Part_Feature_Value))
            {
                Value = newItem.Value;
            }
        }
示例#8
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a Location to replace from, ignore specific fields
            if (item.ItemType != ItemType.Location)
            {
                return;
            }

            // Cast for easier access
            Location newItem = item as Location;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Location_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_Location_Number))
            {
                Number = newItem.Number;
            }

            if (fields.Contains(Field.DatItem_Location_Inverted))
            {
                Inverted = newItem.Inverted;
            }
        }
示例#9
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a Adjuster to replace from, ignore specific fields
            if (item.ItemType != ItemType.Adjuster)
            {
                return;
            }

            // Cast for easier access
            Adjuster newItem = item as Adjuster;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_Default))
            {
                Default = newItem.Default;
            }

            // DatItem_Condition_* doesn't make sense here
            // since not every condition under the other item
            // can replace every condition under this item
        }
示例#10
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a Display, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a Display
            Display newOther = other as Display;

            // If the Display information matches
            return(Tag == newOther.Tag &&
                   DisplayType == newOther.DisplayType &&
                   Rotate == newOther.Rotate &&
                   FlipX == newOther.FlipX &&
                   Width == newOther.Width &&
                   Height == newOther.Height &&
                   Refresh == newOther.Refresh &&
                   PixClock == newOther.PixClock &&
                   HTotal == newOther.HTotal &&
                   HBEnd == newOther.HBEnd &&
                   HBStart == newOther.HBStart &&
                   VTotal == newOther.VTotal &&
                   VBEnd == newOther.VBEnd &&
                   VBStart == newOther.VBStart);
        }
示例#11
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a Adjuster, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a Adjuster
            Adjuster newOther = other as Adjuster;

            // If the Adjuster information matches
            bool match = (Name == newOther.Name && Default == newOther.Default);

            if (!match)
            {
                return(match);
            }

            // If the conditions match
            if (ConditionsSpecified)
            {
                foreach (Condition condition in Conditions)
                {
                    match &= newOther.Conditions.Contains(condition);
                }
            }

            return(match);
        }
示例#12
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a Port, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a Port
            Port newOther = other as Port;

            // If the Port information matches
            bool match = (Tag == newOther.Tag);

            if (!match)
            {
                return(match);
            }

            // If the analogs match
            if (AnalogsSpecified)
            {
                foreach (Analog analog in Analogs)
                {
                    match &= newOther.Analogs.Contains(analog);
                }
            }

            return(match);
        }
示例#13
0
        public override bool Equals(DatItem other)
        {
            bool dupefound = false;

            // If we don't have a rom, return false
            if (ItemType != other.ItemType)
            {
                return(dupefound);
            }

            // Otherwise, treat it as a Rom
            Rom newOther = other as Rom;

            // If all hashes are empty but they're both nodump and the names match, then they're dupes
            if ((ItemStatus == ItemStatus.Nodump && newOther.ItemStatus == ItemStatus.Nodump) &&
                Name == newOther.Name &&
                !HasHashes() && !newOther.HasHashes())
            {
                dupefound = true;
            }

            // If we have a file that has no known size, rely on the hashes only
            else if (Size == null && HashMatch(newOther))
            {
                dupefound = true;
            }

            // Otherwise if we get a partial match
            else if (Size == newOther.Size && HashMatch(newOther))
            {
                dupefound = true;
            }

            return(dupefound);
        }
示例#14
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a Part to replace from, ignore specific fields
            if (item.ItemType != ItemType.Part)
            {
                return;
            }

            // Cast for easier access
            Part newItem = item as Part;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Part_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_Part_Interface))
            {
                Interface = newItem.Interface;
            }

            // DatItem_Part_Feature_* doesn't make sense here
            // since not every part feature under the other item
            // can replace every part feature under this item
        }
示例#15
0
        public override bool Equals(DatItem other)
        {
            bool dupefound = false;

            // If we don't have a rom, return false
            if (ItemType != other.ItemType)
            {
                return(dupefound);
            }

            // Otherwise, treat it as a Disk
            Disk newOther = other as Disk;

            // If all hashes are empty but they're both nodump and the names match, then they're dupes
            if ((ItemStatus == ItemStatus.Nodump && newOther.ItemStatus == ItemStatus.Nodump) &&
                Name == newOther.Name &&
                !HasHashes() && !newOther.HasHashes())
            {
                dupefound = true;
            }

            // Otherwise if we get a partial match
            else if (HashMatch(newOther))
            {
                dupefound = true;
            }

            return(dupefound);
        }
示例#16
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a Part, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a Part
            Part newOther = other as Part;

            // If the Part information matches
            bool match = (Name == newOther.Name &&
                          Interface == newOther.Interface);

            if (!match)
            {
                return(match);
            }

            // If the features match
            if (FeaturesSpecified)
            {
                foreach (PartFeature partFeature in Features)
                {
                    match &= newOther.Features.Contains(partFeature);
                }
            }

            return(match);
        }
示例#17
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a DataArea to replace from, ignore specific fields
            if (item.ItemType != ItemType.DataArea)
            {
                return;
            }

            // Cast for easier access
            DataArea newItem = item as DataArea;

            // Replace the fields
            if (fields.Contains(Field.DatItem_AreaName))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_AreaSize))
            {
                Size = newItem.Size;
            }

            if (fields.Contains(Field.DatItem_AreaWidth))
            {
                Width = newItem.Width;
            }

            if (fields.Contains(Field.DatItem_AreaEndianness))
            {
                Endianness = newItem.Endianness;
            }
        }
示例#18
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a BiosSet to replace from, ignore specific fields
            if (item.ItemType != ItemType.BiosSet)
            {
                return;
            }

            // Cast for easier access
            BiosSet newItem = item as BiosSet;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_Description))
            {
                Description = newItem.Description;
            }

            if (fields.Contains(Field.DatItem_Default))
            {
                Default = newItem.Default;
            }
        }
示例#19
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a SoftwareList to replace from, ignore specific fields
            if (item.ItemType != ItemType.SoftwareList)
            {
                return;
            }

            // Cast for easier access
            SoftwareList newItem = item as SoftwareList;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_SoftwareListStatus))
            {
                Status = newItem.Status;
            }

            if (fields.Contains(Field.DatItem_Filter))
            {
                Filter = newItem.Filter;
            }
        }
示例#20
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a Feature to replace from, ignore specific fields
            if (item.ItemType != ItemType.Feature)
            {
                return;
            }

            // Cast for easier access
            Feature newItem = item as Feature;

            // Replace the fields
            if (fields.Contains(Field.DatItem_FeatureType))
            {
                Type = newItem.Type;
            }

            if (fields.Contains(Field.DatItem_FeatureStatus))
            {
                Status = newItem.Status;
            }

            if (fields.Contains(Field.DatItem_FeatureOverall))
            {
                Overall = newItem.Overall;
            }
        }
示例#21
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a DipSwitch, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a DipSwitch
            DipSwitch newOther = other as DipSwitch;

            // If the DipSwitch information matches
            bool match = (Name == newOther.Name &&
                          Tag == newOther.Tag &&
                          Mask == newOther.Mask);

            if (!match)
            {
                return(match);
            }

            // If the part matches
            if (PartSpecified)
            {
                match &= (Part == newOther.Part);
            }

            // If the conditions match
            if (ConditionsSpecified)
            {
                foreach (Condition condition in Conditions)
                {
                    match &= newOther.Conditions.Contains(condition);
                }
            }

            // If the locations match
            if (LocationsSpecified)
            {
                foreach (Location location in Locations)
                {
                    match &= newOther.Locations.Contains(location);
                }
            }

            // If the values match
            if (ValuesSpecified)
            {
                foreach (Setting value in Values)
                {
                    match &= newOther.Values.Contains(value);
                }
            }

            return(match);
        }
示例#22
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a DipSwitch to replace from, ignore specific fields
            if (item.ItemType != ItemType.DipSwitch)
            {
                return;
            }

            // Cast for easier access
            DipSwitch newItem = item as DipSwitch;

            // Replace the fields

            #region Common

            if (fields.Contains(Field.DatItem_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_Tag))
            {
                Tag = newItem.Tag;
            }

            if (fields.Contains(Field.DatItem_Mask))
            {
                Mask = newItem.Mask;
            }

            // DatItem_Condition_* doesn't make sense here
            // since not every condition under the other item
            // can replace every condition under this item

            // DatItem_Location_* doesn't make sense here
            // since not every location under the other item
            // can replace every location under this item

            // DatItem_Setting_* doesn't make sense here
            // since not every value under the other item
            // can replace every value under this item

            #endregion

            #region SoftwareList

            if (PartSpecified && newItem.PartSpecified)
            {
                Part.ReplaceFields(newItem.Part, fields);
            }

            #endregion
        }
示例#23
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a Media to replace from, ignore specific fields
            if (item.ItemType != ItemType.Media)
            {
                return;
            }

            // Cast for easier access
            Media newItem = item as Media;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Name))
            {
                Name = newItem.Name;
            }

            if (fields.Contains(Field.DatItem_MD5))
            {
                if (string.IsNullOrEmpty(MD5) && !string.IsNullOrEmpty(newItem.MD5))
                {
                    MD5 = newItem.MD5;
                }
            }

            if (fields.Contains(Field.DatItem_SHA1))
            {
                if (string.IsNullOrEmpty(SHA1) && !string.IsNullOrEmpty(newItem.SHA1))
                {
                    SHA1 = newItem.SHA1;
                }
            }

            if (fields.Contains(Field.DatItem_SHA256))
            {
                if (string.IsNullOrEmpty(SHA256) && !string.IsNullOrEmpty(newItem.SHA256))
                {
                    SHA256 = newItem.SHA256;
                }
            }

            if (fields.Contains(Field.DatItem_SpamSum))
            {
                if (string.IsNullOrEmpty(SpamSum) && !string.IsNullOrEmpty(newItem.SpamSum))
                {
                    SpamSum = newItem.SpamSum;
                }
            }
        }
示例#24
0
        public override bool Equals(DatItem other)
        {
            bool dupefound = false;

            // If we don't have a rom, return false
            if (this.ItemType != other.ItemType)
            {
                return(dupefound);
            }

            // Otherwise, treat it as a rom
            Rom newOther = (Rom)other;

            // If all hashes are empty but they're both nodump and the names match, then they're dupes
            if ((this.ItemStatus == ItemStatus.Nodump && newOther.ItemStatus == ItemStatus.Nodump) &&
                (this.Name == newOther.Name) &&
                (this._crc.IsNullOrWhiteSpace() && newOther._crc.IsNullOrWhiteSpace()) &&
                (this._md5.IsNullOrWhiteSpace() && newOther._md5.IsNullOrWhiteSpace()) &&
                (this._sha1.IsNullOrWhiteSpace() && newOther._sha1.IsNullOrWhiteSpace()) &&
                (this._sha256.IsNullOrWhiteSpace() && newOther._sha256.IsNullOrWhiteSpace()) &&
                (this._sha384.IsNullOrWhiteSpace() && newOther._sha384.IsNullOrWhiteSpace()) &&
                (this._sha512.IsNullOrWhiteSpace() && newOther._sha512.IsNullOrWhiteSpace()))
            {
                dupefound = true;
            }

            // If we can determine that the roms have no non-empty hashes in common, we return false
            else if ((this._crc.IsNullOrWhiteSpace() || newOther._crc.IsNullOrWhiteSpace()) &&
                     (this._md5.IsNullOrWhiteSpace() || newOther._md5.IsNullOrWhiteSpace()) &&
                     (this._sha1.IsNullOrWhiteSpace() || newOther._sha1.IsNullOrWhiteSpace()) &&
                     (this._sha256.IsNullOrWhiteSpace() || newOther._sha256.IsNullOrWhiteSpace()) &&
                     (this._sha384.IsNullOrWhiteSpace() || newOther._sha384.IsNullOrWhiteSpace()) &&
                     (this._sha512.IsNullOrWhiteSpace() || newOther._sha512.IsNullOrWhiteSpace()))
            {
                dupefound = false;
            }

            // Otherwise if we get a partial match
            else if ((this.Size == newOther.Size) &&
                     ((this._crc.IsNullOrWhiteSpace() || newOther._crc.IsNullOrWhiteSpace()) || Enumerable.SequenceEqual(this._crc, newOther._crc)) &&
                     ((this._md5.IsNullOrWhiteSpace() || newOther._md5.IsNullOrWhiteSpace()) || Enumerable.SequenceEqual(this._md5, newOther._md5)) &&
                     ((this._sha1.IsNullOrWhiteSpace() || newOther._sha1.IsNullOrWhiteSpace()) || Enumerable.SequenceEqual(this._sha1, newOther._sha1)) &&
                     ((this._sha256.IsNullOrWhiteSpace() || newOther._sha256.IsNullOrWhiteSpace()) || Enumerable.SequenceEqual(this._sha256, newOther._sha256)) &&
                     ((this._sha384.IsNullOrWhiteSpace() || newOther._sha384.IsNullOrWhiteSpace()) || Enumerable.SequenceEqual(this._sha384, newOther._sha384)) &&
                     ((this._sha512.IsNullOrWhiteSpace() || newOther._sha512.IsNullOrWhiteSpace()) || Enumerable.SequenceEqual(this._sha512, newOther._sha512)))
            {
                dupefound = true;
            }

            return(dupefound);
        }
示例#25
0
        /// <summary>
        /// Replace fields from another item
        /// </summary>
        /// <param name="item">DatItem to pull new information from</param>
        /// <param name="fields">List of Fields representing what should be updated</param>
        public override void ReplaceFields(DatItem item, List <Field> fields)
        {
            // Replace common fields first
            base.ReplaceFields(item, fields);

            // If we don't have a Condition to replace from, ignore specific fields
            if (item.ItemType != ItemType.Condition)
            {
                return;
            }

            // Cast for easier access
            Condition newItem = item as Condition;

            // Replace the fields
            if (fields.Contains(Field.DatItem_Tag))
            {
                Tag = newItem.Tag;
            }
            else if (fields.Contains(Field.DatItem_Condition_Tag))
            {
                Tag = newItem.Tag;
            }

            if (fields.Contains(Field.DatItem_Mask))
            {
                Mask = newItem.Mask;
            }
            else if (fields.Contains(Field.DatItem_Condition_Mask))
            {
                Mask = newItem.Mask;
            }

            if (fields.Contains(Field.DatItem_Relation))
            {
                Relation = newItem.Relation;
            }
            else if (fields.Contains(Field.DatItem_Condition_Relation))
            {
                Relation = newItem.Relation;
            }

            if (fields.Contains(Field.DatItem_Value))
            {
                Value = newItem.Value;
            }
            else if (fields.Contains(Field.DatItem_Condition_Value))
            {
                Value = newItem.Value;
            }
        }
示例#26
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a blank, return false
            if (this.ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a
            Blank newOther = (Blank)other;

            // If the archive information matches
            return(_machine == newOther._machine);
        }
示例#27
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a Sound, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a Sound
            Sound newOther = other as Sound;

            // If the Sound information matches
            return(Channels == newOther.Channels);
        }
示例#28
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a device reference, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a device reference
            DeviceReference newOther = other as DeviceReference;

            // If the device reference information matches
            return(Name == newOther.Name);
        }
示例#29
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a RamOption, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a RamOption
            RamOption newOther = other as RamOption;

            // If the BiosSet information matches
            return(Name == newOther.Name && Default == newOther.Default && Content == newOther.Content);
        }
示例#30
0
        public override bool Equals(DatItem other)
        {
            // If we don't have a Feature, return false
            if (ItemType != other.ItemType)
            {
                return(false);
            }

            // Otherwise, treat it as a Feature
            Feature newOther = other as Feature;

            // If the Feature information matches
            return(Type == newOther.Type && Status == newOther.Status && Overall == newOther.Overall);
        }