コード例 #1
0
        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);
        }
コード例 #2
0
        /// ********************************************************************************
        /// <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);
        }