public MainWindow() { InitializeComponent(); socketStatusChangeded = new SocketStatusChanged(onSocketStatusChangeded); PN_DataReader.BRRegisterConnectionStatusCallback(IntPtr.Zero, socketStatusChangeded); frameDataReceived = new FrameDataReceived(onFrameDataReceived); PN_DataReader.BRRegisterFrameDataCallback(IntPtr.Zero, frameDataReceived); }
void Start() { PNUtils.LoadSkeletonReference(bones, rootTrans, "Robot_", 0); // Socket status handle _OnSocketStatusChanged = new SocketStatusChanged(OnSocketStatusChanged); PN_DataReader.BRRegisterConnectionStatusCallback(IntPtr.Zero, _OnSocketStatusChanged); // Data receive handle _OnFrameDataReceived = new FrameDataReceived(OnFrameDataReceived); PN_DataReader.BRRegisterFrameDataCallback(IntPtr.Zero, _OnFrameDataReceived); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { PN_DataReader.BRRegisterConnectionStatusCallback(IntPtr.Zero, null); PN_DataReader.BRRegisterFrameDataCallback(IntPtr.Zero, null); }