/// <summary>
        /// Checks whether the style has changes relative to the specified other style.
        /// </summary>
        /// <param name="other">The style to compare against.</param>
        /// <returns>True if the style has changes, false otherwise.</returns>
        public override bool IsChanged(ElementStyle other)
        {
            if (!(other is MouseSpeedIndicatorStyle msis))
            {
                return(true);
            }

            return(this.InnerColor.IsChanged(msis.InnerColor) ||
                   this.OuterColor.IsChanged(msis.OuterColor) ||
                   this.OutlineWidth != msis.OutlineWidth);
        }
Example #2
0
        /// <summary>
        /// Checks whether the style has changes relative to the specified other style.
        /// </summary>
        /// <param name="other">The style to compare against.</param>
        /// <returns>True if the style has changes, false otherwise.</returns>
        public override bool IsChanged(ElementStyle other)
        {
            if (!(other is DirectInputAxisStyle ks))
            {
                return(true);
            }

            if (this.SubStyle is null != ks.SubStyle is null)
            {
                return(true);
            }

            return(this.SubStyle?.IsChanged(ks.SubStyle) ?? false);
        }
Example #3
0
        /// <summary>
        /// Checks whether the style has changes relative to the specified other style.
        /// </summary>
        /// <param name="other">The style to compare against.</param>
        /// <returns>True if the style has changes, false otherwise.</returns>
        public override bool IsChanged(ElementStyle other)
        {
            if (!(other is KeyStyle ks))
            {
                return(true);
            }

            if (this.Loose is null != ks.Loose is null)
            {
                return(true);
            }
            if (this.Pressed is null != ks.Pressed is null)
            {
                return(true);
            }

            return((this.Loose?.IsChanged(ks.Loose) ?? false) || (this.Pressed?.IsChanged(ks.Pressed) ?? false));
        }
Example #4
0
 /// <summary>
 /// Checks whether the style has changes relative to the specified other style.
 /// </summary>
 /// <param name="other">The style to compare against.</param>
 /// <returns>True if the style has changes, false otherwise.</returns>
 public abstract bool IsChanged(ElementStyle other);