Exemplo n.º 1
0
        /// <summary>
        /// Creates the outlook inspector depending on the version
        /// of Outlook installed on the client computer. Returns
        /// default inspector if outlook is not installed or is the
        /// unsupported version.
        /// </summary>
        private IOutlookInspector createOutlookInspector()
        {
            int version = -1;
            IOutlookInspector inspector;

            if (IsOutlookInstalled())
            {
                version = getOutlookVersion();
            }

            switch (version)
            {
            case 14:      // Outlook 2010
                inspector = new OutlookInspector2010();
                break;

            case 15:     // Outlook 2013
                inspector = new OutlookInspector2013();
                break;

            default:
                inspector = new DefaultOutlookInspector();
                break;
            }

            return(inspector);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates the outlook inspector depending on the version
        /// of Outlook installed on the client computer. Returns
        /// default inspector if outlook is not installed or is the
        /// unsupported version.
        /// </summary>
        private IOutlookInspector createOutlookInspector()
        {
            int version = -1;
            IOutlookInspector inspector;

            if (IsOutlookInstalled())
            {
                version = getOutlookVersion();
            }

            switch (version)
            {
                case 14:  // Outlook 2010
                    inspector = new OutlookInspector2010();
                    break;

                default:
                    inspector = new DefaultOutlookInspector();
                    break;
            }

            return inspector;
        }