判断状态

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
{

View File

@@ -13,7 +13,7 @@
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>