Sfoglia il codice sorgente

Merge branch 'master' of http://139.155.15.221:3000/zoulei/XzXdDw

gongqiuhong 1 anno fa
parent
commit
d74fad7063

BIN
Database.db


+ 10 - 0
XdDw.App/UserControl/CtrlPosXd.cs

@@ -191,6 +191,8 @@ namespace XdDw.App.UserControl
                     this.gridPos.DataSource = list;
                     mapControl1.SetPosDataSource(list);
                 }
+                var view = gridPos.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
+                view.RowClick += View_RowClick;
             }
             catch (Exception ex)
             {
@@ -198,6 +200,14 @@ namespace XdDw.App.UserControl
                 XtraMessageBox.Show("查询定位结果失败");
             }
         }
+
+        private void View_RowClick(object sender, RowClickEventArgs e)
+        {
+            if (e.RowHandle < 0) return;
+            var item = gridView1.GetRow(e.RowHandle) as XDPosRes;
+            item.Selected = true;
+            mapControl1.UpdatePosItem(item);
+        }
         bool stoped = false;
         private async void LoadSimulationData()
         {

+ 10 - 1
XzDw.App/UserControl/CtrlPosSingle.cs

@@ -117,7 +117,7 @@ namespace XzXdDw.App.UserControl
                         var ids = gridView1.GetSelectedRows();
                         if (ids.Length <= 0)
                         {
-                            XtraMessageBox.Show("请选择需要绘制误差椭圆的数据信息!");
+                            XtraMessageBox.Show("请选择需要手动定位的数据信息!");
                             return;
                         }
                         var item = gridView1.GetRow(ids[0]) as PosRes;
@@ -190,6 +190,8 @@ namespace XzXdDw.App.UserControl
                     this.gridPos.DataSource = list;
                     mapControl1.SetPosDataSource(list);
                 }
+                var view = gridPos.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
+                view.RowClick += View_RowClick;
             }
             catch (Exception ex)
             {
@@ -197,6 +199,13 @@ namespace XzXdDw.App.UserControl
                 XtraMessageBox.Show("查询定位结果失败");
             }
         }
+        private void View_RowClick(object sender, RowClickEventArgs e)
+        {
+            if (e.RowHandle < 0) return;
+            var item = gridView1.GetRow(e.RowHandle) as PosRes;
+            item.Selected = true;
+            mapControl1.UpdatePosItem(item);
+        }
         bool stoped = false;
         private async void LoadSimulationData()
         {

+ 21 - 10
XzDw.App/UserControl/CtrlPosXz.cs

@@ -109,15 +109,15 @@ namespace XzXdDw.App.UserControl
                      .AddMenu("手动定位", SvgHelper.LoadFromFile("Image\\Pos.svg"), X2Pos)
                      .AddMenu("绘制时差线", SvgHelper.LoadFromFile("Image\\DrawLine.svg"), DrawDtoLine)
                      .AddMenu("绘制频差线", SvgHelper.LoadFromFile("Image\\DfoLine.svg"), DrawDfoLine)
-                     .AddMenu("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), () =>
-                     {
-                         if (xzGdopParam == null)
-                         {
-                             xzGdopParam = new XZGDOPParam(refTx, TestData.leoTime, MBfu, CKfu);
-                         }
-                         xzGdopParam.mapControl1 = mapControl1;
-                         PopupHelper.ShowPopup(xzGdopParam, mapControl1, mapControl1.Width / 4);
-                     })
+                      .AddMenu("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), () =>
+                      {
+                          if (xzGdopParam == null)
+                          {
+                              xzGdopParam = new XZGDOPParam(refTx, TestData.leoTime, MBfu, CKfu);
+                          }
+                          xzGdopParam.mapControl1 = mapControl1;
+                          PopupHelper.ShowPopup(xzGdopParam, mapControl1, mapControl1.Width / 4);
+                      })
                      .AddMenu("绘制误差椭圆", SvgHelper.LoadFromFile("Image\\误差椭圆.svg"), () =>
                      {
                          var ids = gridView1.GetSelectedRows();
@@ -163,7 +163,7 @@ namespace XzXdDw.App.UserControl
                 //RectMenu为框选的区域上右键菜单
                 mapControl1.AddMapMenu("加载仿真数据", SvgHelper.LoadFromFile("Image\\LoadData.svg"), (lon, lat) => LoadSimulationData())
                     .AddMapMenu("停止加载", SvgHelper.LoadFromFile("Image\\Stop.svg"), (lon, lat) => stoped = true)
-                    .AddPosMenu<XZPosRes>("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), item =>
+                    .AddMapMenu("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), (lon, lat) =>
                     {
                         if (xzGdopParam == null)
                         {
@@ -203,6 +203,9 @@ namespace XzXdDw.App.UserControl
                     this.gridPos.DataSource = list;
                     mapControl1.SetPosDataSource(list);
                 }
+
+                var view = gridPos.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
+                view.RowClick += View_RowClick;
             }
             catch (Exception ex)
             {
@@ -210,6 +213,14 @@ namespace XzXdDw.App.UserControl
                 XtraMessageBox.Show("查询定位结果失败");
             }
         }
+
+        private void View_RowClick(object sender, RowClickEventArgs e)
+        {
+            if (e.RowHandle < 0) return;
+            var item = gridView1.GetRow(e.RowHandle) as XZPosRes;
+            item.Selected = true;
+            mapControl1.UpdatePosItem(item);
+        }
         bool stoped = false;
         private async void LoadSimulationData()
         {

+ 9 - 0
XzXdDw.App/UserControl/CtrlPosSingle.cs

@@ -190,6 +190,8 @@ namespace XzXdDw.App.UserControl
                     this.gridPos.DataSource = list;
                     mapControl1.SetPosDataSource(list);
                 }
+                var view = gridPos.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
+                view.RowClick += View_RowClick;
             }
             catch (Exception ex)
             {
@@ -197,6 +199,13 @@ namespace XzXdDw.App.UserControl
                 XtraMessageBox.Show("查询定位结果失败");
             }
         }
+        private void View_RowClick(object sender, RowClickEventArgs e)
+        {
+            if (e.RowHandle < 0) return;
+            var item = gridView1.GetRow(e.RowHandle) as PosRes;
+            item.Selected = true;
+            mapControl1.UpdatePosItem(item);
+        }
         bool stoped = false;
         private async void LoadSimulationData()
         {

+ 10 - 0
XzXdDw.App/UserControl/CtrlPosXd.cs

@@ -192,6 +192,8 @@ namespace XzXdDw.App.UserControl
                     this.gridPos.DataSource = list;
                     mapControl1.SetPosDataSource(list);
                 }
+                var view = gridPos.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
+                view.RowClick += View_RowClick;
             }
             catch (Exception ex)
             {
@@ -199,6 +201,14 @@ namespace XzXdDw.App.UserControl
                 XtraMessageBox.Show("查询定位结果失败");
             }
         }
+
+        private void View_RowClick(object sender, RowClickEventArgs e)
+        {
+            if (e.RowHandle < 0) return;
+            var item = gridView1.GetRow(e.RowHandle) as XDPosRes;
+            item.Selected = true;
+            mapControl1.UpdatePosItem(item);
+        }
         bool stoped = false;
         private async void LoadSimulationData()
         {

+ 11 - 0
XzXdDw.App/UserControl/CtrlPosXz.cs

@@ -203,6 +203,9 @@ namespace XzXdDw.App.UserControl
                     this.gridPos.DataSource = list;
                     mapControl1.SetPosDataSource(list);
                 }
+
+                var view = gridPos.MainView as DevExpress.XtraGrid.Views.Grid.GridView;
+                view.RowClick += View_RowClick;
             }
             catch (Exception ex)
             {
@@ -210,6 +213,14 @@ namespace XzXdDw.App.UserControl
                 XtraMessageBox.Show("查询定位结果失败");
             }
         }
+
+        private void View_RowClick(object sender, RowClickEventArgs e)
+        {
+            if (e.RowHandle < 0) return;
+            var item = gridView1.GetRow(e.RowHandle) as XZPosRes;
+            item.Selected = true;
+            mapControl1.UpdatePosItem(item);
+        }
         bool stoped = false;
         private async void LoadSimulationData()
         {