private void GetTokensSubStrings(string fileName)
{
if (TextTokenSubStringsLoaded == null)
return;
if (BeforeTextTokenSubStringsLoaded != null)
BeforeTextTokenSubStringsLoaded(fileName == string.Empty ? null : fileName);
using (new WaitCursor(this))
{
List<TextTokenSubstring> tokens = (string.IsNullOrEmpty(fileName) ?
ReadTEScripture() : ReadFile(fileName));
if (tokens == null || tokens.Count == 0)
{
string msg = (fileName == null) ?
String.Format(FwCoreDlgs.kstidNoTokensFoundInCurrentScriptureProj, m_sListName) :
String.Format(FwCoreDlgs.kstidNoTokensFoundInFile, m_sListName, m_openFileDialog.FileName);
MessageBox.Show(msg, m_app.ApplicationName);
ResetContextLists();
lblScanMsg.Text = m_sInitialScanMsgLabel;
m_tokenGrid.Invalidate();
}
else
{
TextTokenSubStringsLoaded(tokens);
}
}
}