form1.cs

来自「C#语言编写的能够实现GIS简单功能的底层源代码」· CS 代码 · 共 54 行

CS
54
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace TestMapCsharp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            map.ServerIP = "127.0.0.1";
            map.UserName = "sa";
            map.PassWord = "1111";
            map.DataBase = "DT";
            map.ConnectSQL();
            map.DrawMap(3);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            map.Tool = "big";
        }

        private void button3_Click(object sender, EventArgs e)
        {
            map.Tool = "small";
        }

        private void button4_Click(object sender, EventArgs e)
        {
            map.Tool = "move";
        }

        private void button5_Click(object sender, EventArgs e)
        {
            map.Tool = "select";
        }

        private void map_SelectEvent(object sender, AxMapDataProj1.IMapDataEvents_SelectEvent e)
        {
            //选择事件
            this.label1.Text = "图元ID: " + e.featureID.ToString() + " 图元名称: " + e.featureName;
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?