private void GetUnformattedDataFrom() { // TODO: Check to see if any unformatted data for the selected author // TODO: Only show unformatted data for author selected. // TODO; Instead of list box use next previous first last. var dirPath = BookListPropertiesClass.PathToAuthorsDirectory; if (!AuthorsFileNamesCollection.ContainsItem(BookListPropertiesClass.AuthorsNameCurrent)) { return; } var index = AuthorsFileNamesCollection.GetItemIndex(BookListPropertiesClass.AuthorsNameCurrent); var fileName = AuthorsFileNamesCollection.GetItemAt(index); Debug.Assert(dirPath != null, nameof(dirPath) + " != null"); var filePath = DirectoryFileOperationsClass.CombineDirectoryPathWithFileName(dirPath, fileName); this.GetAuthorsName(fileName); if (!DataStorageOperationsClass.AddDataReadFromAuthorFileToRawDataCollection(filePath)) { return; } }
private static void GetRawDataFromFile() { var dirPath = BookListPropertiesClass.PathToAuthorsDirectory; var fileName = AuthorsFileNamesCollection.GetItemAt(0); Debug.Assert(dirPath != null, nameof(dirPath) + " != null"); var filePath = DirectoryFileOperationsClass.CombineDirectoryPathWithFileName(dirPath, fileName); if (!DataStorageOperationsClass.AddDataReadFromAuthorFileToRawDataCollection(filePath)) { return; } }