public void Remove(LegendCellColumn column)
 {
     if (column != null)
     {
         base.List.Remove(column);
     }
 }
 public int Add(LegendCellColumn column)
 {
     return(base.List.Add(column));
 }
 public void Insert(int index, LegendCellColumn column)
 {
     base.List.Insert(index, column);
 }
        internal void AddAutomaticCells(Legend legend, SizeF singleWCharacterSize)
        {
            if (Cells.Count != 0)
            {
                return;
            }
            clearTempCells = true;
            int        num        = Cells.Add(LegendCellType.Symbol, string.Empty, ContentAlignment.MiddleCenter);
            LegendCell legendCell = Cells[num];

            if (ItemStyle == LegendItemStyle.Symbol)
            {
                if (Symbol.IsXamlMarker(MarkerStyle))
                {
                    RectangleF rectangleF = Symbol.CalculateXamlMarkerBounds(MarkerStyle, PointF.Empty, MarkerWidth, MarkerHeight);
                    Size       empty      = Size.Empty;
                    empty.Width           = (int)Math.Round(100f * rectangleF.Width / singleWCharacterSize.Width);
                    empty.Height          = (int)Math.Round(100f * rectangleF.Height / singleWCharacterSize.Height);
                    legendCell.SymbolSize = empty;
                }
                else
                {
                    int width  = (int)Math.Round(100f * MarkerWidth / singleWCharacterSize.Width);
                    int height = (int)Math.Round(100f * MarkerHeight / singleWCharacterSize.Height);
                    legendCell.SymbolSize = new Size(width, height);
                }
            }
            else if (ItemStyle == LegendItemStyle.Path)
            {
                float num2 = 100f * (float)PathWidth / singleWCharacterSize.Height;
                float num3 = 100f * (float)BorderWidth / singleWCharacterSize.Height;
                float num4 = 9.1f;
                if (PathLineStyle == MapDashStyle.Dash)
                {
                    num4 = 8.9f;
                }
                else if (PathLineStyle == MapDashStyle.DashDot)
                {
                    num4 = 11.5f;
                }
                else if (PathLineStyle == MapDashStyle.DashDotDot)
                {
                    num4 = 9.1f;
                }
                else if (PathLineStyle == MapDashStyle.Dot)
                {
                    num4 = 9.1f;
                }
                if (PathWidth == 1)
                {
                    num4 *= 3f;
                }
                else if (PathWidth == 2)
                {
                    num4 *= 2f;
                }
                else if (PathWidth == 3)
                {
                    num4 *= 1.5f;
                }
                int width2 = (int)Math.Round(num2 * num4);
                legendCell.SymbolSize = new Size(width2, (int)Math.Round(num2 + num3 * 2f));
            }
            if (num < legend.CellColumns.Count)
            {
                LegendCellColumn legendCellColumn = legend.CellColumns[num];
                legendCell.ToolTip        = legendCellColumn.ToolTip;
                legendCell.Href           = legendCellColumn.Href;
                legendCell.CellAttributes = legendCellColumn.CellColumnAttributes;
            }
            num        = Cells.Add(LegendCellType.Text, "#LEGENDTEXT", ContentAlignment.MiddleLeft);
            legendCell = Cells[num];
            if (num < legend.CellColumns.Count)
            {
                LegendCellColumn legendCellColumn2 = legend.CellColumns[num];
                legendCell.ToolTip        = legendCellColumn2.ToolTip;
                legendCell.Href           = legendCellColumn2.Href;
                legendCell.CellAttributes = legendCellColumn2.CellColumnAttributes;
            }
        }