Ejemplo n.º 1
0
        protected override void OnFileOperationsCompletion(FileOperationsResult fileOperationsResult)
        {
            base.OnFileOperationsCompletion(fileOperationsResult);

            UpdateReductionStats(fileOperationsResult.InputFileSize, fileOperationsResult.OutputFileSize, fileOperationsResult.ConvertedToPDF);

            string operationsCompletionMessage = LogMessagesUtils.GetFileReductionOperationsCompletionText(fileOperationsResult);

            if (FrameworkGlobals.ApplicationConfiguration.TimestampLogs)
            {
                operationsCompletionMessage = LogMessagesUtils.TimeStampLogMessage(operationsCompletionMessage);
            }

            _view.NotifyOperationCompletion(operationsCompletionMessage);

            if (FrameworkGlobals.ApplicationConfiguration.ExportLogs && !string.IsNullOrEmpty(FrameworkGlobals.ApplicationConfiguration.LogsPath))
            {
                FrameworkGlobals.LogsManager.LogMessage(operationsCompletionMessage);
            }

            if (!fileOperationsResult.ConvertedToPDF)
            {
                ((IPDFReducerCloudMainView)_view).NotifyReductionRatioChange(100 - _operationsStats.ReductionRatio);
            }
        }