修正
This commit is contained in:
parent
3a309775a0
commit
19febccd11
@ -7,23 +7,18 @@ using System.Windows.Forms;
|
||||
|
||||
namespace Camera_connect
|
||||
{
|
||||
public class BaslerCamera
|
||||
public class BaslerCamera(Main form)
|
||||
{
|
||||
private readonly Main form;
|
||||
private readonly object lockObject = new object();
|
||||
private readonly Main form = form;
|
||||
private readonly object lockObject = new();
|
||||
public int CameraNumber => CameraFinder.Enumerate().Count;
|
||||
public event Action<Bitmap> CameraImageEvent;
|
||||
|
||||
private readonly List<Camera> allCameras = new List<Camera>();
|
||||
private readonly PixelDataConverter pxConvert = new PixelDataConverter();
|
||||
private readonly List<Camera> allCameras = [];
|
||||
private readonly PixelDataConverter pxConvert = new();
|
||||
private bool isGrabbing;
|
||||
private bool isCameraOpen = false;
|
||||
|
||||
public BaslerCamera(Main form)
|
||||
{
|
||||
this.form = form;
|
||||
}
|
||||
|
||||
public void CameraInit()
|
||||
{
|
||||
var allCameraInfos = CameraFinder.Enumerate();
|
||||
|
@ -236,7 +236,7 @@ namespace Camera_connect
|
||||
// <20>穝 PictureBox 瓜钩
|
||||
pictureBox1.Invoke((MethodInvoker)delegate
|
||||
{
|
||||
Bitmap oldImage = pictureBox1.Image as Bitmap;
|
||||
Bitmap? oldImage = pictureBox1.Image as Bitmap;
|
||||
pictureBox1.Image = image;
|
||||
oldImage?.Dispose(); // 絋玂睦<E78E82>侣<EFBFBD> Bitmap 戈方
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user