Ejemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (ToZone != null ? ToZone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FromZone != null ? FromZone.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ FromPosition.GetHashCode();
         hashCode = (hashCode * 397) ^ ToPosition.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// String representation of gcode line
 /// </summary>
 /// <returns></returns>
 public string ToString()
 {
     if (comment.Length > 0)
     {
         return("Comments:" + comment);
     }
     else
     {
         return("From:" + FromPosition.ToString() + " To:" + ToPosition.ToString() +
                "; Directory:" + this.xDir.ToString() + "," + this.yDir.ToString() + "," + this.zDir.ToString());
     }
 }
Ejemplo n.º 3
0
 public bool Equals(ZoneBoundary other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(ToZone == other.ToZone && FromZone == other.FromZone && FromPosition.Equals(other.FromPosition) &&
            ToPosition.Equals(other.ToPosition));
 }
Ejemplo n.º 4
0
 public override string ToString()
 {
     return(string.Format("{0}->{1},{2}", FromPosition.ToString(), ToPosition.ToString(), (DoTransform ? "@" : "-")));
 }