예제 #1
0
 public ImageDirSys(string camera, DateTimeInString dtString)
 {
     this.CameraID = camera;
     this.Year = dtString.year;
     this.Month = dtString.month;
     this.Day = dtString.day;
     this.Hour = dtString.hour;
     this.Minute = dtString.minute;
     this.Second = dtString.second;
 }
예제 #2
0
 public ImageDirSys(string camera, DateTimeInString dtString)
 {
     this.CameraID = camera;
     this.Year     = dtString.year;
     this.Month    = dtString.month;
     this.Day      = dtString.day;
     this.Hour     = dtString.hour;
     this.Minute   = dtString.minute;
     this.Second   = dtString.second;
 }
예제 #3
0
        public string[] SearchFaces(int cameraID, DateTime beginTime, DateTime endTime)
        {
            ImageDirSys start =
                new ImageDirSys(cameraID.ToString("d2"), DateTimeInString.FromDateTime(beginTime));
            ImageDirSys end =
                new ImageDirSys(cameraID.ToString("d2"), DateTimeInString.FromDateTime(endTime));

            FaceFiles = ImageSearch.SearchImages(start, end, ImageDirSys.SearchType.PicType);

            return(FaceFiles);
        }
예제 #4
0
        private void queryBtn_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            ClearLists();

            if (this.comboBox1.Text == "" || this.comboBox1.Text == null)
            {
                MessageBox.Show("请选择要查询的摄像头ID", "警告");
                return;
            }
            string cameraID = int.Parse(this.comboBox1.Text).ToString("D2");


            //judge the input validation
            DateTime date1 = this.dateTimePicker1.Value;
            DateTime date2 = this.dateTimePicker2.Value;
            DateTime time1 = this.timeEdit1.Time;
            DateTime time2 = this.timeEdit2.Time;

            DateTime dateTime1 = new DateTime(date1.Year, date1.Month, date1.Day, time1.Hour, time1.Minute, time1.Second);
            DateTime dateTime2 = new DateTime(date2.Year, date2.Month, date2.Day, time2.Hour, time2.Minute, time2.Second);

            if (dateTime1 >= dateTime2)
            {
                MessageBox.Show("时间起点不应该大于或者等于时间终点,请重新输入!", "警告");
                return;
            }
            /////
            DateTimeInString dtString1 = DateTimeInString.FromDateTime(dateTime1);

            DateTimeInString dtString2 = DateTimeInString.FromDateTime(dateTime2);

            Query.ImageDirSys startDir = new ImageDirSys(cameraID, dtString1);
            Query.ImageDirSys endDir   = new ImageDirSys(cameraID, dtString2);

            imagesFound = ImageSearch.SearchImages(startDir, endDir, RemoteImaging.Query.ImageDirSys.SearchType.PicType);

            if (imagesFound.Length == 0)
            {
                MessageBox.Show(this, "未找到图片");
                return;
            }


            CalcPagesCount();
            currentPage = 1;
            UpdatePagesLabel();


            if (imagesFound == null)
            {
                MessageBox.Show("没有搜索到满足条件的图片!", "警告");
                return;
            }

            this.bestPicListView.Scrollable     = true;
            this.bestPicListView.MultiSelect    = false;
            this.bestPicListView.View           = View.LargeIcon;
            this.bestPicListView.LargeImageList = imageList1;


            ShowCurrentPage();

            Cursor.Current = Cursors.Default;
        }