Exemple #1
0
        /// <summary>
        /// This method wraps an Outlook Explorer object and registers for the ExplorerClosed event.
        /// </summary>
        /// <param name="Explorer">The Outlook Explorer Object.</param>
        void WrapExplorer(Microsoft.Office.Interop.Outlook.Explorer Explorer)
        {
            // Wrap the Explorer and do some usefull with it
            ExplorerWrapper wrappedExplorer = new ExplorerWrapper(Explorer);
            Guid            explorerId      = wrappedExplorer.ID;

            if (_WrappedExplorers.ContainsKey(explorerId))
            {
                return;
            }

            _WrappedExplorers.Add(explorerId, wrappedExplorer);

            // register for the closed event, so we can releas it from memory
            wrappedExplorer.ExplorerClosed += new ExplorerClosedDelegate(UnwrapExplorer);
        }
        /// <summary>
        /// This method wraps an Outlook Explorer object and registers for the ExplorerClosed event.
        /// </summary>
        /// <param name="Explorer">The Outlook Explorer Object.</param>
        void WrapExplorer(Microsoft.Office.Interop.Outlook.Explorer Explorer)
        {
            // Wrap the Explorer and do some usefull with it
            ExplorerWrapper wrappedExplorer = new ExplorerWrapper(Explorer);
            Guid explorerId = wrappedExplorer.ID;
            if (_WrappedExplorers.ContainsKey(explorerId))
                return;

            _WrappedExplorers.Add(explorerId, wrappedExplorer);

            // register for the closed event, so we can releas it from memory
            wrappedExplorer.ExplorerClosed += new ExplorerClosedDelegate(UnwrapExplorer);
        }