private void GetRawDataFromFile()
        {
            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.AddRawDataReadFromFileToRawDataCollection(filePath))
            {
                return;
            }
        }
示例#2
0
        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);

            DataStorageOperationsClass.AddToBackUpList(this.bkUpData)
        }
示例#3
0
 private void LoadUnformattedData()
 {
     this.GetUnformattedDataFrom();
     DataStorageOperationsClass.AddToBackUpList(this.bkUpData);
 }
示例#4
0
 private void LoadUnformattedData()
 {
     this.GetUnformattedDataFrom();
     DataStorageOperationsClass.AddToBackUpList(this.DataCopy);
     this.totalCount = this.DataCopy.Count;
 }