Exemplo n.º 1
0
        /// <inheritdoc />
        public bool Equals([AllowNull] NewShape other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Line == other.Line ||
                     Line != null &&
                     Line.Equals(other.Line)
                     ) &&
                 (
                     FillColor == other.FillColor ||
                     FillColor != null &&
                     FillColor.Equals(other.FillColor)
                 ) &&
                 (
                     FillRule == other.FillRule ||
                     FillRule != null &&
                     FillRule.Equals(other.FillRule)
                 ) &&
                 (
                     Opacity == other.Opacity ||
                     Opacity != null &&
                     Opacity.Equals(other.Opacity)
                 ) &&
                 (
                     Layer == other.Layer ||
                     Layer != null &&
                     Layer.Equals(other.Layer)
                 ) &&
                 (
                     DrawDirection == other.DrawDirection ||
                     DrawDirection != null &&
                     DrawDirection.Equals(other.DrawDirection)
                 ));
        }
Exemplo n.º 2
0
        /// <inheritdoc />
        public bool Equals([AllowNull] Shape other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Visible == other.Visible ||
                     Visible != null &&
                     Visible.Equals(other.Visible)
                     ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     Layer == other.Layer ||
                     Layer != null &&
                     Layer.Equals(other.Layer)
                 ) &&
                 (
                     XRef == other.XRef ||
                     XRef != null &&
                     XRef.Equals(other.XRef)
                 ) &&
                 (
                     XSizeMode == other.XSizeMode ||
                     XSizeMode != null &&
                     XSizeMode.Equals(other.XSizeMode)
                 ) &&
                 (
                     XAnchor == other.XAnchor ||
                     XAnchor != null &&
                     XAnchor.Equals(other.XAnchor)
                 ) &&
                 (
                     X0 == other.X0 ||
                     X0 != null &&
                     X0.Equals(other.X0)
                 ) &&
                 (
                     X1 == other.X1 ||
                     X1 != null &&
                     X1.Equals(other.X1)
                 ) &&
                 (
                     YRef == other.YRef ||
                     YRef != null &&
                     YRef.Equals(other.YRef)
                 ) &&
                 (
                     YSizeMode == other.YSizeMode ||
                     YSizeMode != null &&
                     YSizeMode.Equals(other.YSizeMode)
                 ) &&
                 (
                     YAnchor == other.YAnchor ||
                     YAnchor != null &&
                     YAnchor.Equals(other.YAnchor)
                 ) &&
                 (
                     Y0 == other.Y0 ||
                     Y0 != null &&
                     Y0.Equals(other.Y0)
                 ) &&
                 (
                     Y1 == other.Y1 ||
                     Y1 != null &&
                     Y1.Equals(other.Y1)
                 ) &&
                 (
                     Path == other.Path ||
                     Path != null &&
                     Path.Equals(other.Path)
                 ) &&
                 (
                     Opacity == other.Opacity ||
                     Opacity != null &&
                     Opacity.Equals(other.Opacity)
                 ) &&
                 (
                     Line == other.Line ||
                     Line != null &&
                     Line.Equals(other.Line)
                 ) &&
                 (
                     FillColor == other.FillColor ||
                     FillColor != null &&
                     FillColor.Equals(other.FillColor)
                 ) &&
                 (
                     FillRule == other.FillRule ||
                     FillRule != null &&
                     FillRule.Equals(other.FillRule)
                 ) &&
                 (
                     Editable == other.Editable ||
                     Editable != null &&
                     Editable.Equals(other.Editable)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     TemplateItemName == other.TemplateItemName ||
                     TemplateItemName != null &&
                     TemplateItemName.Equals(other.TemplateItemName)
                 ));
        }