Commit d8359e4a by 陶然

优化

parent 387a55f5
...@@ -256,6 +256,12 @@ namespace Kivii.Sample.ImageUploader ...@@ -256,6 +256,12 @@ namespace Kivii.Sample.ImageUploader
private void connect(int selectedIndex = 0) private void connect(int selectedIndex = 0)
{ {
if (InvokeRequired)
{
Invoke(new Action<int>(connect), selectedIndex);
}
else
{
if (videoDevice == null) return; if (videoDevice == null) return;
if ((videoCapabilities != null) && (videoCapabilities.Length != 0)) if ((videoCapabilities != null) && (videoCapabilities.Length != 0))
{ {
...@@ -265,6 +271,7 @@ namespace Kivii.Sample.ImageUploader ...@@ -265,6 +271,7 @@ namespace Kivii.Sample.ImageUploader
vspCamView.Start(); vspCamView.Start();
tbxReportId.Focus(); tbxReportId.Focus();
} }
}
private void disconnect() private void disconnect()
{ {
...@@ -304,6 +311,8 @@ namespace Kivii.Sample.ImageUploader ...@@ -304,6 +311,8 @@ namespace Kivii.Sample.ImageUploader
} }
} }
} }
tbxReportId.Focus();
} }
catch (Exception ex) catch (Exception ex)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment