public void ShowResult(DataModel.SearchResultFaceProperty record) { if (record == null) { return; } m_currentRecord = record; if (InvokeRequired) { Invoke(new Action <DataModel.SearchResultFaceProperty>(ShowResult), record); } else { int index = m_allrecords.FindIndex(item => item.GetBase().ObjKey == m_currentRecord.GetBase().ObjKey); if (index >= 0) { pageNavigatorEx1.Index = index + 1; } pageNavigatorEx1.MaxCount = m_allrecords.Count; m_currentRecord = record; advPropertyGrid1.SelectedObject = record; Image img = Common.GetImage(record.GetBase().OriFacePicPath); string[] pointStr = record.GetBase().FacePosition.Split(','); pictureBox5.Image = img; Graphics gs = Graphics.FromImage(img); Pen pen = new Pen(Color.Red, 3); gs.DrawRectangle(pen, Convert.ToInt32(pointStr[0]), Convert.ToInt32(pointStr[1]), Convert.ToInt32(pointStr[2]), Convert.ToInt32(pointStr[3])); } }
public void Init(List <SearchResultFaceProperty> faceResultInfo, SearchResultFaceProperty record) { if (faceResultInfo != null) { m_allrecords = faceResultInfo; pageNavigatorEx1.MaxCount = m_allrecords.Count; pageNavigatorEx1.Index = 1; m_currentRecord = record; } }