示例#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);
     }
 }
示例#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());
     }
 }
示例#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));
 }
示例#4
0
 public override string ToString()
 {
     return(string.Format("{0}->{1},{2}", FromPosition.ToString(), ToPosition.ToString(), (DoTransform ? "@" : "-")));
 }