public void Open( Document document )
{
if (document != null && !string.IsNullOrEmpty( document.name ))
{
int idx = document.name.LastIndexOf( '.' );
string ext = idx == -1 ? ".txt" : document.name.Substring( idx );
Open( document.name, ext, document.DocumentContent );
}
else
{
LogManager.Error( "Missing Document or Document Name" );
}
}