Ejemplo n.º 1
0
        private void buttonSearch_Click(object sender, EventArgs e)
        {
            listViewFile1.Items.Clear();
            uint y1   = (uint)dateTimeStart.Value.Year;
            uint m1   = (uint)dateTimeStart.Value.Month;
            uint d1   = (uint)dateTimeStart.Value.Day;
            uint h1   = (uint)dateTimeStart.Value.Hour;
            uint min1 = (uint)dateTimeStart.Value.Minute;
            uint s1   = (uint)dateTimeStart.Value.Second;

            //设置回放的结束时间 Set the stopping time to search video files
            uint y2   = (uint)dateTimeEnd.Value.Year;
            uint m2   = (uint)dateTimeEnd.Value.Month;
            uint d2   = (uint)dateTimeEnd.Value.Day;
            uint h2   = (uint)dateTimeEnd.Value.Hour;
            uint min2 = (uint)dateTimeEnd.Value.Minute;
            uint s2   = (uint)dateTimeEnd.Value.Second;

            string[][] filelist = videoCapture.Findfile(y1, m1, d1, h1, min1, s1, y2, m2, d2, h2, min2, s2);
            for (int i = 0; i + 2 < filelist[0].Length; i = i + 3)
            {
                listViewFile1.Items.Add(new ListViewItem(new string[]
                                                         { filelist[0][i], filelist[0][i + 1], filelist[0][i + 2] })); //将查找的录像文件添加到列表中
            }
            for (int i = 0; i + 2 < filelist[1].Length; i = i + 3)
            {
                listViewFile1.Items.Add(new ListViewItem(new string[]
                                                         { filelist[1][i], filelist[1][i + 1], filelist[1][i + 2] })); //将查找的录像文件添加到列表中
            }
        }