public PSMoveClientThreadedRead() { _readerThread = new Thread(new ThreadStart(PSMoveClientThreadedReadThreadStart)); _rwl = new ReaderWriterLock(); _readerThreadExit = 0; _latest_state = new PSMoveSharpState(); _latest_camera_frame_state = new PSMoveSharpCameraFrameState(); _reading = false; }
private void updateTabPageCamera(PSMoveSharpCameraFrameState camera_frame_state) { if (Program.image_paused) { ImagePausedToggleButton.Text = "Unpause"; } else { ImagePausedToggleButton.Text = "Pause"; } camera_frame_state.camera_frame_state_rwl.AcquireReaderLock(-1); PSMoveSharpState dummy_state = new PSMoveSharpState(); imageBox.Image = camera_frame_state.GetCameraFrameAndState(ref dummy_state); camera_frame_state.camera_frame_state_rwl.ReleaseReaderLock(); }