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) { }
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); } } }
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; }); }
public void ShowSuspects(PersonOfInterestDetectionResult result) { if (InvokeRequired) { Action<PersonOfInterestDetectionResult> action = this.ShowSuspects; this.BeginInvoke(action, result); return; } alertForm.AddSuspects(result); }