ACAT.Lib.Extension.AppAgents.Outlook.OutlookAgentBase.createKeyLoggerTextInterface C# (CSharp) Method

createKeyLoggerTextInterface() protected method

Creates a keylogger interface for all those edit controls that don't support the TextPattern. Depending on the type of the field we enable/disable abbreviations, smart punctuations, learning and spell check
protected createKeyLoggerTextInterface ( IntPtr handle, AutomationElement editTextElement ) : ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase
handle System.IntPtr handle of the window
editTextElement System.Windows.Automation.AutomationElement edit control automation element
return ACAT.Lib.Core.AgentManagement.TextInterface.TextControlAgentBase
        protected override TextControlAgentBase createKeyLoggerTextInterface(
                                                                            IntPtr handle,
                                                                            AutomationElement editTextElement)
        {
            Log.Debug("subtype = " + outlookControlSubType);

            TextControlAgentBase textInterface;

            if (isMessageBodyField(outlookControlSubType))
            {
                Log.Debug("creating outlookagentkeylogger with learn, spell and abbr" + outlookControlSubType);

                textInterface = new OutlookAgentKeyLoggerTextInterface();
            }
            else if (isSubjectField(outlookControlSubType))
            {
                Log.Debug("iSSubjectfield creating outlookagentkeylogger WITHOUT learn");
                textInterface = new OutlookAgentKeyLoggerTextInterface(false);
            }
            else
            {
                Log.Debug("creating outlookagentkeylogger WITHOUT learn, spellcheck and smart puncutationss");

                textInterface = new OutlookAgentKeyLoggerTextInterface(false, true, false, false);
            }

            return textInterface;
        }