Beispiel #1
0
 private void MinZoomTextChanged()
 {
     if (Regex.IsMatch(MinZoom.ToString(), "^[0-9]*$"))
     {
         this.MinSliderValue = MinZoom / tempZoom;
     }
 }
Beispiel #2
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         if (Visible != null)
         {
             hashCode = hashCode * 59 + Visible.GetHashCode();
         }
         if (SourceType != null)
         {
             hashCode = hashCode * 59 + SourceType.GetHashCode();
         }
         if (Source != null)
         {
             hashCode = hashCode * 59 + Source.GetHashCode();
         }
         if (SourceLayer != null)
         {
             hashCode = hashCode * 59 + SourceLayer.GetHashCode();
         }
         if (SourceAttribution != null)
         {
             hashCode = hashCode * 59 + SourceAttribution.GetHashCode();
         }
         if (Type != null)
         {
             hashCode = hashCode * 59 + Type.GetHashCode();
         }
         if (Coordinates != null)
         {
             hashCode = hashCode * 59 + Coordinates.GetHashCode();
         }
         if (Below != null)
         {
             hashCode = hashCode * 59 + Below.GetHashCode();
         }
         if (Color != null)
         {
             hashCode = hashCode * 59 + Color.GetHashCode();
         }
         if (Opacity != null)
         {
             hashCode = hashCode * 59 + Opacity.GetHashCode();
         }
         if (MinZoom != null)
         {
             hashCode = hashCode * 59 + MinZoom.GetHashCode();
         }
         if (MaxZoom != null)
         {
             hashCode = hashCode * 59 + MaxZoom.GetHashCode();
         }
         if (Circle != null)
         {
             hashCode = hashCode * 59 + Circle.GetHashCode();
         }
         if (Line != null)
         {
             hashCode = hashCode * 59 + Line.GetHashCode();
         }
         if (Fill != null)
         {
             hashCode = hashCode * 59 + Fill.GetHashCode();
         }
         if (Symbol != null)
         {
             hashCode = hashCode * 59 + Symbol.GetHashCode();
         }
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (TemplateItemName != null)
         {
             hashCode = hashCode * 59 + TemplateItemName.GetHashCode();
         }
         return(hashCode);
     }
 }
Beispiel #3
0
        /// <inheritdoc />
        public bool Equals([AllowNull] Layer other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Visible == other.Visible ||
                     Visible != null &&
                     Visible.Equals(other.Visible)
                     ) &&
                 (
                     SourceType == other.SourceType ||
                     SourceType != null &&
                     SourceType.Equals(other.SourceType)
                 ) &&
                 (
                     Source == other.Source ||
                     Source != null &&
                     Source.Equals(other.Source)
                 ) &&
                 (
                     SourceLayer == other.SourceLayer ||
                     SourceLayer != null &&
                     SourceLayer.Equals(other.SourceLayer)
                 ) &&
                 (
                     SourceAttribution == other.SourceAttribution ||
                     SourceAttribution != null &&
                     SourceAttribution.Equals(other.SourceAttribution)
                 ) &&
                 (
                     Type == other.Type ||
                     Type != null &&
                     Type.Equals(other.Type)
                 ) &&
                 (
                     Coordinates == other.Coordinates ||
                     Coordinates != null &&
                     Coordinates.Equals(other.Coordinates)
                 ) &&
                 (
                     Below == other.Below ||
                     Below != null &&
                     Below.Equals(other.Below)
                 ) &&
                 (
                     Color == other.Color ||
                     Color != null &&
                     Color.Equals(other.Color)
                 ) &&
                 (
                     Opacity == other.Opacity ||
                     Opacity != null &&
                     Opacity.Equals(other.Opacity)
                 ) &&
                 (
                     MinZoom == other.MinZoom ||
                     MinZoom != null &&
                     MinZoom.Equals(other.MinZoom)
                 ) &&
                 (
                     MaxZoom == other.MaxZoom ||
                     MaxZoom != null &&
                     MaxZoom.Equals(other.MaxZoom)
                 ) &&
                 (
                     Circle == other.Circle ||
                     Circle != null &&
                     Circle.Equals(other.Circle)
                 ) &&
                 (
                     Line == other.Line ||
                     Line != null &&
                     Line.Equals(other.Line)
                 ) &&
                 (
                     Fill == other.Fill ||
                     Fill != null &&
                     Fill.Equals(other.Fill)
                 ) &&
                 (
                     Symbol == other.Symbol ||
                     Symbol != null &&
                     Symbol.Equals(other.Symbol)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     TemplateItemName == other.TemplateItemName ||
                     TemplateItemName != null &&
                     TemplateItemName.Equals(other.TemplateItemName)
                 ));
        }