Exemplo n.º 1
0
        public void AddSuspects(PersonOfInterestDetectionResult compareResult)
        {
            this.listPersons.Add(compareResult);

            var lvi = new ListViewItem(new string[] { "",
                                                            //compareResult.Details.Name,
                                                            //compareResult.Details.Gender.ToString(),
                                                            //compareResult.Details.Age.ToString(),
                                                            //compareResult.Details.ID,
                                                            string.Empty});
            lvi.Tag = compareResult;
            var added = this.suspectsList.Items.Add(lvi);

            suspectsList.SelectedItems.Clear();
            suspectsList.EnsureVisible(this.suspectsList.Items.Count - 1);

            this.suspectsList.Items[this.suspectsList.Items.Count - 1].Selected = true;

            if (!Visible)
            {
                this.Show(Application.OpenForms[0]);
            }
        }
 public void PublishFaceMatchEvent(PersonOfInterestDetectionResult matchResult)
 {
     var e = new EventArgs<PersonOfInterestDetectionResult>(matchResult);
     this.InvokeFaceMatchFound(e);
 }
 public void PublishFaceMatchEvent(PersonOfInterestDetectionResult matchResult)
 {
 }
Exemplo n.º 4
0
        private void NotifyListeners(Portrait portrait, IEnumerable<RepositoryCompareResult> matches)
        {
            foreach (var match in matches)
            {
                var args = new PersonOfInterestDetectionResult
                               {
                                   Details = match.PersonInfo,
                                   Portrait = portrait,
                                   Similarity = match.Similarity
                               };

                if (EventAggregator != null)
                {
                    EventAggregator.PublishFaceMatchEvent(args);
                }
            }
        }
Exemplo n.º 5
0
 public void PublishFaceMatchEvent(PersonOfInterestDetectionResult matchResult)
 {
     var e = new EventArgs<PersonOfInterestDetectionResult>(matchResult);
     this.InvokeFaceMatchFound(e);
 }
Exemplo n.º 6
0
 public void PublishFaceMatchEvent(PersonOfInterestDetectionResult matchResult)
 {
 }
Exemplo n.º 7
0
        void FaceMatchDetected(PersonOfInterestDetectionResult match)
        {
            suspectsGallery.RunInUIThread(() =>
            {
                var item = new GalleryItem(
                    match.Suspect.GetIpl().ToBitmap(),
                    match.Suspect.CapturedAt.ToShortTimeString(),
                    null);
                item.Tag = match;
                suspectsGallery.Gallery.Groups[0].Items.Insert(0, item);
                item.Checked = true;

                dockManager1.ActivePanel = dockPanelSuspectsList;
                dockManager1.ActivePanel = dockPanelSuspectView;

            });
        }
Exemplo n.º 8
0
        public void ShowSuspects(PersonOfInterestDetectionResult result)
        {
            if (InvokeRequired)
            {
                Action<PersonOfInterestDetectionResult> action = this.ShowSuspects;

                this.BeginInvoke(action, result);
                return;
            }

            alertForm.AddSuspects(result);
        }