public tbFingerprint GetData() { var fi = new tbFingerprint(); fi.LastName = edName.Text; fi.Templates = new List <tbBinaryData>(); fi.Templates.Add(new tbBinaryData(CImage.ImageToByte(piFp1.Image))); fi.Templates.Add(new tbBinaryData(CImage.ImageToByte(piFp2.Image))); fi.Templates.Add(new tbBinaryData(CImage.ImageToByte(piFp3.Image))); fi.Templates.Add(new tbBinaryData(CImage.ImageToByte(piFp4.Image))); fi.Photo = new tbBinaryData(CImage.ImageToByte(piPhoto.Image)); return(fi); }
public void AddPlate(LicensePlate plate) { if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate { AddPlate(plate); }); return; } var d = new tbAlpr(); d.CreateDate = plate.DateTime; d.Plate = plate.Text + ((plate.CountryCode.Length > 0) ? " (" + plate.CountryCode + ")" : ""); d.Direction = plate.Direction.ToString(); d.PlateImageSm.Data = CImage.ImageToByte(plate.PlateImage); d.PlateImageBg.Data = CImage.ImageToByte(plate.Image); pictureBox2.Image = plate.Image; list.Add(d); gridControl1.RefreshDataSource(); gridView1.MoveLast(); }