Beispiel #1
0
        public void SetIdentifyResults(IdentifyResults _IdentifyResults)
        {
            cCViewModel.Image = _IdentifyResults.CapImg;
            long     _longtime = _IdentifyResults.Info.Time;
            DateTime s         = new DateTime(1970, 1, 1);

            s = s.AddSeconds(_longtime);
            cCViewModel.Day = s.ToString("yyyy/MM/dd HH:mm:ss").Split(' ')[0].Replace("/", "").Replace("/", "");
            cCViewModel.Id  = _IdentifyResults.ID;
            GetCmpByCapId();
            List <byte[]> senceImg = thirft.QuerySenceImg(_IdentifyResults.ID, cCViewModel.Day);

            if (senceImg != null && senceImg.Count > 0 && senceImg[0].Length > 0)
            {
                BitmapImage bitImage = new BitmapImage();
                bitImage.BeginInit();
                bitImage.StreamSource = new System.IO.MemoryStream(senceImg[0]);
                bitImage.EndInit();
                image_SenceImg.Source = bitImage;
            }
            else
            {
                MB_MODULES.Views.MyMessage.showYes("获取抓拍实时帧失败!");
            }
        }
Beispiel #2
0
 public void SetIdentifyResults(IdentifyResults _IdentifyResults)
 {
     try
     {
         image_capImage.Source = _IdentifyResults.CapImg;
         image_cmpImage.Source = _IdentifyResults.RegImg;
         long     _longtime = _IdentifyResults.NewRci.Time;
         DateTime s         = new DateTime(1970, 1, 1);
         s = s.AddSeconds(_longtime);
         label_Socre.Text        = label_Socre.Text.ToString().Replace("Socre", _IdentifyResults.NewRci.Score + "");
         label_TemplateName.Text = label_TemplateName.Text.ToString().Replace("TemplateName", _IdentifyResults.NewRci.Name);
         label_TemplateType.Text = label_TemplateType.Text.ToString().Replace("TemplateType", _IdentifyResults.TemplateType);
         label_CapTime.Text      = s.ToString("yyyy/MM/dd HH:mm:ss");
         label_CapChannel.Text   = label_CapChannel.Text.ToString().Replace("CapChannel", _IdentifyResults.ChannelName);
         List <byte[]> senceImg = thirft.QuerySenceImg(_IdentifyResults.ID, s.ToString("yyyy/MM/dd HH:mm:ss").Split(' ')[0].Replace("/", "").Replace("/", ""));
         if (senceImg != null && senceImg.Count > 0 && senceImg[0].Length > 0)
         {
             image_SenceImg.Source = ImageConvert.ToBitmapImage(senceImg[0]);
         }
         else
         {
             MB_MODULES.Views.MyMessage.showYes("获取抓拍实时帧失败!");
         }
     }
     catch (Exception ex)
     {
         MyMessage.Show(ex.Message);
     }
 }
Beispiel #3
0
 public void threadlistViewCaptureRecord(object obj)
 {
     try
     {
         MyCapFaceLogWithImg _MyCapFaceLogWithImg = (MyCapFaceLogWithImg)obj;;
         List <byte[]>       listImageBytes       = new List <byte[]>();
         listImageBytes = thirft.QueryCapLogImageH(_MyCapFaceLogWithImg.ID, currDay);
         //得到图片
         if (listImageBytes[0].Length > 0)
         {
             GridCapCapPic.Dispatcher.BeginInvoke(new Action(() =>
             {
                 GridCapCapPic.Background = new ImageBrush
                 {
                     ImageSource = new BitmapImage(new Uri("pack://*****:*****@"/", "").Replace(@"/", ""));
             if (senceImg != null && senceImg.Count > 0 && senceImg[0].Length > 0)
             {
                 btnPicCaptureRecord.Dispatcher.BeginInvoke(new Action(() =>
                 {
                     image_SenceImg.Source = ImageConvert.ToBitmapImage(senceImg[0]);
                 }));
             }
         }
     }
     catch (Exception ex)
     {
         Logger <CaptureRecordQuery> .Log.Error("threadlistViewCaptureRecord", ex);
     }
     Thread.CurrentThread.Abort();
 }