管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2024-11-07 5f80de49c4a00416591054180bf809a12a76d686
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
51
52
53
54
55
56
57
58
59
60
61
62
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", "加载shp", "读取shp", "按照属性显示", "按照属性设置颜色", "打开数据方案",
            "另存为", "选择对象", "导出模型", "刷新图层", "保存图层", "复制", "剪切", "删除",
            "粘贴至屏幕中心"
        };
 
        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);
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            this.win.DealOsgbLab();
        }
    }
}