判断状态
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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user