private void ReadUserNameFile() { var dirPath = SpellingPropertiesClass.AppDataDirectoryPath; var dirName = SpellingPropertiesClass.GetArt2MSpellDirectoryName; dirPath = DirectoryFileOperationsClass.CombineStringsMakeDirectoryPath(dirPath, dirName); if (string.IsNullOrEmpty(dirPath)) { return; } var fileName = SpellingPropertiesClass.GetArt2MSpellUserListFileName; var filePath = DirectoryFileOperationsClass.CombineDirectoryPathFileNameCheckCreateFile(dirPath, fileName); if (string.IsNullOrEmpty(filePath)) { return; } SpellingReadWriteClass.ReadUsersSpellingListPathsFile(filePath); }
/// ******************************************************************************** /// <summary> /// Add new users name to theAr2mSpell User List file. /// </summary> /// <created>art2m,5/17/2019</created> /// <changed>art2m,5/23/2019</changed> /// ******************************************************************************** private static void AddNewUserToUserNameFile() { NameOfMethod = MethodBase.GetCurrentMethod().Name; var unc = new UsersNameCollection(); if (unc.ContainsItem(SpellingPropertiesClass.UserName)) { InformationMessage = V2; ShowInformationMessageBox(); } unc.AddItem(SpellingPropertiesClass.UserName); var dirPath = SpellingPropertiesClass.AppDataDirectoryPath; var dirName = SpellingPropertiesClass.GetArt2MSpellDirectoryName; dirPath = DirectoryFileOperationsClass.CombineStringsMakeDirectoryPath(dirPath, dirName); if (string.IsNullOrEmpty(dirPath)) { return; } var fileName = SpellingPropertiesClass.GetArt2MSpellUserListFileName; var filePath = DirectoryFileOperationsClass.CombineDirectoryPathFileNameCheckCreateFile( dirPath, fileName); if (string.IsNullOrEmpty(filePath)) { return; } SpellingReadWriteClass.WriteUserNameFile(filePath); }