Exemple #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (speechBubble_ != null)
            {
                hash ^= SpeechBubble.GetHashCode();
            }
            if (RequiresScrim != false)
            {
                hash ^= RequiresScrim.GetHashCode();
            }
            if (Alignment != 0)
            {
                hash ^= Alignment.GetHashCode();
            }
            if (ShowContinueActionText != false)
            {
                hash ^= ShowContinueActionText.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        /// <summary>
        /// Highlights the selected alignment button with a color to signify that it is the button
        /// that has been selected.
        /// </summary>
        /// <param name="a">The alignment to select</param>
        private void SetAlignmentButton(Alignment a)
        {
            Color c = Color.BlanchedAlmond;

            switch (a)
            {
            case Alignment.Left:
                Button_LeftAlign.BackColor = c;
                Button_CenterAlign.UseVisualStyleBackColor = true;
                Button_RightAlign.UseVisualStyleBackColor  = true;
                break;

            case Alignment.Center:
                Button_LeftAlign.UseVisualStyleBackColor  = true;
                Button_CenterAlign.BackColor              = c;
                Button_RightAlign.UseVisualStyleBackColor = true;
                break;

            case Alignment.Right:
                Button_LeftAlign.UseVisualStyleBackColor   = true;
                Button_CenterAlign.UseVisualStyleBackColor = true;
                Button_RightAlign.BackColor = c;
                break;

            default: throw new InvalidEnumArgumentException("a", a.GetHashCode(), typeof(Alignment));
            }
        }
Exemple #3
0
 /// <summary>
 /// Get the hash code for the descriptor.
 /// </summary>
 public override int GetHashCode()
 {
     return(Utils.CombineHashCodes(
                Property?.GetHashCode() ?? 0,
                Alignment.GetHashCode(),
                Width.GetHashCode(),
                Label?.GetHashCode() ?? 0));
 }
Exemple #4
0
 public override int GetHashCode()
 {
     return(Font.GetHashCode()
            ^ Fill.GetHashCode()
            ^ Border.GetHashCode()
            ^ NumberFormat.GetHashCode()
            ^ Alignment.GetHashCode()
            ^ Protection.GetHashCode());
 }
Exemple #5
0
        public void HashCodeIsHashOfFull()
        {
            alignment.Lawfulness = "lawfulness";
            alignment.Goodness   = "goodness";

            var alignmentHash         = alignment.GetHashCode();
            var alignmentToStringHash = alignment.ToString().GetHashCode();

            Assert.That(alignmentHash, Is.EqualTo(alignmentToStringHash));
        }
Exemple #6
0
        public override int GetHashCode()
        {
            int hashCode = -1241407421;

            hashCode = hashCode * -1521134295 + cameraLTW.GetHashCode();
            hashCode = hashCode * -1521134295 + clipPlane.GetHashCode();
            hashCode = hashCode * -1521134295 + offsetX.GetHashCode();
            hashCode = hashCode * -1521134295 + offsetY.GetHashCode();
            hashCode = hashCode * -1521134295 + alignment.GetHashCode();
            return(hashCode);
        }
Exemple #7
0
        public override int GetHashCode()
        {
            var hashCode = 96768724;

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(VideoFilename);

            hashCode = hashCode * -1521134295 + Scaling.GetHashCode();
            hashCode = hashCode * -1521134295 + Alignment.GetHashCode();
            hashCode = hashCode * -1521134295 + Loop.GetHashCode();
            return(hashCode);
        }
Exemple #8
0
        public override int GetHashCode()
        {
            var hashCode = -476701294;

            hashCode = hashCode * -1521134295 + Alignment.GetHashCode();
            hashCode = hashCode * -1521134295 + Border.GetHashCode();
            hashCode = hashCode * -1521134295 + Fill.GetHashCode();
            hashCode = hashCode * -1521134295 + Font.GetHashCode();
            hashCode = hashCode * -1521134295 + NumberFormat.GetHashCode();
            hashCode = hashCode * -1521134295 + Protection.GetHashCode();
            return(hashCode);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (int)FillId;
         hashCode = (hashCode * 397) ^ (int)FontId;
         hashCode = (hashCode * 397) ^ (int)BorderId;
         hashCode = (hashCode * 397) ^ (int)NumberFormatId;
         hashCode = (hashCode * 397) ^ (Alignment != null ? Alignment.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemple #10
0
 public override int GetHashCode()
 {
     unchecked {
         int hash = 23;
         hash = hash * 37 + Index.GetHashCode();
         hash = hash * 37 + Alignment.GetHashCode();
         hash = hash * 37 + FormatString.GetHashCode();
         hash = hash * 37 + StartLocation.GetHashCode();
         hash = hash * 37 + EndLocation.GetHashCode();
         return(hash);
     }
 }
Exemple #11
0
 /// <summary>
 /// Returns the object's hash code.
 /// </summary>
 /// <returns>Hash code.</returns>
 public override int GetHashCode()
 {
     // See http://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + PadChar.GetHashCode();
         hash = hash * 23 + Alignment.GetHashCode();
         hash = hash * 23 + MinWidth.GetHashCode();
         hash = hash * 23 + MaxWidth.GetHashCode();
         return(hash);
     }
 }
Exemple #12
0
        public override int GetHashCode()
        {
            var hashCode = -476701294;

            hashCode = hashCode * -1521134295 + Alignment.GetHashCode();
            hashCode = hashCode * -1521134295 + Border.GetHashCode();
            hashCode = hashCode * -1521134295 + Fill.GetHashCode();
            hashCode = hashCode * -1521134295 + Font.GetHashCode();
            hashCode = hashCode * -1521134295 + IncludeQuotePrefix.GetHashCode();
            hashCode = hashCode * -1521134295 + NumberFormat.GetHashCode();
            hashCode = hashCode * -1521134295 + Protection.GetHashCode();
            hashCode = hashCode * -1521134295 + (Name?.GetHashCode() ?? DefaultName.GetHashCode());
            return(hashCode);
        }
Exemple #13
0
 private Int32 computeHashCode()
 {
     return(Alignment.GetHashCode() ^
            getSingleArrayHashCode(CompoundArray) ^
            MiterLimit.GetHashCode() ^
            BackgroundBrush.GetHashCode() ^
            DashOffset.GetHashCode() ^
            getSingleArrayHashCode(DashPattern) ^
            getStyleBrushesArrayHashCode(DashBrushes) ^
            DashStyle.GetHashCode() ^
            StartCap.GetHashCode() ^
            EndCap.GetHashCode() ^
            DashCap.GetHashCode() ^
            LineJoin.GetHashCode() ^
            Transform.GetHashCode() ^
            Width.GetHashCode() ^
            -18133844);
 }
Exemple #14
0
 public override int GetHashCode()
 {
     return(Location.GetHashCode()
            ^ Alignment.GetHashCode()
            ^ TextRuns.GetHashCode());
 }
Exemple #15
0
 /// <summary>
 /// Returns the hash code for this instance.
 /// </summary>
 /// <returns>
 /// A 32-bit signed integer that is the hash code for this instance.
 /// </returns>
 public override int GetHashCode()
 {
     return(Width.GetHashCode() ^ Content.GetHashCode() ^ Alignment.GetHashCode() ^ WordWrappingMethod.GetHashCode());
 }
Exemple #16
0
 public override int GetHashCode()
 {
     return(Flags.GetHashCode().CombineHash(VAlign.GetHashCode(), HAlign.GetHashCode()));
 }
 public override int GetHashCode()
 {
     return(Alignment.GetHashCode());
 }