/// <summary> /// Read header from file validate is real spelling file. /// </summary> /// <returns>True if valid spelling file else false.</returns> /// <returns>True if valid spelling file else false.</returns> /// <created>art2m,5/14/2019</created> /// <changed>art2m,5/14/2019</changed> public static bool ReadHeader(string filePath) { if (!SpellingReadWriteClass.ReadHeader(filePath)) { SpellingPropertiesClass.FirstWordIsArt2MSpellHeader = false; SpellingPropertiesClass.Art2MSpellSpellingList = false; return(false); } SpellingPropertiesClass.FirstWordIsArt2MSpellHeader = true; SpellingPropertiesClass.Art2MSpellSpellingList = true; return(true); }
/// <summary> /// write spelling words from collection to file. /// </summary> /// <param name="filePath">The path to the spelling list file.</param> /// <returns>true if spelling list is written to file else false.</returns> /// <created>art2m,5/12/2019</created> /// <changed>art2m,5/12/2019</changed> public static bool WriteWordsToFile(string filePath) { MyMessagesClass.NameOfMethod = MethodBase.GetCurrentMethod().Name; if (!SpellingReadWriteClass.WriteSpellingWordsToFile(filePath, TODO)) { return(false); } const string MsgSuccess = "Your spelling list has been created successfully."; MyMessagesClass.ShowInformationMessage(MsgSuccess, MyMessagesClass.NameOfMethod); return(true); }
/// ******************************************************************************** /// <summary> /// Reads file that contains all of the paths To users spelling List file. /// </summary> /// <returns>True if file read is successful.</returns> /// <created>art2m,5/23/2019</created> /// <changed>art2m,5/23/2019</changed> /// ******************************************************************************** public static bool ReadUsersSpellingListPathsFile(string filePath) { var newFilePath = Path.Combine(filePath, SpellingPropertiesClass.SpellingListPathsFile); if (!File.Exists(newFilePath)) { return(false); } if (!SpellingReadWriteClass.ReadUsersSpellingListPathsFile(filePath)) { return(false); } return(true); }
/// <summary> /// Read header from file validate is real spelling file. /// </summary> /// <returns>True if valid spelling file else false.</returns> /// <returns>True if valid spelling file else false.</returns> /// <created>art2m,5/14/2019</created> /// <changed>art2m,5/14/2019</changed> public bool ReadHeader() { var srw = new SpellingReadWriteClass(); if (!srw.ReadHeader(SpellingPropertiesClass.SpellingListPath)) { SpellingPropertiesClass.FirstWordIsArt2MSpellHeader = false; SpellingPropertiesClass.Art2MSpellSpellingList = false; return(false); } SpellingPropertiesClass.FirstWordIsArt2MSpellHeader = true; SpellingPropertiesClass.Art2MSpellSpellingList = true; return(true); }