管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-01-11 13c96f423a0c4a6a8033ba1730a57e7adaa738b8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
 
namespace TEWin
{
    public partial class FrmTool : Form
    {
        FrmWin win;
 
        List<string> codes = new List<string> { "重置鼠标", "打开方案", "保存方案", "矢量数据", "影像数据", "地形数据", "模型数据(osgb)", "模型数据(obj)", "编辑对象", "点量算", "坡向分析", "线量算", "面量算", "体量算", "角量算", "空间统计", "空间分析", "剖面分析", "坡度分析", "等值线", "剖切分析", "地理场景产品组装", "传统4D产品派生", "打开fly" };
 
        public FrmTool(FrmWin win)
        {
            this.win = win;
            InitializeComponent();
            this.Load += FrmTool_Load;
        }
 
        void FrmTool_Load(object sender, EventArgs e)
        {
            cbCode.DataSource = codes;
            cbCode.SelectedIndex = 0;
            this.cbCode.SelectedIndexChanged += cbCode_SelectedIndexChanged;
        }
 
        private void cbCode_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox cb = sender as ComboBox;
 
            int idx = cb.SelectedIndex;
            this.txtCode.Text = "0x" + (0xc0 + idx).ToString("X").ToLower();
        }
 
        private void btnTest_Click(object sender, EventArgs e)
        {
            string str = this.txtCode.Text.Trim().Replace("0x", "");
            if (string.IsNullOrWhiteSpace(str)) return;
 
 
            int code = Convert.ToInt32(str, 16);
            win.InvokeProc(code);
        }
    }
}