Exemple #1
0
        /// <summary>
        /// Handles the <see cref="Application.DocumentChange"/> event.
        /// </summary>
        /// <remarks>
        /// Initialises the flow controller only when the first non Protected View document is opened. Also hides the Team ribbon for Protected View documents.
        /// </remarks>
        private void Application_DocumentChange()
        {
            ILogger logger = this.container.Resolve <ILogger>();

            logger.Log(TraceEventType.Verbose, "Add in doc change, process id {0}", Process.GetCurrentProcess().Id);
            if (!this.flowControllerInitialised && !this.InProtectedView())
            {
                this.flowControllerInitialised  = true;
                this.teamRibbon.tabTeam.Visible = true;
                FlowController flowController = this.container.Resolve <FlowController>();
                flowController.Initialise();
            }

            this.teamRibbon.tabTeam.Visible = !this.InProtectedView();
        }