public string GetImagePath(Framework.Data.ImageSize imageSize, Framework.Data.GeocacheType geocacheType) { string result; string fn; if (imageSize == Framework.Data.ImageSize.Map) { fn = string.Format("{0}.png", geocacheType.ID); } else { fn = string.Format("{0}.gif", geocacheType.ID); } result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "cachetypes", fn }); if (!File.Exists(result)) { if (imageSize != Framework.Data.ImageSize.Default) { result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "cachetypes", fn }); if (!File.Exists(result)) { result = null; } } else { result = null; } } return(result); }
public string GetDefaultImagePath(Framework.Data.ImageSize imageSize) { string result; result = Path.Combine(Path.Combine(_baseImagePath, imageSize.ToString()), DEFAULT_IMAGE); return(result); }
public string GetImagePath(Framework.Data.ImageSize imageSize, Framework.Data.GeocacheAttribute attr, Framework.Data.GeocacheAttribute.State state) { string result; string fn; string ext; if (attr.ID < 100) { ext = "gif"; } else { //above 100 = opencaching.de ext = "png"; } if (state == Framework.Data.GeocacheAttribute.State.Yes) { fn = string.Format("{0}.{1}", attr.ID, ext); } else if (state == Framework.Data.GeocacheAttribute.State.No) { fn = string.Format("_{0}.{1}", attr.ID, ext); } else { return(null); } result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "attributes", fn }); if (!File.Exists(result)) { if (imageSize != Framework.Data.ImageSize.Default) { result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "attributes", fn }); if (!File.Exists(result)) { result = null; } } else { result = null; } } return(result); }
public string GetImagePath(Framework.Data.ImageSize imageSize, Framework.Data.CompassDirection compassDir) { string result; string fn = string.Format("{0}.gif", compassDir.ToString()); result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "compass", fn }); if (!File.Exists(result)) { if (imageSize != Framework.Data.ImageSize.Default) { result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "compass", fn }); if (!File.Exists(result)) { result = null; } } else { result = null; } } return(result); }
public string GetImagePath(Framework.Data.ImageSize imageSize, Framework.Data.GeocacheContainer container) { string result; string fn; fn = string.Format("{0}.gif", container.Name.Replace(' ', '_')); result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "container", fn }); if (!File.Exists(result)) { if (imageSize != Framework.Data.ImageSize.Default) { result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "container", fn }); if (!File.Exists(result)) { result = null; } } else { result = null; } } return(result); }
public string GetImagePath(Framework.Data.ImageSize imageSize, Framework.Data.WaypointType waypointType) { string result; string fn; fn = string.Format("{0}.gif", waypointType.ID); result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "wptypes", fn }); if (!File.Exists(result)) { if (imageSize != Framework.Data.ImageSize.Default) { result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "wptypes", fn }); if (!File.Exists(result)) { result = null; } } else { result = null; } } return(result); }
public string GetImagePath(Framework.Data.ImageSize imageSize, Framework.Data.GeocacheType geocacheType, bool corrected) { string result; string fn; if (imageSize == Framework.Data.ImageSize.Map) { fn = string.Format("{1}{0}.png", geocacheType.ID, corrected ? "c" : ""); } else { fn = string.Format("{1}{0}.gif", geocacheType.ID, corrected ? "c" : ""); } result = Path.Combine(new string[] { _baseImagePath, imageSize.ToString(), "cachetypes", fn }); if (!File.Exists(result)) { result = GetImagePath(imageSize, geocacheType); } return(result); }