コード例 #1
0
        /// ********************************************************************************
        /// <summary>
        ///     Remove the user name from the All names listed file.
        /// </summary>
        /// <param name="filePath">The path to the file names list file.</param>
        /// <returns>True if successful else false.</returns>
        /// <created>art2m,5/23/2019</created>
        /// <changed>art2m,5/23/2019</changed>
        /// ********************************************************************************
        private static bool ReadTheUserNameFileIntoCollection(string filePath)
        {
            var retVal = SpellingReadWriteClass.ReadUserNameFile(filePath);

            if (!retVal)

            {
                return(false);
            }

            retVal = UsersNameCollection.ContainsItem(SpellingPropertiesClass.UserName);

            if (!retVal)
            {
                return(false);
            }

            var index = UsersNameCollection.GetItemIndex(SpellingPropertiesClass.UserName);

            retVal = UsersNameCollection.RemoveItemAt(index);

            if (!retVal)
            {
                return(false);
            }

            return(true);
        }