private void TextContent_Inserted(int index, object value)
{
this.Node.AppendChild(((IText)value).Node);
if (((IText)value).Text != null)
{
try
{
if (this.Document is AODL.Document.TextDocuments.TextDocument)
{
string text = ((IText)value).Text;
this.Document.DocumentMetadata.CharacterCount += text.Length;
string[] words = text.Split(' ');
this.Document.DocumentMetadata.WordCount += words.Length;
}
}
catch(Exception)
{
//unhandled, only word and character count wouldn' be correct
}
}
}