public static ChartValue ReadFrom(ArcXmlReader reader) { try { ChartValue chartValue = new ChartValue(); if (reader.HasAttributes) { while (reader.MoveToNextAttribute()) { string value = reader.ReadContentAsString(); if (value.Length > 0) { switch (reader.Name) { case "color": chartValue.Color = ColorConverter.ToColor(value); break; case "lookupfield": chartValue.LookUpField = value; break; case "lower": chartValue.Lower = Convert.ToInt32(value); break; case "upper": chartValue.Upper = Convert.ToInt32(value); break; case "value": chartValue.Value = Convert.ToInt32(value); break; } } } reader.MoveToElement(); } return(chartValue); } catch (Exception ex) { if (ex is ArcXmlException) { throw ex; } else { throw new ArcXmlException(String.Format("Could not read {0} element.", XmlName), ex); } } }
public object Clone() { ChartValue clone = (ChartValue)this.MemberwiseClone(); return(clone); }