Ejemplo n.º 1
0
        private void btn_render_Click(object sender, EventArgs e)
        {
            //xr_wy();
            //Console.WriteLine();
            ////不带文件后缀的文件名
            //C_S_R.easy_xrender(cmb_xuanran.SelectedItem.ToString(), csr.getRGB(220, 220, 220), csr.getRGB(135, 206, 235));
            C_S_R  csr      = new C_S_R(mapControl);
            render render_r = new render(map_layer, csr);

            render_r.Show();
        }
Ejemplo n.º 2
0
 public render(List <string> map_layer, C_S_R csr)
 {
     InitializeComponent();
     init();
     foreach (string s in map_layer)
     {
         int i = map_layer.IndexOf(s);//i就是下标
         listBox_layer.Items.Add(s);
     }
     this.csr = csr;
 }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            r = int.Parse(textBox_r.Text);
            g = int.Parse(textBox_g.Text);
            b = int.Parse(textBox_b.Text);

            rl = int.Parse(textBox_lr.Text);
            gl = int.Parse(textBox_lg.Text);
            bl = int.Parse(textBox_lb.Text);

            width = int.Parse(textBox_width.Text);
            if (listBox_layer.SelectedItem == null)
            {
                MessageBox.Show("请选择要渲染的Layer");
                return;
            }
            //创建实例!!!!

            radioButton_choose();
            switch (plp_type)
            {
            //点
            case "point":
            {
                C_S_R.easy_point(listBox_layer.SelectedItem.ToString(), rgb_choose(r, g, b), width_choose());
                break;
            }

            case "line":
            {
                C_S_R.easy_line(listBox_layer.SelectedItem.ToString(), rgb_choose(r, g, b), width_choose());
                break;
            }

            case "fill":
            {
                C_S_R.easy_xrender(listBox_layer.SelectedItem.ToString(), rgb_choose(r, g, b), rgb_choose(rl, gl, bl), width_choose());
                break;
            }

            default: MessageBox.Show("类型不能为空");
                break;
            }
            MessageBox.Show("结束");
        }
Ejemplo n.º 4
0
        public void add_rr()
        {
            ITextElement textElement;
            ITextSymbol  textSymbol;
            IColor       color;

            activeView = pageLayoutControl.PageLayout as IActiveView;
            envelope   = new Envelope() as IEnvelope;
            envelope.PutCoords(7, 20, 15, 30);
            textElement        = new TextElement() as ITextElement;
            element            = textElement as IElement;
            element.Geometry   = envelope;
            textElement.Text   = "实验五地图";
            textSymbol         = new TextSymbol();
            color              = C_S_R.getRGB(0, 0, 0);
            textSymbol.Color   = color;
            textSymbol.Size    = 30;
            textElement.Symbol = textSymbol;
            graphicsContainer  = activeView as IGraphicsContainer;
            graphicsContainer.AddElement(element, 0);
        }
Ejemplo n.º 5
0
        public void xr_wy()
        {
            C_S_R     csr       = new C_S_R(mapControl);
            ILayer    player    = C_S_R.getGeoLayer("Export_Output");
            IRgbColor prgbcolor = C_S_R.getRGB(255, 0, 0);
            ISymbol   psymbol   = C_S_R.GetSymbolFromLayer(player);
            IColor    pcolor    = prgbcolor as IColor;

            bool bres = C_S_R.RenderSimply(player, pcolor);

            if (bres)
            {
                mapControl.ActiveView.ContentsChanged();
                mapControl.ActiveView.Refresh();
                btn_render.Enabled = false;
            }
            else
            {
                MessageBox.Show("渲染失败");
            }
        }
Ejemplo n.º 6
0
 private IRgbColor rgb_choose(int R, int G, int B)
 {
     return(C_S_R.getRGB(R, G, B));
 }