/// <summary> /// Adds the range. /// </summary> /// <param name="value">The value.</param> public void AddRange(LegendEntryCollection value) { for (int i = 0; (i < value.Count); i = (i + 1)) { Add(value[i]); } }
/// <summary> /// Initializes a new instance of the <see cref="Legend"/> class. /// </summary> /// <param name="width">The width.</param> /// <param name="height">The height.</param> public Legend(int width, int height) { Size size = new Size(width, height); this.size = size; legendEntryCollection = new LegendEntryCollection(); }
/// <summary> /// Gets the legend. /// </summary> /// <param name="size">The size.</param> /// <param name="entries">The entries.</param> /// <param name="columnCount">The column count.</param> /// <returns></returns> public static Image GetLegend(Size size, string[] entries, int columnCount) { rand = new Random(100); legend = SetUpLegend(size, columnCount); LegendEntryCollection lec = new LegendEntryCollection(); for (int i = 0; i < entries.Length; i++) { lec.Add(new LegendEntry(GetRandomColor(), entries[i])); } legend.LegendEntryCollection = lec; LegendRenderer lr = new LegendRenderer(); return(lr.DrawLegend(legend)); }
/// <summary> /// Initializes a new instance of the <see cref="LegendEntryCollection"/> class. /// </summary> /// <param name="value">The value.</param> public LegendEntryCollection(LegendEntryCollection value) { AddRange(value); }
/// <summary> /// Initializes a new instance of the <see cref="LegendEntryEnumerator"/> class. /// </summary> /// <param name="mappings">The mappings.</param> public LegendEntryEnumerator(LegendEntryCollection mappings) { temp = ((IEnumerable)(mappings)); baseEnumerator = temp.GetEnumerator(); }
/// <summary> /// Initializes a new instance of the <see cref="Legend"/> class. /// </summary> /// <param name="size">The size.</param> public Legend(Size size) { this.size = size; legendEntryCollection = new LegendEntryCollection(); }