internal static String getTalkWindowText()
{
var retVal = String.Empty;
try
{
if (Context.AppTalkWindowManager.IsTalkWindowVisible)
{
using (AgentContext context = Context.AppAgentMgr.ActiveContext())
{
retVal = context.TextAgent().GetSelectedText().Trim();
if (String.IsNullOrEmpty(retVal))
{
context.TextAgent().GetParagraphAtCaret(out retVal);
retVal = retVal.Trim();
}
}
}
}
catch (Exception ex)
{
Log.Exception(ex);
}
return retVal;
}