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

getContextualMenuForWindow() protected method

Returns the name of the contextual menu for the window/element currently in focus.
protected getContextualMenuForWindow ( OutlookWindowTypes windowType, String &title ) : String
windowType OutlookWindowTypes Type of window
title String returns the title
return String
        protected String getContextualMenuForWindow(OutlookWindowTypes windowType, ref String title)
        {
            Log.Debug("windowType: " + windowType);

            String scannerName;
            title = PanelTitle;

            switch (windowType)
            {
                case OutlookWindowTypes.EmailMessage:
                    scannerName = "OutlookBrowseEmailContextMenu";
                    title = "Mail";
                    break;

                case OutlookWindowTypes.NewEmailMessage:
                    scannerName = "OutlookNewEmailContextMenu";
                    title = "Mail";
                    break;

                case OutlookWindowTypes.Inbox:
                    scannerName = "OutlookContextMenu";
                    title = "Mail";
                    break;

                case OutlookWindowTypes.Calendar:
                    scannerName = "OutlookContextMenu";
                    title = "Calendar";
                    break;

                case OutlookWindowTypes.Tasks:
                    scannerName = "OutlookContextMenu";
                    title = "Tasks";
                    break;

                case OutlookWindowTypes.Contacts:
                    scannerName = "OutlookContextMenu";
                    title = "Contacts";
                    break;

                case OutlookWindowTypes.Notes:
                    scannerName = "OutlookContextMenu";
                    title = "Notes";
                    break;

                case OutlookWindowTypes.OpenNote:
                    scannerName = PanelClasses.Alphabet;
                    title = "Note";
                    break;

                case OutlookWindowTypes.AppointmentScheduling:
                case OutlookWindowTypes.OpenAppointment:
                    scannerName = "OutlookOpenAppointmentContextMenu";
                    title = "Appointment";
                    break;

                case OutlookWindowTypes.OpenContact:
                    scannerName = "OutlookOpenContactContextMenu";
                    title = "Contact";
                    break;

                case OutlookWindowTypes.OpenTask:
                    scannerName = "OutlookOpenTaskContextMenu";
                    title = "Task";
                    break;

                case OutlookWindowTypes.AddressBookDetails:
                case OutlookWindowTypes.AddressBook:
                    scannerName = "OutlookAddressBookContextMenu";
                    title = "Addr. Book";
                    break;

                default:
                    scannerName = "OutlookContextMenu";
                    break;
            }

            return scannerName;
        }