/// <summary> /// Creates filePath from folder and name. Sets path on gui and /// initializes a new TxtWriter /// </summary> private void InitializeLogFile() { string patientNumber = loggerGui.GetPatientNumber(); string startTimeString = measurementStartTime.ToString("yyyyMMdd_HHmmss"); string fileName = string.Format("{0}_Pt{1}.txt", startTimeString, patientNumber); string filePath = loggerGui.GetSelectedFolder() + @"\" + fileName; loggerGui.SetCurrentFile(filePath); // Initialize TxtWriter logFile = new Services.TxtWriter(filePath); }