示例#1
0
        private ClassBreakRenderStruct ExportClassBreakRender(MapObjects2.ClassBreaksRenderer render)
        {
            ClassBreakRenderStruct oClassBreakRender = new ClassBreakRenderStruct();
            short iIndex = 0;

            oClassBreakRender.BreakCount     = render.BreakCount;
            oClassBreakRender.DrawBackground = render.DrawBackground;
            oClassBreakRender.Field          = render.Field;
            oClassBreakRender.SymbolType     = (short)render.SymbolType;
            oClassBreakRender.Tag            = render.Tag;

            double dBreak = render.get_Break(iIndex);

            while (dBreak != double.NaN)
            {
                oClassBreakRender.BreakList.Add(dBreak);

                iIndex++;
                dBreak = render.get_Break(iIndex);
            }

            oClassBreakRender.StartColor = System.Drawing.ColorTranslator.FromWin32((int)render.get_Symbol((short)0).Color);
            oClassBreakRender.EndColor   = System.Drawing.ColorTranslator.FromWin32((int)render.get_Symbol((short)(render.BreakCount - 1)).Color);

            return(oClassBreakRender);
        }
示例#2
0
 private void InitClassBreaksRenderLab(MapObjects2.ClassBreaksRenderer render)
 {
     this.cbbFields_ClassBreakRender.Text = render.Field;
     this.cbbNumber_ClassBreakRender.Text = render.BreakCount.ToString();
     this.pnlStartColor.BackColor         = Utilities.Converter.ConvertIntegerToSystemColor((int)render.get_Symbol(0).Color);
     this.pnlEndColor.BackColor           = Utilities.Converter.ConvertIntegerToSystemColor((int)render.get_Symbol((short)(render.BreakCount - 1)).Color);
 }