private List<TextTokenSubstring> ReadFile(string fileName)
{
if (!File.Exists(fileName))
return null;
List<TextTokenSubstring> tokens;
try
{
m_fileData = File.ReadAllLines(fileName);
NormalizeFileData();
var data = new TextFileDataSource(m_scrChecksDllFile,
m_checkToRun == CheckType.Punctuation ? "PunctuationCheck" : "CharactersCheck",
m_fileData,
ResourceHelper.GetResourceString("kstidFileLineRef"), m_chkParams, CharacterCategorizer);
tokens = data.GetReferences();
}
catch (Exception e)
{
MessageBox.Show(string.Format(FwCoreDlgs.kstidNonUnicodeFileError, e.Message),
m_app.ApplicationName, MessageBoxButtons.OK,MessageBoxIcon.Information);
return null;
}
return tokens;
}