//Public method that allows to stop recording //It saves the reports list in the indicated path public void StopRecording() { VRPNEventManager.StopListeningButton(ButtonType, ButtonName, Record); BinaryFormatter bf = new BinaryFormatter(); FileStream file = File.Create(path); bf.Serialize(file, data); file.Close(); data = new VRPNButton.ButtonReports(); firstReport = true; isRecording = false; }