Пример #1
0
        private void TSB_Reverse_Click(object sender, EventArgs e)
        {
            LegendScheme aLS = (LegendScheme)_legendScheme.Clone();
            int          aNum;

            if (_legendScheme.HasNoData)
            {
                aNum = _legendScheme.BreakNum - 1;
            }
            else
            {
                aNum = _legendScheme.BreakNum;
            }
            _legendScheme.LegendBreaks.Reverse(0, aNum);

            //switch (_legendScheme.ShapeType)
            //{
            //    case ShapeType.Point:
            //        PointBreak aPB = new PointBreak();
            //        PointBreak bPB = new PointBreak();
            //        for (int i = 0; i < aNum; i++)
            //        {
            //            if (i == aNum - i - 1)
            //            {
            //                continue;
            //            }
            //            else
            //            {
            //                aPB = (PointBreak)_legendScheme.LegendBreaks[i];
            //                bPB = (PointBreak)aLS.LegendBreaks[aNum - i - 1];
            //                aPB.color = bPB.color;
            //                aPB.drawFill = bPB.drawFill;
            //                aPB.drawOutline = bPB.drawOutline;
            //                aPB.drawPoint = bPB.drawPoint;
            //                aPB.isNoData = bPB.isNoData;
            //                aPB.outlineColor = bPB.outlineColor;
            //                aPB.size = bPB.size;
            //                aPB.style = bPB.style;
            //                _legendScheme.LegendBreaks[i] = aPB;
            //            }
            //        }
            //        break;
            //    case ShapeType.Polyline:
            //        PolyLineBreak aPLB = new PolyLineBreak();
            //        PolyLineBreak bPLB = new PolyLineBreak();
            //        for (int i = 0; i < aNum; i++)
            //        {
            //            if (i == aNum - i - 1)
            //            {
            //                continue;
            //            }
            //            else
            //            {
            //                aPLB = (PolyLineBreak)_legendScheme.LegendBreaks[i];
            //                bPLB = (PolyLineBreak)aLS.LegendBreaks[aNum - i - 1];
            //                aPLB.color = bPLB.color;
            //                aPLB.size = bPLB.size;
            //                aPLB.style = bPLB.style;
            //                aPLB.drawLine = bPLB.drawLine;
            //                _legendScheme.LegendBreaks[i] = aPLB;
            //            }
            //        }
            //        break;
            //    case ShapeType.Polygon:
            //        PolygonBreak aPGB = new PolygonBreak();
            //        PolygonBreak bPGB = new PolygonBreak();
            //        for (int i = 0; i < aNum; i++)
            //        {
            //            if (i == aNum - i - 1)
            //            {
            //                continue;
            //            }
            //            else
            //            {
            //                aPGB = (PolygonBreak)_legendScheme.LegendBreaks[i];
            //                bPGB = (PolygonBreak)aLS.LegendBreaks[aNum - i - 1];
            //                aPGB.color = bPGB.color;
            //                aPGB.drawFill = bPGB.drawFill;
            //                aPGB.drawOutline = bPGB.drawOutline;
            //                aPGB.drawPolygon = bPGB.drawPolygon;
            //                aPGB.outlineColor = bPGB.outlineColor;
            //                aPGB.outlineSize = bPGB.outlineSize;
            //                _legendScheme.LegendBreaks[i] = aPGB;
            //            }
            //        }
            //        break;
            //}


            legendView1.Update(_legendScheme);
        }
 /// <summary>
 /// Set legend scheme
 /// </summary>
 /// <param name="aLS"></param>
 public void SetLegendScheme(LegendScheme aLS)
 {
     _legendScheme = (LegendScheme)aLS.Clone();
 }
Пример #3
0
 /// <summary>
 /// Set legend scheme
 /// </summary>
 /// <param name="aLS"></param>
 public void SetLegendScheme(LegendScheme aLS)
 {
     _legendScheme            = (LegendScheme)aLS.Clone();
     legendView1.LegendScheme = _legendScheme;
 }