public void LoadTextFileBlock(StringReader blockStream)
{
const string patternJapText = @"^\s*OLD\s*:\s*(.*)\s*$";
const string patternEngText = @"^\s*NEW\s*:\s*(.*)\s*$";
const string patternNotes = @"^\s*NOTES\s*:\s*(.*)\s*$";
string searchString = blockStream.ReadToEnd();
Match matchJapText = Regex.Match(searchString, patternJapText, RegexOptions.Multiline);
Match matchEngText = Regex.Match(searchString, patternEngText, RegexOptions.Multiline);
Match matchNotes = Regex.Match(searchString, patternNotes, RegexOptions.Multiline);
if (matchJapText.Success)
{
if (JapText != matchJapText.Groups[1].Value)
{
//UNDONE: Jap text not same error catch
}
JapText = matchJapText.Groups[1].Value.TrimEnd('\r', '\n');
}
if (matchEngText.Success)
EngText = matchEngText.Groups[1].Value.TrimEnd('\r', '\n');
if (matchNotes.Success)
Notes = matchNotes.Groups[1].Value.TrimEnd('\r', '\n');
}