Esempio n. 1
0
        public static void AddData(AxPageLayoutControl pageLayoutControl)
        {
            ControlsAddDataCommand addDataCmd = new ControlsAddDataCommandClass();

            addDataCmd.OnCreate(pageLayoutControl.Object);
            addDataCmd.OnClick();
        }
Esempio n. 2
0
        /// <summary>
        /// 添加数据(调用AE添加数据命令)
        /// </summary>
        public void AddData()
        {
            var addDataCmd = new ControlsAddDataCommandClass();

            addDataCmd.OnCreate(MapControl.Object);
            addDataCmd.OnClick();
        }
Esempio n. 3
0
        //添加数据
        public static void AddData(AxMapControl mapControl)
        {
            ControlsAddDataCommand addDataCmd = new ControlsAddDataCommandClass();

            addDataCmd.OnCreate(mapControl.Object);
            addDataCmd.OnClick();
        }
Esempio n. 4
0
        /// <summary>
        /// 添加数据
        /// </summary>
        public void AddData()
        {
            ControlsAddDataCommandClass addDataCmd = new ControlsAddDataCommandClass();

            addDataCmd.OnCreate(AxMapControlMainMap.Object);
            addDataCmd.OnClick();
        }
Esempio n. 5
0
 /// <summary>
 /// 添加数据
 /// </summary>
 //添加图层
 public static void AddLayerToGlobe(AxGlobeControl _axGlobeControl)
 {
     ICommand pCommand;
     pCommand = new ControlsAddDataCommandClass();
     pCommand.OnCreate(_axGlobeControl.Object);
     pCommand.OnClick();
 }
Esempio n. 6
0
 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;
 }
Esempio n. 7
0
        private void button1_Click(object sender, EventArgs e)
        {
            ICommand pCommand = new ControlsAddDataCommandClass();

            pCommand.OnCreate(this.axMapControl1.Object);
            pCommand.OnClick();
        }
Esempio n. 8
0
        private void menuAddData_Click(object sender, EventArgs e)
        {
            ICommand cmd = new ControlsAddDataCommandClass();

            cmd.OnCreate(this.axMapControl1.Object);
            cmd.OnClick();
        }
Esempio n. 9
0
        private void btn_AddData_Click(object sender, EventArgs e)
        {
            ICommand cmd = new ControlsAddDataCommandClass();

            cmd.OnCreate(m_MapControl);
            cmd.OnClick();
        }
Esempio n. 10
0
        private void AddLayer()
        {
            var cmd = new ControlsAddDataCommandClass();

            cmd.OnCreate(this.axMapControl1.Object);
            cmd.OnClick();
        }
Esempio n. 11
0
        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();
            }
        }
Esempio n. 12
0
        //导入用地审批数据
        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;
            }
        }
Esempio n. 13
0
        private void btnAddLayer_Click(object sender, EventArgs e)
        {
            var cmd = new ControlsAddDataCommandClass();

            cmd.OnCreate(this.axMapControl1.Object);
            cmd.OnClick();
        }
Esempio n. 14
0
        //导入前时相卫片
        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;
            }
        }
Esempio n. 15
0
        //**添加图层**//
        private void TOC_AddLayer()
        {
            ICommand pCommand = new ControlsAddDataCommandClass();

            pCommand.OnCreate(this.m_pMapControl.Object);
            pCommand.OnClick();
        }
Esempio n. 16
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ICommand openfile = new ControlsAddDataCommandClass();

            openfile.OnCreate(axMapControl1.Object);
            openfile.OnClick();
        }
Esempio n. 17
0
        //导入监测图斑图层
        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;
            }
        }
Esempio n. 18
0
        private void AddDataItem_Click(object sender, EventArgs e)
        {
            ControlsAddDataCommand cmd = new ControlsAddDataCommandClass();

            cmd.OnCreate(this.axMapcontrol.GetOcx());
            cmd.OnClick();
        }
Esempio n. 19
0
 /// <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);
 }
Esempio n. 20
0
        private void 添加数据ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ICommand pAddData = new ControlsAddDataCommandClass();

            pAddData.OnCreate(axMapControl1.Object);
            pAddData.OnClick();
        }
Esempio n. 21
0
        /// <summary>
        /// 添加数据
        /// </summary>

        //添加图层
        public static void AddLayerToGlobe(AxGlobeControl _axGlobeControl)
        {
            ICommand pCommand;

            pCommand = new ControlsAddDataCommandClass();
            pCommand.OnCreate(_axGlobeControl.Object);
            pCommand.OnClick();
        }
Esempio n. 22
0
        /// <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();
        }
Esempio n. 23
0
        // ====== 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();
        }
Esempio n. 24
0
 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);
 }
Esempio n. 25
0
        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);
        }
Esempio n. 27
0
 /// <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();
 }
Esempio n. 28
0
        /// <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();
        }
Esempio n. 29
0
 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);
     }
 }
Esempio n. 30
0
 //添加图层
 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);
     }
 }
Esempio n. 31
0
        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();
        }
Esempio n. 32
0
        //导入后时相卫片
        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;
            }
        }
Esempio n. 33
0
        private void 命令方式ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ICommand pAddData = new ControlsAddDataCommandClass();

             pAddData.OnCreate(axMapControl1.Object);

             pAddData.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);
     } 
 }
Esempio n. 35
0
 void IGMap.AddData()
 {
     ICommand command = new ControlsAddDataCommandClass();
     command.OnCreate(this._hook);
     command.OnClick();
 }
Esempio n. 36
0
 //打开图层
 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();
 }
Esempio n. 37
0
        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();
            }
        }
Esempio n. 38
0
 /// <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();
 }