Пример #1
0
 private void btn_SeachSelected_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (f_StudentInfo == null || f_StudentInfo.IsDisposed)
     {
         f_StudentInfo = new Forms.FormStudentInfo();
         f_StudentInfo.SetInfo(dataGridView_Main.SelectedRows);
         f_StudentInfo.Show();
     }
     else
     {
         f_StudentInfo.SetInfo(dataGridView_Main.SelectedRows);
         f_StudentInfo.Show();
     }
 }
Пример #2
0
 private void axMapControl_Main_OnMouseDown(object sender, IMapControlEvents2_OnMouseDownEvent e)
 {
     if (e.button == 4)
     {
         AeUtils.Pan();
     }
     else if (e.button == 1 && f_EditStudent != null && !f_EditStudent.IsDisposed && f_EditStudent.IsGettingPoint)
     {
         IPoint pPoint = new PointClass()
         {
             X = e.mapX, Y = e.mapY, SpatialReference = m_pMapC2.SpatialReference
         };
         f_EditStudent.Point          = pPoint;
         f_EditStudent.IsGettingPoint = false;
         f_EditStudent.WindowState    = FormWindowState.Normal;
         AeUtils.SetMousePointer(esriControlsMousePointer.esriPointerArrow);
         f_EditStudent.Home = AeUtils.GetClickHome(pPoint); // 获取点击位置的省份
     }
     else if (e.button == 1 && m_pMapC2.MousePointer == esriControlsMousePointer.esriPointerIdentify)
     {
         if (f_StudentInfo == null || f_StudentInfo.IsDisposed)
         {
             f_StudentInfo = new Forms.FormStudentInfo();
             f_StudentInfo.SetInfo(AeUtils.SelectStudentFeatureByPoint(new PointClass()
             {
                 X = e.mapX,
                 Y = e.mapY,
                 SpatialReference = m_pMapC2.SpatialReference
             }));
             try
             {
                 f_StudentInfo.Show();
             }
             catch { }
         }
         else
         {
             f_StudentInfo.SetInfo(AeUtils.SelectStudentFeatureByPoint(new PointClass()
             {
                 X = e.mapX,
                 Y = e.mapY,
                 SpatialReference = m_pMapC2.SpatialReference
             }));
         }
     }
 }