判断状态

This commit is contained in:
zqm
2026-03-26 22:54:14 +08:00
parent 452caa6d89
commit d522eea509
7 changed files with 203 additions and 38 deletions

View File

@@ -50,8 +50,15 @@ namespace Test
{
if (button1.Text == "获取摄像头图像")
{
button1.Text = "停止获取";
_camera.Start();
try
{
_camera.Start();
button1.Text = "停止获取";
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{