寻求帮助:启动Kinect的功能 [英] Ask for help: Function to start the Kinect
问题描述
大家好,
我为Kinect创建了一个项目,它有一个启动按钮来启动kinect和一个停止按钮来停止kinect。问题是当我按下停止按钮停止kinect然后点击开始按钮。 kinect永远不会开始。
以下是代码:
private void StartButton_Click(object sender,RoutedEventArgs s)
{
   if(this.Kinect!= null)
{
这个。 Kinect.Start();
}
}
private void StopButton_Click(object sender,RoutedEventArgs e)
{
if(this.Kinect!= null)
{
this.Kinect.Stop();
this.Kinect.Dispose();
this._Kinect = null;
}
}
谢谢
< blockquote>嗯,你停止时设置this._Kinect = null,然后检查StartButton中是否(this.Kinect!= null)
Hi All,
I create a project for Kinect which has a start button to start the kinect and a stop button to stop the kinect. The problem is when I hit the stop button to stop the kinect and then hit the start button. The kinect would never start. Here is the code:
private void StartButton_Click(object sender, RoutedEventArgs s)
{
if(this.Kinect!=null)
{
this. Kinect.Start();
}
}
private void StopButton_Click(object sender, RoutedEventArgs e)
{
if (this.Kinect != null)
{
this.Kinect.Stop();
this.Kinect.Dispose();
this._Kinect = null;
}
}
Thank you
well, you set this._Kinect = null when you stop, and then check if(this.Kinect!=null) in StartButton
这篇关于寻求帮助:启动Kinect的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!