public int setupKinect(Model mod, Image img) { theModel = mod; theImage = img; foreach (var potentialSensor in KinectSensor.KinectSensors) { if (potentialSensor.Status == KinectStatus.Connected) { this.sensor = potentialSensor; this.foundSensor = true; break; } } if (this.foundSensor == false) { return -1; } this.setupSkeleton(); this.setupColor(); this.setupDepth(); this.sensor.Start(); this.setupAudio(); this.sensor.AllFramesReady += sensor_AllFramesReady; return 0; }
public MainWindow() { myModel = new Model(this); InitializeComponent(); myModel.theText = DirText; myDelegate = new amplitudeUpdated(updateAmplitude); }