Пример #1
0
        private void 属性编辑ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmAttribute frmPopup = new frmAttribute();

            m_featureCollection.Clear();
            if (m_pCurFeature != null)
            {
                m_featureCollection.Add(m_pCurFeature);
                frmPopup.m_featureCollection = m_featureCollection;
                frmPopup.ShowDialog();
            }
        }
Пример #2
0
 private void 属性管理ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (m_SelLayer != null)
     {
         switch (m_SelLayer.Name)
         {
         case "工程项目":
             frmAttribute frmPopup = new frmAttribute();
             frmPopup.ShowDialog();
             break;
         }
     }
 }
Пример #3
0
 private void backgroundWorker2_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     m_Popfrm.Close();
     m_Popfrm = null;
     System.Windows.Forms.Application.DoEvents();
     MessageBox.Show("数据上传完毕!填写属性!\n", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     if (m_pFeature != null)
     {
         frmAttribute frmPopup = new frmAttribute();
         m_featureCollection.Clear();
         m_featureCollection.Add(m_pFeature);
         frmPopup.m_featureCollection = m_featureCollection;
         frmPopup.ShowDialog();
     }
 }
Пример #4
0
 private void dataGridView1_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     m_pCurFeature = null;
     if (e.RowIndex >= 0 && e.RowIndex <= dataGridView1.Rows.Count)
     {
         m_nCurRowIndex = e.RowIndex;
         dataGridView1.Rows[m_nCurRowIndex].Selected = true;
         m_pCurFeature = EngineFuntions.GetFeatureByFieldAndValue(EngineFuntions.m_Layer_BusStation, "OBJECTID", dataGridView1.Rows[m_nCurRowIndex].Cells["OBJECTID"].Value.ToString());
         if (m_pCurFeature != null)
         {
             IEnvelope pEnvelope;
             pEnvelope = m_pCurFeature.Extent;
             pEnvelope.Expand(2, 2, true);
             EngineFuntions.m_AxMapControl.ActiveView.Extent = pEnvelope;
             EngineFuntions.m_AxMapControl.ActiveView.ScreenDisplay.Invalidate(null, true, (short)esriScreenCache.esriAllScreenCaches);
             System.Windows.Forms.Application.DoEvents();
             EngineFuntions.FlashShape(m_pCurFeature.ShapeCopy);
             System.Windows.Forms.Application.DoEvents();
             frmAttribute frmPopup = new frmAttribute();
             frmPopup.m_featureCollection.Add(m_pCurFeature);
             frmPopup.ShowDialog();
         }
     }
 }
Пример #5
0
        private void axMapControl1_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
        {
            m_mapPoint = axMapControl1.ToMapPoint(e.x, e.y);
            IActiveView pActiveView = axMapControl1.ActiveView;

            if (e.button == 1)
            {
                switch (m_ToolStatus)
                {
                case ForAR.Map3D_Select:
                    if (axMapControl1.Visible == true)
                    {
                        IGeometry pGeo;
                        pGeo = axMapControl1.TrackRectangle();
                        if (pGeo.Envelope.Height * pGeo.Envelope.Width == 0)
                        {
                            return;
                        }
                        List <IFeature> pSelFea = EngineFuntions.GetSeartchFeatures(EngineFuntions.m_Layer_BusStation, pGeo);
                        if (pSelFea.Count > 0)
                        {
                            frmAttribute frmPopup = new frmAttribute();
                            frmPopup.m_featureCollection = pSelFea;
                            frmPopup.ShowDialog();
                        }
                    }
                    break;

                case ForAR.Map3D_PointSelect:
                    if (axMapControl1.Visible == true)
                    {
                        m_CurFeatureLayer = EngineFuntions.SetCanSelLay("工程项目");
                        EngineFuntions.ClickSel(m_mapPoint, false, false, 6);
                        if (EngineFuntions.GetSeledFeatures(m_CurFeatureLayer, ref m_featureCollection))
                        {
                            frmAttribute frmPopup = new frmAttribute();
                            frmPopup.m_featureCollection = m_featureCollection;
                            frmPopup.ShowDialog();
                        }
                    }
                    break;

                case ForAR.Map3D_PolySelect:
                    if (axMapControl1.Visible == true)
                    {
                        IGeometry pGeo;
                        pGeo = axMapControl1.TrackPolygon();
                        if (pGeo.Envelope.Height * pGeo.Envelope.Width == 0)
                        {
                            return;
                        }
                        List <IFeature> pSelFea = EngineFuntions.GetSeartchFeatures(EngineFuntions.m_Layer_BusStation, pGeo);
                        if (pSelFea.Count > 0)
                        {
                            frmAttribute frmPopup = new frmAttribute();
                            frmPopup.m_featureCollection = pSelFea;
                            frmPopup.ShowDialog();
                        }
                    }
                    break;

                case ForAR.Map3D_CircleSelect:
                    if (axMapControl1.Visible == true)
                    {
                        IGeometry pGeo;
                        pGeo = axMapControl1.TrackCircle();
                        if (pGeo.Envelope.Height * pGeo.Envelope.Width == 0)
                        {
                            return;
                        }
                        List <IFeature> pSelFea = EngineFuntions.GetSeartchFeatures(EngineFuntions.m_Layer_BusStation, pGeo);
                        if (pSelFea.Count > 0)
                        {
                            frmAttribute frmPopup = new frmAttribute();
                            frmPopup.m_featureCollection = pSelFea;
                            frmPopup.ShowDialog();
                        }
                    }
                    break;

                default:
                    break;
                }
            }
            if (2 == e.button)
            {
                EngineFuntions.ZoomPoint(m_mapPoint, EngineFuntions.m_AxMapControl.Map.MapScale);
            }
        }