Beispiel #1
0
 private void 定位到ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     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);
     }
 }
Beispiel #2
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();
         }
     }
 }