/// <summary>
        /// Read users names list from file.
        /// </summary>
        /// <created>art2m,5/20/2019</created>
        /// <changed>art2m,5/20/2019</changed>
        private void ReadUserFileFillListBox()
        {
            var dirPath = DirectoryFileOperations.CheckExistsCreateArt2MSpellPathDirectory();

            if (string.IsNullOrEmpty(dirPath))
            {
                return;
            }

            var filePath = DirectoryFileOperations.CreatePathToUserFile(dirPath);

            if (string.IsNullOrEmpty(filePath))
            {
                return;
            }

            if (!SpellingReadWriteClass.ReadUserNameFile(filePath))
            {
                return;
            }

            this.FillListBoxWithUserNames();
        }
        /// <summary>
        ///     Add new users name to theAr2mSpell User List file.
        /// </summary>
        /// <created>art2m,5/17/2019</created>
        /// <changed>art2m,5/17/2019</changed>
        private static void AddNewUserToUserNameFile()
        {
            MyMessages.NameOfMethod = MethodBase.GetCurrentMethod().Name;

            var unc = new UsersNameCollection();

            if (unc.ContainsItem(SpellingPropertiesClass.UserName))
            {
                MyMessages.InformationMessage = "This user all ready exists.";
                MyMessages.ShowInformationMessageBox();
            }

            unc.AddItem(SpellingPropertiesClass.UserName);

            var dirPath = DirectoryFileOperations.CheckExistsCreateArt2MSpellPathDirectory();

            var filePath = DirectoryFileOperations.CreateUserSpellingListDirectory(dirPath);


            SpellingReadWriteClass.WriteUserNameFile(filePath);

            MyMessages.ErrorMessage = "Unable to create user directory.";
            MyMessages.ShowErrorMessageBox();
        }
示例#3
0
 /// <summary>
 /// Display all of the users spelling list in the list box.
 /// </summary>
 /// <created>art2m,5/22/2019</created>
 /// <changed>art2m,5/22/2019</changed>
 private void DisplayUsersSpellingList()
 {
     var dirPath  = DirectoryFileOperations.CheckExistsCreateArt2MSpellPathDirectory();
     var filePath = DirectoryFileOperations.CreateUserSpellingListDirectory(dirPath);
 }