private void OpenMxd_Click(object sender, ItemClickEventArgs e) { string mxdPath = FileUtils.SelectSingleFile("选择mxd文件", MapForm.MXDFilter); if (!MyUtils.Utils.IsStrNull(mxdPath)) { MapForm.GetInstance().LoadMXD(mxdPath); AddDocument(MapFormCustom.GetInstance()); } }
private void ArcgisTool_OpenMxd_Click(object sender, ItemClickEventArgs e) { //string mxdPath = FileUtils.SelectSingleFile("选择mxd文件", MapForm.MXDFilter); string mxdPath = @"D:\桌面\所有权测试数据及样本\高新测试.mxd"; if (!MyUtils.Utils.IsStrNull(mxdPath)) { MapForm.GetInstance().LoadMXD(mxdPath); AddDocument(MapFormCustom.GetInstance()); } }
/// <summary> /// 删除界址点 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DeleteJZD_Click(object sender, ItemClickEventArgs e) { AddDocument(MapFormCustom.GetInstance()); IList <JTSYQ> jtsyqs = GetSelectJTSYQS(); if (jtsyqs == null) { MessageBox.Show("你还没有选择要删除界址点的组"); } else { JTSYQController.DeleteJZD(jtsyqs); ArcGisUtils.axMapControl.ActiveView.Refresh(); } }
/// <summary> /// Excel 转 shp /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ExcelToMap_Click(object sender, ItemClickEventArgs e) { IList <string> paths = FileUtils.SelectExcelFiles(); if (MyUtils.Utils.CheckListExists(paths)) { MapFormCustom mapFormCustom = MapFormCustom.GetInstance(); ArcGisController arcGisController = new ArcGisController(MapForm.GetAxMapControl()); try { arcGisController.ExcelToShp(paths); } catch (Exception e1) { MessageBox.Show("表格有问题,请注意检查!!!"); } } }
/// <summary> /// 四至开始编辑 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SiZiStart_Click(object sender, ItemClickEventArgs e) { siZiFlag = !siZiFlag; BarButtonItem barButtonItem = sender as BarButtonItem; if (siZiFlag) { AddDocument(MapFormCustom.GetInstance()); MapForm.MapMouseDownFlag = 4; siZhiStr = barButtonItem.Content as string; barButtonItem.Content = "四至停止编辑"; } else { MapForm.MapMouseDownFlag = -1; barButtonItem.Content = siZhiStr; } }
private void CreateTuFuGuang_Click(object sender, ItemClickEventArgs e) { AddDocument(MapFormCustom.GetInstance()); createTuFuGuangFlag = !createTuFuGuangFlag; BarButtonItem barButtonItem = sender as BarButtonItem; if (createTuFuGuangFlag) { MapForm.MapMouseDownFlag = 3; createTuFuGuangStr = barButtonItem.Content as string; barButtonItem.Content = "停止生成"; } else { MapForm.MapMouseDownFlag = -1; barButtonItem.Content = createTuFuGuangStr; } }
private void OpenMxd2_Click(object sender, ItemClickEventArgs e) { //集体所有权添加行政代码view mapFormCustom = MapFormCustom.GetInstance(); //添加地图文档 AddDocument(mapFormCustom); MapTableCommand.dataPage = dataPage; MapTableCommand.tabbedGroup = tabbedGroup; MapTableCustom.SetPageSource(pageView); try { tvProperty.ItemsSource = JTSYQCustom.GetXZDMTree(); if (tvProperty.ItemsSource == null) { MessageBox.Show("请重新配置工程文件!!!"); return; } } catch (Exception e1) { MessageBox.Show("行政代码表有问题:" + e1.Message); } AddDocument(MapFormCustom.GetInstance()); UserControl map = mapFormCustom; int index; if (DocumentGroupTitleDic.TryGetValue(map.Uid as string, out index)) { documentGroup.SelectedTabIndex = index; } else { AddDocument(map); } }
private void FlushTuFu_Click(object sender, ItemClickEventArgs e) { AddDocument(MapFormCustom.GetInstance()); IList <JTSYQ> jtsyqs = GetSelectJTSYQS(); if (jtsyqs != null) { List <IFeature> list = new List <IFeature>(); foreach (JTSYQ jtsyq in jtsyqs) { foreach (JTSYQ child in jtsyq.GroupJTSYQ) { list.Add(child.Feature); } } TuFu.SetTuFu(ArcGisUtils.GetFeatureLayer("TuFu"), list); } else { MessageBox.Show("你没有选择行政区"); } }
private void DeleteTuFuKuang_Click(object sender, ItemClickEventArgs e) { AddDocument(MapFormCustom.GetInstance()); MapForm.DeleteTuFuKuang(); }
private void SaveMxd_Click(object sender, ItemClickEventArgs e) { AddDocument(MapFormCustom.GetInstance()); MapForm.MXDSave(); }