Пример #1
0
        public InspectorWrapper(Outlook.Inspector Inspector)
        {
            inspector = Inspector;
            ((Outlook.InspectorEvents_Event)inspector).Close +=
                new Outlook.InspectorEvents_CloseEventHandler(InspectorWrapper_Close);
            SharePointExplorerPane sharePointExplorerPane = new SharePointExplorerPane();

            sharePointExplorerPane.Application = inspector.Application;
            sharePointExplorerPane.Inspector   = inspector;
            taskPane = Globals.ThisAddIn.CustomTaskPanes.Add(sharePointExplorerPane, "Sobiens SharePointOutlookConnector", inspector);
            taskPane.VisibleChanged += new EventHandler(TaskPane_VisibleChanged);
        }
Пример #2
0
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            LogManager.Log("Entered ThisAddIn_Startup", EULogModes.Normal);

            LogManager.Log("Checking Activation...", EULogModes.Normal);

            /*
             * if(ActivationManager.CheckActivation() == false)
             * {
             *  ActivateForm activateForm = new ActivateForm();
             *  activateForm.ShowDialog();
             *  if (ActivationManager.CheckActivation() == false)
             *  {
             *      return;
             *  }
             * }
             */
            /*
             * DateTime expiryDate = new DateTime(2011, 2, 20);
             * if (DateTime.Now > expiryDate)
             * {
             *  MessageBox.Show("The trial period has expired", "SharePoint Outlook Connector");
             *  return;
             * }
             */

            LogManager.Log("Initializing SharePointExplorerPane", EULogModes.Normal);
            sharePointExplorerPane = new SharePointExplorerPane();
            LogManager.Log("Setting reference of application object", EULogModes.Normal);
            sharePointExplorerPane.Application      = Application;
            SystemInformationManager.OutlookVersion = Application.Version;

            LogManager.Log("Adding SharePointExplorerPane", EULogModes.Normal);
            _tpMoveToSP = this.CustomTaskPanes.Add(sharePointExplorerPane, "Sobiens SharePointOutlookConnector");
            this.Application.Inspectors.NewInspector += new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(Inspectors_NewInspector);
            LogManager.Log("Making SharePointExplorerPane visible", EULogModes.Normal);
            _tpMoveToSP.Visible = true;
            SetSPOCButton();
            LogManager.Log("Exiting ThisAddIn_Startup", EULogModes.Normal);

            inspectors = this.Application.Inspectors;
            inspectors.NewInspector += new Outlook.InspectorsEvents_NewInspectorEventHandler(Inspectors_NewInspector);

            foreach (Outlook.Inspector inspector in inspectors)
            {
                Inspectors_NewInspector(inspector);
            }
        }
        private Inspector GetCurrentInspactor()
        {
            SharePointExplorerPane sharePointExplorerPane = this.Parent.Parent.Parent as SharePointExplorerPane;

            return(sharePointExplorerPane.Inspector);
        }