/// <summary> /// Returns true if Address instances are equal /// </summary> /// <param name="input">Instance of Address to be compared</param> /// <returns>Boolean</returns> public bool Equals(Address input) { if (input == null) { return(false); } return (( LocationId == input.LocationId || (LocationId != null && LocationId.Equals(input.LocationId)) ) && ( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( Lon == input.Lon || (Lon != null && Lon.Equals(input.Lon)) ) && ( Lat == input.Lat || (Lat != null && Lat.Equals(input.Lat)) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Lat != null) { hashCode = hashCode * 59 + Lat.GetHashCode(); } if (Lon != null) { hashCode = hashCode * 59 + Lon.GetHashCode(); } if (Country != null) { hashCode = hashCode * 59 + Country.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if Thing instances are equal /// </summary> /// <param name="other">Instance of Thing to be compared</param> /// <returns>Boolean</returns> public bool Equals(FriendFinder other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( NickName == other.NickName || NickName != null && NickName.Equals(other.NickName) ) && ( Lat == other.Lat || Lat != null && Lat.Equals(other.Lat) ) && ( LastSeen == other.LastSeen || LastSeen != null && LastSeen.Equals(other.LastSeen) ) && ( Lon == other.Lon || Lon != null && Lon.Equals(other.Lon) )); }
/// <summary> /// Получить часть URL /// </summary> /// <returns></returns> public override string GetPartUrl() { string str = ""; str += Lon.ToString().Replace(',', '.') + ","; str += Lat.ToString().Replace(',', '.') + ","; str += "pm"; if (_metAB) { str += _ab.GetDescription(); } else { str += _color.GetDescription(); str += _size.GetDescription(); if (_content > 0) { str += _content.ToString().Replace(',', '.'); } } return(str); }
public Lon latlon(Lon model) { BusBLL busbl = new BusBLL(); busbl.changeBusLocation(2, Double.Parse(model.lat), Double.Parse(model.lon)); return(model); }
/// <inheritdoc /> public bool Equals([AllowNull] Rotation other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Lon == other.Lon || Lon != null && Lon.Equals(other.Lon) ) && ( Lat == other.Lat || Lat != null && Lat.Equals(other.Lat) ) && ( Roll == other.Roll || Roll != null && Roll.Equals(other.Roll) )); }
public override int GetHashCode() { unchecked { return((Lat.GetHashCode() * 397) ^ Lon.GetHashCode()); } }
/// <summary> /// Returns true if Address instances are equal /// </summary> /// <param name="other">Instance of Address to be compared</param> /// <returns>Boolean</returns> public bool Equals(Location other) { // credit: http://stackoverflow.com/a/10454552/677735 if (other == null) { return(false); } return (( LocationId == other.LocationId || LocationId != null && LocationId.Equals(other.LocationId) ) && ( Lon == other.Lon || Lon != null && Lon.Equals(other.Lon) ) && ( Lat == other.Lat || Lat != null && Lat.Equals(other.Lat) )); }
public void ToXml(XmlWriter writer) { writer.WriteStartElement("Plane"); writer.WriteElementString("Lon", Lon.ToString()); writer.WriteElementString("Lat", Lat.ToString()); writer.WriteElementString("Done", Done.ToString()); writer.WriteEndElement(); }
public override string ToString() { string specifier = "00.0000"; return(string.Format("{0}, {1}", Lat.ToString(specifier, CultureInfo.InvariantCulture), Lon.ToString(specifier, CultureInfo.InvariantCulture))); }
public string AsMessage(int distance) { return (String.Format( "P;{0:ddMMyyHHmmss};{1};{2};{3}", Date, Lat.ToString("0000.0000").Replace(',', '.'), Lon.ToString("00000.0000").Replace(',', '.'), distance)); }
/// <summary> /// Returns true if ThingsWithObservation instances are equal /// </summary> /// <param name="other">Instance of ThingsWithObservation to be compared</param> /// <returns>Boolean</returns> public bool Equals(ThingsWithObservation other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Description == other.Description || Description != null && Description.Equals(other.Description) ) && ( ThingTemplate == other.ThingTemplate || ThingTemplate != null && ThingTemplate.Equals(other.ThingTemplate) ) && ( Status == other.Status || Status != null && Status.Equals(other.Status) ) && ( Lat == other.Lat || Lat != null && Lat.Equals(other.Lat) ) && ( Lon == other.Lon || Lon != null && Lon.Equals(other.Lon) ) && ( Ogcid == other.Ogcid || Ogcid != null && Ogcid.Equals(other.Ogcid) ) && ( Observations == other.Observations || Observations != null && Observations.SequenceEqual(other.Observations) )); }
public override int GetHashCode() { var hashCode = 1248711632; hashCode = hashCode * -1521134295 + Lat.GetHashCode(); hashCode = hashCode * -1521134295 + Lon.GetHashCode(); hashCode = hashCode * -1521134295 + Alt.GetHashCode(); return(hashCode); }
public void ToXml(XmlWriter writer) { writer.WriteStartElement("Location"); writer.WriteElementString("Lon", Lon.ToString()); writer.WriteElementString("Lat", Lat.ToString()); writer.WriteElementString("Throttle", Throttle.ToString()); writer.WriteElementString("Rudder", Rudder.ToString()); writer.WriteEndElement(); }
/// <summary> /// Получить часть URL /// </summary> /// <returns></returns> public override string GetPartUrl() { string str = ""; str += Lon.ToString().Replace(',', '.') + ","; str += Lat.ToString().Replace(',', '.') + ","; str += "flag"; return(str); }
/// <summary> /// Получить часть URL /// </summary> /// <returns></returns> public override string GetPartUrl() { string str = ""; str += Lon.ToString().Replace(',', '.') + ","; str += Lat.ToString().Replace(',', '.') + ","; str += _mark.GetDescription(); return(str); }
public override int GetHashCode() { unchecked { int hashCode = Id.GetHashCode(); hashCode = (hashCode * 397) ^ Name?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ Lat.GetHashCode(); hashCode = (hashCode * 397) ^ Lon.GetHashCode(); hashCode = (hashCode * 397) ^ Type.GetHashCode(); return(hashCode); } }
/// <summary> /// Returns true if PersonWithWearable instances are equal /// </summary> /// <param name="other">Instance of PersonWithWearable to be compared</param> /// <returns>Boolean</returns> public bool Equals(PersonWithWearable other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( PersonId == other.PersonId || PersonId != null && PersonId.Equals(other.PersonId) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Status == other.Status || Status != null && Status.Equals(other.Status) ) && ( Role == other.Role || Role != null && Role.Equals(other.Role) ) && ( RoleDescription == other.RoleDescription || RoleDescription != null && RoleDescription.Equals(other.RoleDescription) ) && ( Lat == other.Lat || Lat != null && Lat.Equals(other.Lat) ) && ( Lon == other.Lon || Lon != null && Lon.Equals(other.Lon) ) && ( Timestamp == other.Timestamp || Timestamp != null && Timestamp.Equals(other.Timestamp) )); }
public const string SCENARIO_FILE = "~/App_Data/{0}.txt"; // The Path of the Secnario public void writeToFile() { string path = HttpContext.Current.Server.MapPath(String.Format(SCENARIO_FILE, FileName)); listen(); using (System.IO.StreamWriter file = new System.IO.StreamWriter(path, true)) { file.WriteLine(Lon.ToString()); file.WriteLine(Lat.ToString()); file.WriteLine(Throttle.ToString()); file.WriteLine(Rudder.ToString()); } }
/// <summary> /// this saves the info to the file. /// </summary> public void SaveToFile() { if (FileName != null) { string path = HttpContext.Current.Server.MapPath(String.Format(filePath, FileName)); string line = (Lat.ToString() + "," + Lon.ToString() + "," + Throttle.ToString() + "," + Rudder.ToString()); using (FileStream fs = new FileStream(path, FileMode.Append, FileAccess.Write)) using (StreamWriter sw = new StreamWriter(fs)) { sw.WriteLine(line); } } }
public override int GetHashCode() { unchecked { var hashCode = Name?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ StringId?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ Lat.GetHashCode(); hashCode = (hashCode * 397) ^ Lon.GetHashCode(); hashCode = (hashCode * 397) ^ (int)Type; hashCode = (hashCode * 397) ^ Confidence.GetHashCode(); return(hashCode); } }
public bool Equals([AllowNull] Center other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Lon == other.Lon && Lon != null && other.Lon != null && Lon.Equals(other.Lon)) && (Lat == other.Lat && Lat != null && other.Lat != null && Lat.Equals(other.Lat))); }
/// <summary> /// Returns true if Event instances are equal /// </summary> /// <param name="other">Instance of Event to be compared</param> /// <returns>Boolean</returns> public bool Equals(Event other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( City == other.City || City != null && City.Equals(other.City) ) && ( Lat == other.Lat || Lat != null && Lat.Equals(other.Lat) ) && ( Lon == other.Lon || Lon != null && Lon.Equals(other.Lon) ) && ( Zoom == other.Zoom || Zoom != null && Zoom.Equals(other.Zoom) ) && ( Start == other.Start || Start != null && Start.Equals(other.Start) ) && ( End == other.End || End != null && End.Equals(other.End) )); }
public int CompareTo(Waypoint other) { int x = ID.CompareTo(other.ID); if (x == 0) { int y = Lat.CompareTo(other.Lat); if (y == 0) { return(Lon.CompareTo(other.Lon)); } return(y); } return(x); }
/// <inheritdoc /> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; if (Lon != null) { hashCode = hashCode * 59 + Lon.GetHashCode(); } if (Lat != null) { hashCode = hashCode * 59 + Lat.GetHashCode(); } return(hashCode); } }
public override string ToString() { var sb = new StringBuilder(); sb.Append(Date.ToString("yyyyMMdd HH:00") + ","); sb.Append(Lat.ToString() + ","); sb.Append(Lon.ToString() + ","); sb.Append(SNOWDAS_SnowDepth_mm.ToString() + ","); sb.Append(SNOWDAS_SWE_mm.ToString() + ","); sb.Append(SNOWDAS_SnowmeltRunoff_micromm.ToString() + ","); sb.Append(SNOWDAS_Sublimation_micromm.ToString() + ","); sb.Append(SNOWDAS_SublimationBlowing_micromm.ToString() + ","); sb.Append(SNOWDAS_SolidPrecip_kgpersquarem.ToString() + ","); sb.Append(SNOWDAS_LiquidPrecip_kgpersquarem.ToString() + ","); sb.Append(SNOWDAS_SnowpackAveTemp_k.ToString()); return(sb.ToString()); }
public override string Serialize() { // Convert PBH values into MSFS format. double p = (double)Pitch / -360.0; if (p < 0) { p += 1.0; } p *= 1024.0; double b = (double)Bank / -360.0; if (b < 0) { b += 1.0; } b *= 1024.0; double h = (double)Heading / 360.0 * 1024.0; // Shift the values into a 32 bit integer. uint pbh = ((uint)p << 22) | ((uint)b << 12) | ((uint)h << 2); // Assemble the PDU. StringBuilder msg = new StringBuilder("@"); msg.Append(IsIdenting ? "Y" : (mIsSquawkingModeC ? "N" : "S")); msg.Append(DELIMITER); msg.Append(From); msg.Append(DELIMITER); msg.Append(SquawkCode.ToString("0000")); msg.Append(DELIMITER); msg.Append((int)Rating); msg.Append(DELIMITER); msg.Append(Lat.ToString("#0.0000000", CultureInfo.InvariantCulture)); msg.Append(DELIMITER); msg.Append(Lon.ToString("#0.0000000", CultureInfo.InvariantCulture)); msg.Append(DELIMITER); msg.Append(TrueAltitude); msg.Append(DELIMITER); msg.Append(GroundSpeed); msg.Append(DELIMITER); msg.Append(pbh); msg.Append(DELIMITER); msg.Append(PressureAltitude - TrueAltitude); return(msg.ToString()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Description != null) { hashCode = hashCode * 59 + Description.GetHashCode(); } if (ThingTemplate != null) { hashCode = hashCode * 59 + ThingTemplate.GetHashCode(); } if (Status != null) { hashCode = hashCode * 59 + Status.GetHashCode(); } if (Lat != null) { hashCode = hashCode * 59 + Lat.GetHashCode(); } if (Lon != null) { hashCode = hashCode * 59 + Lon.GetHashCode(); } if (Observations != null) { hashCode = hashCode * 59 + Observations.GetHashCode(); } if (Ogcid != null) { hashCode = hashCode * 59 + Ogcid.GetHashCode(); } return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Lon != 0D) { hash ^= Lon.GetHashCode(); } if (Lat != 0D) { hash ^= Lat.GetHashCode(); } if (Height != 0D) { hash ^= Height.GetHashCode(); } return(hash); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (PersonId != null) { hashCode = hashCode * 59 + PersonId.GetHashCode(); } if (Name != null) { hashCode = hashCode * 59 + Name.GetHashCode(); } if (Status != null) { hashCode = hashCode * 59 + Status.GetHashCode(); } if (Role != null) { hashCode = hashCode * 59 + Role.GetHashCode(); } if (RoleDescription != null) { hashCode = hashCode * 59 + RoleDescription.GetHashCode(); } if (Lat != null) { hashCode = hashCode * 59 + Lat.GetHashCode(); } if (Lon != null) { hashCode = hashCode * 59 + Lon.GetHashCode(); } if (Timestamp != null) { hashCode = hashCode * 59 + Timestamp.GetHashCode(); } return(hashCode); } }
public Lon latlon(Lon model) { BusBLL busbl = new BusBLL(); busbl.changeBusLocation(2,Double.Parse(model.lat),Double.Parse(model.lon)); return model; }