📄 mainform.cs
字号:
case (int)enum_option_track.query : //钻孔查询
{
SuperMapLib.soGeometry myGeo;
myGeo = this.axSuperMap2.TrackedGeometry;
SuperMapLib.soRecordset myRecord = map_query_kong(myGeo);
fill_map_list_kong(myRecord);
break;
}
case (int)enum_option_track.add_point:
{
SuperMapLib.soGeometry myGeo;
myGeo = this.axSuperMap2.TrackedGeometry;
ZKAdd addf = new ZKAdd(myGeo.CentroidPoint.x,myGeo.CentroidPoint.y,true);
addf.Send+= new MKIms3.ZKAdd.SendMess(myadd_Send);
addf.ShowDialog();
break;
}
case (int)enum_option_track.other_query:
{
//这里进行空间查询
SuperMapLib.soGeometry myGeo;
myGeo = this.axSuperMap2.TrackedGeometry; //得到了查询的对象
fill_listview(getRecotd(get_lay(),myGeo));
break;
}
}
}
private void listView_re_kong_DoubleClick(object sender, System.EventArgs e)
{
if(this.listView_re_kong.SelectedItems.Count>0)
{
//开始闪烁。
string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
flash_Geo = re_kong_flash(k_id);
if(flash_Geo!=null)
{
if(flash_Geo.Dimension!=0)
{
this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.5); //居中现实
this.axSuperMap2.CtlRefresh();
}
else
{
this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,0.02);
this.axSuperMap2.CtlRefresh();
}
this.timer_flash_kong.Start();
}
}
}
private void menu_k_position_Click(object sender, System.EventArgs e)
{
if(this.listView_re_kong.SelectedItems.Count>0)
{
//开始闪烁。
string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
flash_Geo = re_kong_flash(k_id);
if(flash_Geo!=null)
{
if(flash_Geo.Dimension!=0)
{
this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,1.5); //居中现实
this.axSuperMap2.CtlRefresh();
}
else
{
this.axSuperMap2.EnsureVisibleGeometry(flash_Geo,0.02);
this.axSuperMap2.CtlRefresh();
}
this.timer_flash_kong.Start();
}
}
}
private void listView_re_map_DoubleClick(object sender, System.EventArgs e)
{
if(this.listView_re_map.SelectedItems.Count>0)
{
string mapname = this.listView_re_map.SelectedItems[0].Text.Trim().ToString();
openmap(mapname);
}
}
private void menu_m_open_Click(object sender, System.EventArgs e)
{
if(this.listView_re_map.SelectedItems.Count>0)
{
string mapname = this.listView_re_map.SelectedItems[0].Text.Trim().ToString();
this.Cursor = Cursors.WaitCursor;
openmap(mapname);
this.Cursor = Cursors.Default;
}
}
private void menu_k_info_Click(object sender, System.EventArgs e)
{
if(this.listView_re_kong.SelectedItems.Count>0)
{
string k_id = this.listView_re_kong.SelectedItems[0].Text.Trim().ToString();
this.Cursor = Cursors.WaitCursor;
ZKShow myK = new ZKShow(k_id);
myK.ShowDialog();
this.Cursor = Cursors.Default;
}
}
private void axSuperMap2_AfterMapDraw(object sender, AxSuperMapLib._DSuperMapEvents_AfterMapDrawEvent e)
{
min_view();
}
private void axSuperMap1_MouseDownEvent(object sender, AxSuperMapLib._DSuperMapEvents_MouseDownEvent e)
{
main_view_change(e);
}
private void btn_query_Click(object sender, System.EventArgs e)
{
//清除地图列表
this.listView_re_map.Items.Clear();
string k_id = this.txt_k_id.Text.Trim();
if(k_id.Length>0)
{
this.Cursor = Cursors.WaitCursor;
fill_DB_list_kong( k_id);
this.Cursor = Cursors.Default;
}
else
{
MessageBox.Show("钻孔编号不能为空","错误信息",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
}
private void menu_kong_query_Click(object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
ZKView k_view = new ZKView();
k_view.ShowDialog();
this.Cursor = Cursors.Default;
}
private void menu_data_out_Click(object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
KDataOut myout = new KDataOut();
myout.ShowDialog();
this.Cursor = Cursors.Default;
}
private void menu_pwd_change_Click(object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
pwd mypwd = new pwd();
mypwd.ShowDialog();
this.Cursor = Cursors.Default;
}
private void menuCommand_k_addDATA_Click(object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
if(this.mapname!="某某矿地形地质图")
{
DialogResult br = MessageBox.Show("当前地图不是默认地图,系统将打开默认地图对其进行钻孔添加!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information);
if(br==DialogResult.OK)
{
//先打开这个地图
this.openmap("某某矿地形地质图");
ZKAdd myadd = new ZKAdd(0,0,false);
myadd.Send +=new MKIms3.ZKAdd.SendMess(myadd_Send);
myadd.ShowDialog();
}
}
else
{
ZKAdd myadd = new ZKAdd(0,0,false);
myadd.Send +=new MKIms3.ZKAdd.SendMess(myadd_Send);
myadd.ShowDialog();
}
this.Cursor = Cursors.Default;
}
private void menuCommand_k_addMAP_Click(object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
if(this.mapname!="某某矿地形地质图")
{
DialogResult br = MessageBox.Show("当前地图不是默认地图,系统将打开默认地图对其进行钻孔添加!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information);
if(br==DialogResult.OK)
{
//先打开这个地图
this.openmap("某某矿地形地质图");
this.axSuperMap2.Action = SuperMapLib.seAction.scaTrackPoint;
this.option_track = (int)enum_option_track.add_point;
}
}
else
{
this.axSuperMap2.Action = SuperMapLib.seAction.scaTrackPoint;
this.option_track = (int)enum_option_track.add_point;
}
this.Cursor = Cursors.Default;
}
private void menu_k_del_Click(object sender, System.EventArgs e)
{
if(this.mapname!="某某矿地形地质图")
{
DialogResult br = MessageBox.Show("当前地图不是默认地图,系统将打开默认地图对其进行钻孔信息删除。\n\n此操作将不可恢复,您确认进行该删除操作?!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Warning);
if(br ==DialogResult.OK)
{
if(this.listView_re_kong.SelectedItems.Count>0)
{
string kk_id = this.listView_re_kong.SelectedItems[0].Text.Trim();
if(kong_map_dell(kk_id) && kong_DB_dell(kk_id))
{
MessageBox.Show("成功删除该钻孔信息","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
}
}
}
else
{
DialogResult br = MessageBox.Show("系统将完全删除有关此钻孔的所有信息。\n\n此操作将不可恢复,您确认进行该删除操作?!","系统提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Warning);
if(br ==DialogResult.OK)
{
if(this.listView_re_kong.SelectedItems.Count>0)
{
string kk_id = this.listView_re_kong.SelectedItems[0].Text.Trim();
if(kong_map_dell(kk_id) && kong_DB_dell(kk_id))
{
MessageBox.Show("成功删除该钻孔信息","提示信息",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
}
}
}
this.axSuperMap2.CtlRefresh();
}
private void menu_user_manage_Click(object sender, System.EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
UserManage usermangage = new UserManage();
usermangage.ShowDialog();
this.Cursor = Cursors.Default;
}
private void axSuperWkspManager1_LDbClick(object sender, AxSuperWkspManagerLib._DSuperWkspManagerEvents_LDbClickEvent e)
{
switch(e.nFlag)
{
case SuperWkspManagerLib.seSelectedItemFlag.scsDataset:
this.data_map_name = e.strParent;
dataout(this.data_map_name);
break;
case SuperWkspManagerLib.seSelectedItemFlag.scsDatasource:
this.data_map_name = e.strSelected;
dataout(this.data_map_name);
break;
case SuperWkspManagerLib.seSelectedItemFlag.scsMap:
this.mapname = e.strSelected;
openmap(this.mapname);
break;
}
}
private void buttonCommand_null_Click(object sender, System.EventArgs e)
{
this.axSuperMap2.Action = SuperMapLib.seAction.scaNull;
this.timer_flash_kong.Stop();
this.axSuperMap2.Trac
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -