Ejemplo n.º 1
0
 /// <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]);
     }
 }
Ejemplo n.º 2
0
        /// <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();
        }
Ejemplo n.º 3
0
        /// <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));
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LegendEntryCollection"/> class.
 /// </summary>
 /// <param name="value">The value.</param>
 public LegendEntryCollection(LegendEntryCollection value)
 {
     AddRange(value);
 }
Ejemplo n.º 5
0
 /// <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();
 }
Ejemplo n.º 6
0
 /// <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();
 }