Beispiel #1
0
        /// <summary>
        /// Returns a value indicating whether this instance is equal to a specified object value.
        /// </summary>
        /// <param name="obj">An object to compare with this instance.</param>
        /// <returns>True if obj is an equivalent DrawOverlayParams.</returns>
        public override bool Equals(object obj)
        {
            if (!(obj is DrawOverlayParams))
            {
                return(false);
            }
            DrawOverlayParams other = (DrawOverlayParams)obj;

            if (this.showAttackObjectives != other.showAttackObjectives)
            {
                return(false);
            }
            if (this.showAttackObjectiveNames != other.showAttackObjectiveNames)
            {
                return(false);
            }
            if (this.showFirebases != other.showFirebases)
            {
                return(false);
            }
            if (this.showAirfields != other.showAirfields)
            {
                return(false);
            }
            if (this.showSupplyLinks != other.showSupplyLinks)
            {
                return(false);
            }
            if (this.showBrigadeLinks != other.showBrigadeLinks)
            {
                return(false);
            }
            if (this.showBrigadeLinksSelected != other.showBrigadeLinksSelected)
            {
                return(false);
            }
            if (this.showBrigadeLinksArmy != other.showBrigadeLinksArmy)
            {
                return(false);
            }
            if (this.showAirGrid != other.showAirGrid)
            {
                return(false);
            }
            if (this.showFrontlines != other.showFrontlines)
            {
                return(false);
            }
            if (this.showAttackArrows != other.showAttackArrows)
            {
                return(false);
            }
            if (this.showAttackArrowsLinked != other.showAttackArrowsLinked)
            {
                return(false);
            }
            if (this.showPlayerActivity != other.showPlayerActivity)
            {
                return(false);
            }
            if (this.showCountryBorders != other.showCountryBorders)
            {
                return(false);
            }
            if (this.showCountryBordersNames != other.showCountryBordersNames)
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
        /// <summary>
        /// Tests whether the given DrawOverlayParams are equivalent.
        /// </summary>
        /// <param name="other">The object to compare.</param>
        /// <returns>False if changes exist that would draw differently.</returns>
        public bool IsEquivalent(DrawOverlayParams other)
        {
            if (this.showAttackObjectives != other.showAttackObjectives)
            {
                return(false);
            }
            if ((this.showAttackObjectives && this.showAttackObjectiveNames) != (other.showAttackObjectives && other.showAttackObjectiveNames))
            {
                return(false);
            }
            if (this.showFirebases != other.showFirebases)
            {
                return(false);
            }
            if (this.showAirfields != other.showAirfields)
            {
                return(false);
            }
            if (this.showSupplyLinks != other.showSupplyLinks)
            {
                return(false);
            }
            if (this.showBrigadeLinks != other.showBrigadeLinks)
            {
                return(false);
            }
            if ((this.showBrigadeLinks && this.showBrigadeLinksSelected) != (other.showBrigadeLinks && other.showBrigadeLinksSelected))
            {
                return(false);
            }
            if ((this.showBrigadeLinks && this.showBrigadeLinksArmy) != (other.showBrigadeLinks && other.showBrigadeLinksArmy))
            {
                return(false);
            }
            if (this.showAirGrid != other.showAirGrid)
            {
                return(false);
            }
            if (this.showFrontlines != other.showFrontlines)
            {
                return(false);
            }
            if (this.showAttackArrows != other.showAttackArrows)
            {
                return(false);
            }
            if ((this.showAttackArrows && this.showAttackArrowsLinked) != (other.showAttackArrows && other.showAttackArrowsLinked))
            {
                return(false);
            }
            if (this.showPlayerActivity != other.showPlayerActivity)
            {
                return(false);
            }
            if (this.showCountryBorders != other.showCountryBorders)
            {
                return(false);
            }
            if ((this.showCountryBorders && this.showCountryBordersNames) != (other.showCountryBorders && other.showCountryBordersNames))
            {
                return(false);
            }

            return(true);
        }