ACAT.Lib.Extension.AppAgents.MSWord.MSWordAgentBase.launchLectureManager C# (CSharp) Method

launchLectureManager() protected method

Launches lecture manager with text from the MS Word window. This function returns only after lecture manager has exited
protected launchLectureManager ( String fileName, String text ) : void
fileName String
text String
return void
        protected async void launchLectureManager(String fileName, String text)
        {
            IApplicationAgent agent = Context.AppAgentMgr.GetAgentByName("Lecture Manager Agent");
            if (agent != null)
            {
                IExtension extension = agent;
                extension.GetInvoker().SetValue("LoadFromFile", false);
                if (!String.IsNullOrEmpty(fileName))
                {
                    extension.GetInvoker().SetValue("LectureFile", fileName);
                }

                extension.GetInvoker().SetValue("LectureText", text);

                await Context.AppAgentMgr.ActivateAgent(agent as IFunctionalAgent);
            }
        }