Ejemplo n.º 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            //获取属性信息
            string       attribute    = textBox3.Text;
            GISAttribute oneattribute = new GISAttribute();

            oneattribute.AddValue(attribute);

            GISLine  oneline  = new GISLine(linevertexes); //创建line作为空间对象找到endnode作为属性绘制的位置
            Graphics graphics = this.CreateGraphics();

            oneattribute.draw(graphics, oneline.endNode(), 0);
        }
Ejemplo n.º 2
0
        private void button5_Click(object sender, EventArgs e)
        {
            //获取属性信息
            string       attribute    = textBox3.Text;
            GISAttribute oneattribute = new GISAttribute();

            oneattribute.AddValue(attribute);

            GISPolygon onepoly  = new GISPolygon(polyvertexes);
            Graphics   graphics = this.CreateGraphics();

            oneattribute.draw(graphics, onepoly.endNode(), 0);
        }
Ejemplo n.º 3
0
 public void draw(Graphics graphics, bool DrawAttributeOrNot, int index)
 //画空间与属性信息
 {
     spatialpart.draw(graphics);
     if (DrawAttributeOrNot)
     {
         /*
          * if (spatialpart is GISLine)
          *  attributepart.draw2(graphics, spatialpart.endNode(), index);
          * else if (spatialpart is GISPolygon)
          *  attributepart.draw3(graphics, spatialpart.endNode(), index);
          * else
          */
         attributepart.draw(graphics, spatialpart.endNode(), index);
     }
     //此处引用了attributed的方法
 }