⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.cs

📁 C#语言编写的能够实现GIS简单功能的底层源代码
💻 CS
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -