public static void AddData(AxPageLayoutControl pageLayoutControl) { ControlsAddDataCommand addDataCmd = new ControlsAddDataCommandClass(); addDataCmd.OnCreate(pageLayoutControl.Object); addDataCmd.OnClick(); }
/// <summary> /// 添加数据(调用AE添加数据命令) /// </summary> public void AddData() { var addDataCmd = new ControlsAddDataCommandClass(); addDataCmd.OnCreate(MapControl.Object); addDataCmd.OnClick(); }
//添加数据 public static void AddData(AxMapControl mapControl) { ControlsAddDataCommand addDataCmd = new ControlsAddDataCommandClass(); addDataCmd.OnCreate(mapControl.Object); addDataCmd.OnClick(); }
/// <summary> /// 添加数据 /// </summary> public void AddData() { ControlsAddDataCommandClass addDataCmd = new ControlsAddDataCommandClass(); addDataCmd.OnCreate(AxMapControlMainMap.Object); addDataCmd.OnClick(); }
/// <summary> /// 添加数据 /// </summary> //添加图层 public static void AddLayerToGlobe(AxGlobeControl _axGlobeControl) { ICommand pCommand; pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(_axGlobeControl.Object); pCommand.OnClick(); }
private void AddLayer_btn_Click(object sender, EventArgs e) { ESRI.ArcGIS.SystemUI.ICommand pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(this.axMapControl1.Object); pCommand.OnClick(); m_bDocModified = true; }
private void button1_Click(object sender, EventArgs e) { ICommand pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(this.axMapControl1.Object); pCommand.OnClick(); }
private void menuAddData_Click(object sender, EventArgs e) { ICommand cmd = new ControlsAddDataCommandClass(); cmd.OnCreate(this.axMapControl1.Object); cmd.OnClick(); }
private void btn_AddData_Click(object sender, EventArgs e) { ICommand cmd = new ControlsAddDataCommandClass(); cmd.OnCreate(m_MapControl); cmd.OnClick(); }
private void AddLayer() { var cmd = new ControlsAddDataCommandClass(); cmd.OnCreate(this.axMapControl1.Object); cmd.OnClick(); }
private void btnImport_Click(object sender, EventArgs e) { ESRI.ArcGIS.SystemUI.ICommand command = new ControlsAddDataCommandClass(); command.OnCreate(pMapControlSpacial); command.OnClick(); //在此添加空间参考的详细信息 if (pMapControlSpacial.Map != null) { for (int i = 0; i < pMapControlSpacial.Map.LayerCount; i++) { ILayer pLayer = pMapControlSpacial.Map.get_Layer(i); if (pLayer is IFeatureLayer) { IFeatureLayer pFeatureLayer = pLayer as IFeatureLayer; IGeoDataset pGeoDataset = pFeatureLayer as IGeoDataset; ISpatialReference pSpatialReference = pGeoDataset.SpatialReference; richTextReference.Text = ClsGDBDataCommon.GetReferenceString(pSpatialReference); pSpaReference = pSpatialReference; } if (pLayer is IRasterLayer) { IRasterLayer pRasterLayer = pLayer as IRasterLayer; IRaster pRaster = pRasterLayer.Raster; IRasterProps pRasterProps = pRaster as IRasterProps; ISpatialReference pSpatialReference = pRasterProps.SpatialReference; richTextReference.Text = ClsGDBDataCommon.GetReferenceString(pSpatialReference); pSpaReference = pSpatialReference; } } pMapControlSpacial.Map.ClearLayers(); } }
//导入用地审批数据 private void importYDSPData_Click(object sender, EventArgs e) { ICommand command = new ControlsAddDataCommandClass(); command.OnCreate(m_mapControl); command.OnClick(); int newAddedNum = m_mapControl.LayerCount - m_currentLayerNum; if (newAddedNum >= 1) { ILayer pLayer = null; //for (int i = 0; i < newAddedNum; i++) //{ // pLayer = m_mapControl.get_Layer(i); // pLayer.Name = "用地审批" + (m_ydspLayers.Count + 1).ToString(); // m_ydspLayers.Add(m_mapControl.get_Layer(i)); //} for (int i = 0, count = 0; i < m_mapControl.LayerCount && count < newAddedNum; i++) { pLayer = m_mapControl.get_Layer(i); if (pLayer.Name.ToString().ToUpper().Contains("SPSJ")) { pLayer.Name = "用地审批" + (m_ydspLayers.Count + 1).ToString(); m_ydspLayers.Add(pLayer); count++; } } pLayer = null; this.axTOCControl1.Update(); m_currentLayerNum = m_mapControl.LayerCount; } }
private void btnAddLayer_Click(object sender, EventArgs e) { var cmd = new ControlsAddDataCommandClass(); cmd.OnCreate(this.axMapControl1.Object); cmd.OnClick(); }
//导入前时相卫片 private void importPreImg_Click(object sender, EventArgs e) { ICommand command = new ControlsAddDataCommandClass(); command.OnCreate(m_mapControl); command.OnClick(); int newAddedNum = m_mapControl.LayerCount - m_currentLayerNum; if (newAddedNum >= 1) { ILayer pLayer = null; for (int i = 0; i < newAddedNum; i++) { pLayer = m_mapControl.get_Layer(i); pLayer.Name = "前时相卫片" + (m_preImgLayers.Count + 1).ToString(); m_preImgLayers.Add(pLayer); } //for (int i = 0, count = 0; i < m_mapControl.LayerCount && count < newAddedNum; i++) //{ // pLayer = m_mapControl.get_Layer(i); // if (pLayer.Name.ToString().ToUpper().Contains("JBNT")) // { // pLayer.Name = "前时相卫片" + (m_jbntLayers.Count + 1).ToString(); // m_jbntLayers.Add(pLayer); // count++; // } //} pLayer = null; this.axTOCControl1.Update(); m_currentLayerNum = m_mapControl.LayerCount; } }
//**添加图层**// private void TOC_AddLayer() { ICommand pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(this.m_pMapControl.Object); pCommand.OnClick(); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { ICommand openfile = new ControlsAddDataCommandClass(); openfile.OnCreate(axMapControl1.Object); openfile.OnClick(); }
//导入监测图斑图层 private void importMonitorShape_Click(object sender, EventArgs e) { ICommand command = new ControlsAddDataCommandClass(); command.OnCreate(m_mapControl); command.OnClick(); int newAddedNum = m_mapControl.LayerCount - m_currentLayerNum; if (newAddedNum >= 1) { ILayer pLayer = null; for (int i = 0, count = 0; i < m_mapControl.LayerCount && count < newAddedNum; i++) { pLayer = m_mapControl.get_Layer(i); if (pLayer.Name.ToString().ToUpper().Contains("JCTB")) { pLayer.Name = "监测图斑" + (m_monitorLayers.Count + 1).ToString(); m_monitorLayers.Add(pLayer); count++; } } pLayer = null; this.axTOCControl1.Update(); m_currentLayerNum = m_mapControl.LayerCount; } }
private void AddDataItem_Click(object sender, EventArgs e) { ControlsAddDataCommand cmd = new ControlsAddDataCommandClass(); cmd.OnCreate(this.axMapcontrol.GetOcx()); cmd.OnClick(); }
/// <summary> /// Occurs when this command is clicked /// </summary> public override void OnClick() { ESRI.ArcGIS.SystemUI.ICommand pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(m_AxMapControl.Object); pCommand.OnClick(); LayersCompose(m_AxMapControl); }
private void 添加数据ToolStripMenuItem_Click(object sender, EventArgs e) { ICommand pAddData = new ControlsAddDataCommandClass(); pAddData.OnCreate(axMapControl1.Object); pAddData.OnClick(); }
/// <summary> /// 添加图层 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addData_toolStripMenuItem_Click(object sender, EventArgs e) { ICommand addData = new ControlsAddDataCommandClass(); addData.OnCreate(m_mapControl.Object); m_mapControl.CurrentTool = addData as ITool; addData.OnClick(); }
// ====== File ====== /// <summary> /// 添加数据文件, *.shp or image data /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void iAddData_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { ICommand addData = new ControlsAddDataCommandClass(); addData.OnCreate(m_mapControl.Object); m_mapControl.CurrentTool = addData as ITool; addData.OnClick(); }
private void btnImport_Click(object sender, EventArgs e) { // ESRI.ArcGIS.SystemUI.ICommand command = new ControlsAddDataCommandClass(); command.OnCreate(m_mapControl); command.OnClick(); //更新图层列表 InitLayerReference(m_mapControl, cmbReference); }
public override void OnClick() { ILayer layer = (ILayer)m_mapControl.CustomProperty; //m_mapControl.Extent = layer.AreaOfInterest; ICommand pCommand; pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(m_mapControl.Object); pCommand.OnClick(); }
//添加数据 private void addToolStripMenuItem_Click(object sender, EventArgs e) { int currentLayerCount = this.axMapControl1.LayerCount; ICommand pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(this.axMapControl1.Object); pCommand.OnClick(); IMap pMap = this.axMapControl1.Map; this.m_controlsSynchronizer.ReplaceMap(pMap); }
/// <summary> /// 添加数据 /// </summary> public static void AddData(ESRI.ArcGIS.Controls.AxMapControl axMapControl) { if (axMapControl == null) { return; } ICommand pCommand; pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(axMapControl.Object); pCommand.OnClick(); }
private void DataAddItem_Click(object sender, EventArgs e) { try { ControlsAddDataCommand addData = new ControlsAddDataCommandClass(); addData.OnCreate(this.axMapcontrol.GetOcx()); addData.OnClick(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void Btn_AddData_Click(object sender, EventArgs e) { ICommand pCmd = new ControlsAddDataCommandClass(); switch (Ctrl_Tab.SelectedIndex) { case 0: pCmd.OnCreate(Ctrl_Map.Object); break; case 1: pCmd.OnCreate(Ctrl_PageLayout.Object); break; case 2: pCmd.OnCreate(Ctrl_Scene.Object); break; default: break; } pCmd.OnClick(); }
//添加图层 public static void AddLayerData(ESRI.ArcGIS.Controls.AxMapControl axMapControl) { if (axMapControl == null) { return; } try { ICommand pCommand; pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(axMapControl.Object); pCommand.OnClick(); } catch (Exception e) { MessageBox.Show(e.Message); } }
//导入后时相卫片 private void importPostImg_Click(object sender, EventArgs e) { ICommand command = new ControlsAddDataCommandClass(); command.OnCreate(m_mapControl); command.OnClick(); int newAddedNum = m_mapControl.LayerCount - m_currentLayerNum; if (newAddedNum >= 1) { ILayer pLayer = null; for (int i = 0; i < newAddedNum; i++) { pLayer = m_mapControl.get_Layer(i); pLayer.Name = "后时相卫片" + (m_postImgLayers.Count + 1).ToString(); m_postImgLayers.Add(pLayer); } pLayer = null; this.axTOCControl1.Update(); m_currentLayerNum = m_mapControl.LayerCount; } }
private void 命令方式ToolStripMenuItem_Click(object sender, EventArgs e) { ICommand pAddData = new ControlsAddDataCommandClass(); pAddData.OnCreate(axMapControl1.Object); pAddData.OnClick(); }
void IGMap.AddData() { ICommand command = new ControlsAddDataCommandClass(); command.OnCreate(this._hook); command.OnClick(); }
//打开图层 private void Add_Data_Click(object sender, EventArgs e) { int currentLayerCount = this.axMapControl1.LayerCount; ICommand pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(this.axMapControl1.Object); pCommand.OnClick(); }
private void btnAddData_Click(object sender, EventArgs e) { int currentLayerCount = this.mainMapControl.LayerCount; ICommand pCommand = new ControlsAddDataCommandClass(); pCommand.OnCreate(this.mainMapControl.Object); pCommand.OnClick(); IMap pMap = this.mainMapControl.Map; this.m_controlsSynchronizer.ReplaceMap(pMap); if (this.mainMapControl.LayerCount > currentLayerCount) { this.EagleaxMapControl.AddLayer(this.mainMapControl.get_Layer(0)); this.EagleaxMapControl.Extent = this.EagleaxMapControl.FullExtent; this.EagleaxMapControl.Refresh(); } }
/// <summary> /// Occurs when this command is clicked /// </summary> public override void OnClick() { ESRI.ArcGIS.Controls.ControlsAddDataCommand cmdAddData = new ControlsAddDataCommandClass(); cmdAddData.OnCreate(m_globeHookHelper.Hook); cmdAddData.OnClick(); }