public bool AddMark(LegendIcon icon, LegendColor color, string text, DateTime timestamp, string prefix = default(string), bool isPublic = true, int quantity = -1, bool displaySeason = true, bool displayTimestamp = true) { var newMark = new LegendMark(icon, color, text, timestamp, prefix, isPublic, quantity, displaySeason, displayTimestamp); return(_addLegendMark(newMark)); }
public bool AddMark(LegendIcon icon, LegendColor color, string text, DateTime created, string prefix = default(string), bool isPublic = true, int quantity = 0) { var newMark = new LegendMark(icon, color, text, created, prefix, isPublic, quantity); return(_addLegendMark(newMark)); }
private static WmsLayerInfo ReadLayer(XElement xlayer) { var layer = new WmsLayerInfo(); layer.IsQueryable = xlayer.Attribute("queryable") != null ? xlayer.Attribute("queryable").Value == "1" : false; layer.Name = xlayer.Element("Name") != null ? xlayer.Element("Name").Value : ""; layer.Title = xlayer.Element("Title") != null ? xlayer.Element("Title").Value : ""; layer.Comments = xlayer.Element("Abstract") != null ? xlayer.Element("Abstract").Value : ""; //LatLonBoundingBox is specific for WMS 1.1.1 servers if (xlayer.Element("LatLonBoundingBox") != null) layer.LatLonBoundingBox = ParseElementAsExtent(xlayer.Element("LatLonBoundingBox")); if (xlayer.Element("BoundingBox") != null) layer.BoundingBox = ParseElementAsExtent(xlayer.Element("BoundingBox")); var xstyles = xlayer.Descendants("Style"); foreach (XElement xstyle in xstyles) { var ls = new LegendIcon(); if (xstyle.Element("LegendURL") != null) { ls.Width = Convert.ToInt32(xstyle.Element("LegendURL").Attribute("width").Value); ls.Height = Convert.ToInt32(xstyle.Element("LegendURL").Attribute("height").Value); ls.SymbolUri = xstyle.Element("LegendURL").Element("OnlineResource").Attribute(xlink + "href").Value; } ls.Name = xstyle.Element("Name").Value; layer.Symbols.Add(ls); } return layer; }
public LegendMark(LegendIcon icon, LegendColor color, string text, DateTime created, string prefix = default(string), bool isPublic = true, int quantity = 0) { Icon = icon; Color = color; Text = text; Public = isPublic; Quantity = quantity; Prefix = prefix; Created = created; }
public bool AddLegendMark(LegendIcon icon, LegendColor color, string text, DateTime created, string prefix = default(string), bool isPublic = true, int quantity = 0) { try { return(User.Legend.AddMark(icon, color, text, created, prefix, isPublic, quantity)); } catch (ArgumentException) { Logger.ErrorFormat("Legend mark: {0}: duplicate prefix {1}", User.Name, prefix); } return(false); }
public LegendMark(LegendIcon icon, LegendColor color, string text, DateTime timestamp, string prefix = default(string), bool isPublic = true, int quantity = -1, bool displaySeason = true, bool displayTimestamp = true) { Icon = icon; Color = color; Text = text; Public = isPublic; Quantity = quantity; Prefix = prefix; Timestamp = timestamp; Created = DateTime.Now; LastUpdated = DateTime.Now; DisplaySeason = displaySeason; DisplayTimestamp = displayTimestamp; }
public bool AddLegendMark(LegendIcon icon, LegendColor color, string text, string prefix = default(string), bool isPublic = true, int quantity = 0) { return(AddLegendMark(icon, color, text, DateTime.Now, prefix, isPublic, quantity)); }
internal Image GetIcon(LegendIcon icon) { return(Legend.Icons.GetIcon(icon)); }
internal static Image GetIcon(this ImageList imageList, LegendIcon icon) { return(imageList.Images[(int)icon]); }