コード例 #1
0
 public void Remove(LegendCellColumn column)
 {
     if (column != null)
     {
         base.List.Remove(column);
     }
 }
コード例 #2
0
 public int Add(LegendCellColumn column)
 {
     return(base.List.Add(column));
 }
コード例 #3
0
 public void Insert(int index, LegendCellColumn column)
 {
     base.List.Insert(index, column);
 }
コード例 #4
0
 public void AddAutomaticCells(Legend legend, SizeF singleWCharacterSize)
 {
     if (this.Cells.Count == 0)
     {
         this.clearTempCells = true;
         int        num        = this.Cells.Add(LegendCellType.Symbol, string.Empty, ContentAlignment.MiddleCenter);
         LegendCell legendCell = this.Cells[num];
         if (this.ItemStyle == LegendItemStyle.Symbol)
         {
             if (Symbol.IsXamlMarker(this.MarkerStyle))
             {
                 RectangleF rectangleF = Symbol.CalculateXamlMarkerBounds(this.MarkerStyle, PointF.Empty, this.MarkerWidth, this.MarkerHeight);
                 Size       empty      = Size.Empty;
                 empty.Width           = (int)Math.Round(100.0 * rectangleF.Width / singleWCharacterSize.Width);
                 empty.Height          = (int)Math.Round(100.0 * rectangleF.Height / singleWCharacterSize.Height);
                 legendCell.SymbolSize = empty;
             }
             else
             {
                 int width  = (int)Math.Round(100.0 * this.MarkerWidth / singleWCharacterSize.Width);
                 int height = (int)Math.Round(100.0 * this.MarkerHeight / singleWCharacterSize.Height);
                 legendCell.SymbolSize = new Size(width, height);
             }
         }
         else if (this.ItemStyle == LegendItemStyle.Path)
         {
             float num2 = (float)(100.0 * (float)this.PathWidth / singleWCharacterSize.Height);
             float num3 = (float)(100.0 * (float)this.BorderWidth / singleWCharacterSize.Height);
             float num4 = 9.1f;
             if (this.PathLineStyle == MapDashStyle.Dash)
             {
                 num4 = 8.9f;
             }
             else if (this.PathLineStyle == MapDashStyle.DashDot)
             {
                 num4 = 11.5f;
             }
             else if (this.PathLineStyle == MapDashStyle.DashDotDot)
             {
                 num4 = 9.1f;
             }
             else if (this.PathLineStyle == MapDashStyle.Dot)
             {
                 num4 = 9.1f;
             }
             if (this.PathWidth == 1)
             {
                 num4 = (float)(num4 * 3.0);
             }
             else if (this.PathWidth == 2)
             {
                 num4 = (float)(num4 * 2.0);
             }
             else if (this.PathWidth == 3)
             {
                 num4 = (float)(num4 * 1.5);
             }
             int width2 = (int)Math.Round((double)(num2 * num4));
             legendCell.SymbolSize = new Size(width2, (int)Math.Round(num2 + num3 * 2.0));
         }
         if (num < legend.CellColumns.Count)
         {
             LegendCellColumn legendCellColumn = legend.CellColumns[num];
             legendCell.ToolTip        = legendCellColumn.ToolTip;
             legendCell.Href           = legendCellColumn.Href;
             legendCell.CellAttributes = legendCellColumn.CellColumnAttributes;
         }
         num        = this.Cells.Add(LegendCellType.Text, "#LEGENDTEXT", ContentAlignment.MiddleLeft);
         legendCell = this.Cells[num];
         if (num < legend.CellColumns.Count)
         {
             LegendCellColumn legendCellColumn2 = legend.CellColumns[num];
             legendCell.ToolTip        = legendCellColumn2.ToolTip;
             legendCell.Href           = legendCellColumn2.Href;
             legendCell.CellAttributes = legendCellColumn2.CellColumnAttributes;
         }
     }
 }