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);
|
}
|
}
|
}
|