Beispiel #1
0
        /// <summary>
        /// Process an Operation
        /// </summary>
        private void ProcessPostOperations()
        {
            //Process Pre Operations
            // Get the necessary objects.
            var config = SyncServiceFactory.GetService <IConfigurationService>().GetConfiguration(Document);
            // Create Report helper
            var operation        = config.ConfigurationTest.GetPostOperationsForTestSpecification();
            var testReportHelper = new TestReportHelper(TestAdapter, testReportOperation, config, CancellationPending);

            testReportHelper.ProcessOperations(operation);
            testReportOperation.UndoPreparationsDocumentForLongTermOperation();
        }
        /// <summary>
        /// Occurs when the background operation has completed, has been canceled, or has raised an exception.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">A <see cref="RunWorkerCompletedEventArgs"/> that contains the event data.</param>
        private void ImportFinished(object sender, RunWorkerCompletedEventArgs e)
        {
            e.Error.NotifyIfException("Failed to import work items.");

            IsImporting = false;
            var progressService = SyncServiceFactory.GetService <IProgressService>();

            progressService.HideProgress();
            _importTestReport.UndoPreparationsDocumentForLongTermOperation();
            // enable all other functionality
            if (WordRibbon != null)
            {
                WordRibbon.EnableAllControls(DocumentModel);
            }

            SyncServiceTrace.I(Resources.ImportFinished);
        }