private string GetPostion(Geocache geocache) { double lat, lon; if (geocache.CustomLat != null) { lat = (double)geocache.CustomLat; } else { lat = (double)geocache.Lat; } if (geocache.CustomLon != null) { lon = (double)geocache.CustomLon; } else { lon = (double)geocache.Lon; } return Utils.Conversion.GetCoordinatesPresentation(lat, lon); }
public void UpdateFrom(Geocache gc, Version gpxDataVersion) { BeginUpdate(); if (this.Locked) { this.Available = gc.Available; this.Archived = gc.Archived; } else { this.Code = gc.Code; this.ID = gc.ID; this.DataFromDate = gc.DataFromDate; this.Lat = gc.Lat; this.Lon = gc.Lon; this.DistanceToCenter = gc.DistanceToCenter; this.AngleToCenter = gc.AngleToCenter; this.Available = gc.Available; this.Archived = gc.Archived; this.Country = gc.Country; this.State = gc.State; this.GeocacheType = gc.GeocacheType; this.Container = gc.Container; this.PublishedTime = gc.PublishedTime; this.Owner = gc.Owner; this.OwnerId = gc.OwnerId; this.Terrain = gc.Terrain; this.Difficulty = gc.Difficulty; this.ShortDescription = gc.ShortDescription; this.ShortDescriptionInHtml = gc.ShortDescriptionInHtml; this.LongDescription = gc.LongDescription; this.LongDescriptionInHtml = gc.LongDescriptionInHtml; this.EncodedHints = gc.EncodedHints; this.Title = gc.Title; this.Url = gc.Url; if (gpxDataVersion == null || gpxDataVersion >= V2) { this.AttributeIds = gc.AttributeIds; if (gpxDataVersion == null || gpxDataVersion >= V3) { this.MemberOnly = gc.MemberOnly; this.CustomCoords = gc.CustomCoords; this.Favorites = gc.Favorites; this.PersonaleNote = gc.PersonaleNote; if (gpxDataVersion == null) { this.Municipality = gc.Municipality; this.City = gc.City; this.CustomLat = gc.CustomLat; this.CustomLon = gc.CustomLon; this.Notes = gc.Notes; this.Flagged = gc.Flagged; this.Locked = gc.Locked; this.Found = gc.Found; this.Selected = gc.Selected; this.Saved = gc.Saved; } } } } EndUpdate(); }
public void UpdateFrom(Geocache gc, Version gpxDataVersion) { BeginUpdate(); if (this.Locked) { this.Available = gc.Available; this.Archived = gc.Archived; } else { this.Code = gc.Code; this.ID = gc.ID; this.DataFromDate = gc.DataFromDate; this.Lat = gc.Lat; this.Lon = gc.Lon; this.DistanceToCenter = gc.DistanceToCenter; this.AngleToCenter = gc.AngleToCenter; this.Available = gc.Available; this.Archived = gc.Archived; this.Country = gc.Country; this.State = gc.State; this.GeocacheType = gc.GeocacheType; this.Container = gc.Container; this.PublishedTime = gc.PublishedTime; this.Owner = gc.Owner; this.OwnerId = gc.OwnerId; this.Terrain = gc.Terrain; this.Difficulty = gc.Difficulty; this.ShortDescription = gc._shortDescription; this.ShortDescriptionInHtml = gc._shortDescriptionInHtml; this.LongDescription = gc._longDescription; this.LongDescriptionInHtml = gc._longDescriptionInHtml; this.EncodedHints = gc.EncodedHints; this.Title = gc.Title; this.Url = gc.Url; if (gpxDataVersion == null || gpxDataVersion >= V2) { this.AttributeIds = gc.AttributeIds; if (gpxDataVersion == null || gpxDataVersion >= V3) { this.MemberOnly = gc.MemberOnly; this.CustomCoords = gc.CustomCoords; this.Favorites = gc.Favorites; this.PersonaleNote = gc.PersonaleNote; if (gpxDataVersion == null) { this.Municipality = gc.Municipality; this.City = gc.City; this.CustomLat = gc.CustomLat; this.CustomLon = gc.CustomLon; this.Notes = gc.Notes; this.Flagged = gc.Flagged; this.Locked = gc.Locked; this.Found = gc.Found; this.Selected = gc.Selected; this.Saved = gc.Saved; } } } } EndUpdate(); }