public TightropeBackupData(string fileID, Calibration calibration) { backupData = new BackUpData(); backupData.CalibrationItem = calibration; this.fileID = fileID; if (calibration.LeftFoot_Marker != null) { TCPProcessor.WholeFrameReceivedEvent += new TCPProcessor.WholeFrameReceivedHandler(TCPProcessor_WholeFrameReceivedEvent); } else { Stromohab_MCE_Connection.TCPProcessor.TrackableListReceivedEvent += new TCPProcessor.TrackableListReceivedHandler(TCPProcessor_TrackableListReceivedEvent); } }
public TightropePostProcessor(string filePath) { retreivedData = new BackUpData(); try { FileStream fileStream = new FileStream(filePath + "TightropeBackupData", FileMode.Open); if (fileStream.Length > 0) { BinaryFormatter formatter = new BinaryFormatter(); retreivedData = (BackUpData)formatter.Deserialize(fileStream); } fileStream.Flush(); fileStream.Close(); } catch (FileNotFoundException) { System.Diagnostics.Debug.WriteLine("Backup file not found"); } }