判断状态
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user