ACAT.Lib.Extension.AppAgents.Notepad.NotepadAgentBase.launchLectureManager C# (CSharp) Метод

launchLectureManager() приватный Метод

Launches lecture manager with text from the notepad window. This function returns only after lecture manager has exited
private launchLectureManager ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task
        private async Task launchLectureManager()
        {
            IApplicationAgent agent = Context.AppAgentMgr.GetAgentByName("Lecture Manager Agent");
            if (agent != null)
            {
                IExtension extension = agent;
                extension.GetInvoker().SetValue("LoadFromFile", false);
                String fileName = getFileNameFromWindow();
                if (!String.IsNullOrEmpty(fileName))
                {
                    extension.GetInvoker().SetValue("LectureFile", fileName);
                }

                String notepadText = getNotepadText();
                extension.GetInvoker().SetValue("LectureText", notepadText);

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