예제 #1
0
        private void cmiSatTask_Click(object sender, EventArgs e)
        {
            if (Main.MainInterface.SelectedNodeSat == null) //如果未选中任何结点,则显示观测方案管理界面
            {
                MessageBox.Show("请先选择要显示的观测方案下的具体观测任务再进行操作!");
                return;
            }
            else
            {
                try
                {
                    string tag = Main.MainInterface.SelectedNodeSat.Tag.ToString();
                    if (tag.StartsWith("S")) //显示观测任务所对应的观测方案信息
                    {
                        MessageBox.Show("请先选择要显示的观测任务再进行操作!");
                    }
                    else if (tag.StartsWith("T")) //显示观测任务所对应的观测方案信息
                    {
                        int id;
                        int.TryParse(Main.MainInterface.SelectedNodeSat.Tag.ToString().Substring(3), out id);
                        Main.Program.SetStatusLabel("正在加载任务... ...");
                        Core.Model.TASK_LAYOUT_LIST taskLayoutList     = new Core.Model.TASK_LAYOUT_LIST();
                        Core.DAL.TASK_LAYOUT_LIST   dal_taskLayoutList = new Core.DAL.TASK_LAYOUT_LIST();
                        taskLayoutList = dal_taskLayoutList.GetModel(id);
                        //读取并图上显示卫星观测区信息
                        Core.Map.MapHelper map = new Core.Map.MapHelper(Main.Program.myMap);
                        //map.ClearAllElement();
                        Coverage.SatelliteResaultHelper.LoadSatelliteTaskArea(map, taskLayoutList);
                        Coverage.SatelliteResaultHelper.PositionTaskArea(Main.Program.myMap, id);
                    }
                    else if (tag.StartsWith("I")) //显示具体的观测结果信息
                    {
                        int id;
                        int.TryParse(Main.MainInterface.SelectedNodeSat.Tag.ToString().Substring(3), out id);
                        Main.Program.SetStatusLabel("正在加载任务... ...");
                        Core.Model.TASK_LAYOUT_LIST      taskLayoutList     = new Core.Model.TASK_LAYOUT_LIST();
                        Core.DAL.TASK_LAYOUT_LIST        dal_taskLayoutList = new Core.DAL.TASK_LAYOUT_LIST();
                        Core.DAL.ImgLayoutTempTimewindow dal_imgTimeWindow  = new Core.DAL.ImgLayoutTempTimewindow();
                        taskLayoutList = dal_taskLayoutList.GetModel(Convert.ToInt32(dal_imgTimeWindow.GetModel(id.ToString()).TASKID));
                        //读取并图上显示卫星观测区信息
                        Core.Map.MapHelper map = new Core.Map.MapHelper(Main.Program.myMap);
                        //map.ClearAllElement();
                        Coverage.SatelliteResaultHelper.LoadSatelliteTaskArea(map, taskLayoutList);
                    }

                    Main.Program.SetStatusLabel("就绪.");
                }
                catch (Exception ex)
                {
                    MessageBox.Show("错误:" + ex);
                }
            }
        }
예제 #2
0
        /// <summary>
        /// 加载观测区域列表
        /// </summary>
        /// <param name="pnode"></param>
        public static void LoadSatelliteResaultList(ESRI.ArcGIS.Controls.AxMapControl pMapCtr, TreeNode pnode, bool timeChecked)
        {
            int pid;

            int.TryParse(pnode.Tag.ToString().Substring(3), out pid);

            Core.DAL.SatelliteResault          dal        = new Core.DAL.SatelliteResault();
            List <Core.Model.SatelliteResault> list_model = new List <Core.Model.SatelliteResault>();
            TreeNode node;

            try
            {
                if (timeChecked)
                {
                    list_model = dal.GetListByTaskIDTime(pid);
                }
                else
                {
                    list_model = dal.GetListByTaskID(pid);
                }

                if (list_model.Count != 0)
                {
                    pnode.Nodes.Clear();
                }
                foreach (Core.Model.SatelliteResault model in list_model)
                {
                    Core.Model.ImgLayoutTempTimewindow imgLayoutTempTimewindow     = new Core.Model.ImgLayoutTempTimewindow();
                    Core.DAL.ImgLayoutTempTimewindow   dal_imgLayoutTempTimewindow = new Core.DAL.ImgLayoutTempTimewindow();
                    imgLayoutTempTimewindow = dal_imgLayoutTempTimewindow.GetModel(model.LSTR_SEQID.ToString());
                    node                    = new TreeNode();
                    node.Text               = imgLayoutTempTimewindow.STARTTIME.ToString("yyyy-MM-dd HH:mm:ss") + "\\" + imgLayoutTempTimewindow.SAT_STKNAME + "\\" + imgLayoutTempTimewindow.SENSOR_STKNAME;
                    node.Tag                = "I1|" + model.LSTR_SEQID;//I--表示观测结果,model.LSTR_SEQID--表示为观测结果ID
                    node.ImageIndex         = 4;
                    node.SelectedImageIndex = 5;
                    pnode.Nodes.Add(node);
                }
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                list_model = null;
                dal        = null;
            }
        }
예제 #3
0
 private void SatelliteResaultDetail_Load(object sender, EventArgs e)
 {
     try
     {
         imgTimewindow           = dal_imgTimewindow.GetModel(resaultid.ToString());
         satellite               = dal_satellite.GetModel(imgTimewindow.SATID);
         sensor                  = dal_sensor.GetModel(imgTimewindow.SENSOR_ID.ToString());
         this.txtSatName.Text    = satellite.SAT_SHORTNAME + "[" + satellite.SAT_FULLNAME + "]";
         this.txtSensorName.Text = sensor.SENSOR_NAME;
         this.txtStartTime.Text  = imgTimewindow.STARTTIME.ToString();
         this.txtEndTime.Text    = imgTimewindow.ENDTIME.ToString();
         this.txtTimeLong.Text   = imgTimewindow.TIMELONG.ToString() + "秒";
         this.txtAngle.Text      = imgTimewindow.SANGLE.ToString() + "度";
         this.txtResolution.Text = imgTimewindow.GSD.ToString() + "米";
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("错误:" + ex.ToString());
     }
 }