Exemplo n.º 1
0
        private void ShowProjectionsInfo(ProjectionInfo[] pjs)
        {
            lv.Items.Clear();
            lv.Columns.Clear();
            ListViewDetailColumn col1 = new ListViewDetailColumn("文件名");

            col1.Width = 320;
            lv.Columns.Add(col1);
            lv.Columns.Add("创建时间");
            lv.Columns.Add("大小(MB)");
            lv.Columns.Add("快视图");
            lv.Columns.Add("轨道时间");
            lv.Columns.Add("白天/晚上");
            lv.Columns.Add("卫星");
            lv.Columns.Add("传感器");
            if (pjs == null || pjs.Length == 0)
            {
                SendMessage("查询到满足条件的结果共0条。");
                return;
            }
            else
            {
                SendMessage("查询到满足条件的结果共" + pjs.Length + "条。");
            }
            lv.BeginInit();
            for (int i = 0; i < pjs.Length; i++)
            {
                ProjectionInfo pg = pjs[i];
                OrbitInfo      o  = pg.orbitInfo;
                lv.Items.Add(
                    Path.GetFileName(pg.datapath),
                    pg.createTime,
                    (pg.fileSize / 1024.0 / 1024).ToString("f2"),
                    pg.thumbnail,
                    o == null ? "" : o.observationdate + o.observationtime,
                    o == null ? "" : o.dayOrNight,
                    o == null ? "" : o.satellite,
                    o == null ? "" : o.sensor);
                lv.Items[i].Tag = pg.datapath;
            }
            lv.EndInit();
        }