예제 #1
0
        public void showRecord(EventHandler.BVSearchResponse searchRes, string szTargetID)
        {
            if (dataGridViewRecord.RowCount != 0)
            {
                dataGridViewRecord.Rows.Clear();
            }
            m_szTarID = szTargetID;
            int   channelNo;
            float percent = 0;

            foreach (BVCU_Search_FileInfo fileInfo in searchRes.fileInfo)
            {
                int index = this.dataGridViewRecord.Rows.Add();
                dataGridViewRecord.Rows[index].Cells[0].Value = index.ToString();
                dataGridViewRecord.Rows[index].Cells[1].Value = szTargetID;
                string fileName = BVSDKAdapter.ParsePathGetFileName(fileInfo.filePath);
                int.TryParse(fileName.Substring(0, fileName.Length), out channelNo);
                string channelNoStr = channelNo.ToString("00");
                dataGridViewRecord.Rows[index].Cells[2].Value   = channelNoStr;
                dataGridViewRecord.Rows[index].Cells[3].Value   = BVSDKAdapter.GetRecordReason(fileInfo.iRecordType);
                dataGridViewRecord.Rows[index].Cells[4].Value   = BVSDKAdapter.getDateTimeFromMicroSecond(fileInfo.iTimeBegin * 1000000).ToString("yyyy-MM-dd HH:mm:ss");;
                dataGridViewRecord.Rows[index].Cells[5].Value   = BVSDKAdapter.getDateTimeFromMicroSecond(fileInfo.iTimeEnd * 1000000).ToString("yyyy-MM-dd HH:mm:ss");;
                dataGridViewRecord.Rows[index].Cells[6].Value   = getFileType(fileInfo.iFileType);
                dataGridViewRecord.Rows[index].Cells[7].Value   = (float)Math.Round((fileInfo.iFileSize / (float)(1024 * 1024)), 2);
                dataGridViewRecord.Rows[index].Cells[8].Value   = (float)Math.Round(percent * 100, 2);
                dataGridViewRecord.Rows[index].Cells[9].Value   = BVSDKAdapter.ParsePathGetFileName(fileInfo.filePath);
                dataGridViewRecord.Rows[index].Cells[10].Value  = fileInfo.filePath;
                dataGridViewRecord.Rows[index].Cells[11].Value  = fileInfo.desc1;
                dataGridViewRecord.Rows[index].Cells[12].Value  = fileInfo.desc2;
                dataGridViewRecord.Rows[index].Tag              = fileInfo;
                dataGridViewRecord.Rows[index].ContextMenuStrip = contextMenuStripFileDown;
            }
        }
예제 #2
0
 internal void showSearchRecordFiles(EventHandler.BVSearchResponse searchRes, string szTargetID)
 {
     if (deleGetRecordFiles == null)
     {
         deleGetRecordFiles = new OnGetRecordFiles(proGetRecordFiles);
     }
     m_mainForm.BeginInvoke(deleGetRecordFiles, new object[] { searchRes, szTargetID });
 }
예제 #3
0
 void proGetRecordFiles(EventHandler.BVSearchResponse searchRes, string szTargetID)
 {
     m_mainForm.showRecord(searchRes, szTargetID);
 }