示例#1
0
        private static void LoadAppSettingsItems()
        {
            // Use both operations now
            var selectedOperations = new List <string>
            {
                AppSettingsConstants.OperationTypeConvertPdf,
                AppSettingsConstants.OperationTypePageCount
            };

            AppSettingsItems = new Dictionary <string, object>
            {
                { AppSettingsConstants.Source, AppSettingsConstants.InputSource.Directory },
                { AppSettingsConstants.SelectedOperations, selectedOperations },
                { AppSettingsConstants.FileTypeForConvertToPdf, InfoConstants.DocImageBoth },

                { AppSettingsConstants.InputPath, AppConfigReader.GetInputPath() },
                { AppSettingsConstants.RootOutputPath, AppConfigReader.GetRootOutputPath() },
                { AppSettingsConstants.RootLogPath, AppConfigReader.GetRootLogPath() },
                { AppSettingsConstants.OutputPath, "" },
                { AppSettingsConstants.LogPath, "" },

                { AppSettingsConstants.EnableCombinedLogAndReport, AppConfigReader.EnableCombinedLogAndReport() },
                { AppSettingsConstants.CombinedOutputPath, AppConfigReader.GetCombinedOutputPath() },
                { AppSettingsConstants.CombinedSummaryLogPath, AppConfigReader.GetCombinedSummaryLogPath() },
                { AppSettingsConstants.CombinedErrorLogPath, AppConfigReader.GetCombinedErrorLogPath() },

                { AppSettingsConstants.LogUpdateTimeInSec, AppConfigReader.GetLogUpdateTime() }
            };
        }
示例#2
0
        private static void LoadAppSettingsItems()
        {
            var inputSource          = string.Empty;
            var selectedOperations   = new List <string>();
            var fileTypeToConvertPdf = string.Empty;

            AppWindow.Dispatcher?.Invoke(() =>
            {
                fileTypeToConvertPdf = InfoConstants.AllButPdf;
                inputSource          = AppWindow.ComboBoxInputSource.SelectedValue.ToString();
                selectedOperations   = FormControlHelper.ConvertToList(AppWindow.ListBoxRight.Items.SourceCollection,
                                                                       AppSettingsConstants.OperationTypesExecutionSequence);
            });

            AppSettingsItems = new Dictionary <string, object>
            {
                { AppSettingsConstants.Source, inputSource },
                { AppSettingsConstants.SelectedOperations, selectedOperations },
                { AppSettingsConstants.FileTypeForConvertToPdf, fileTypeToConvertPdf },

                { AppSettingsConstants.InputPath, AppConfigReader.GetInputPath() },
                { AppSettingsConstants.RootOutputPath, AppConfigReader.GetRootOutputPath() },
                { AppSettingsConstants.RootLogPath, AppConfigReader.GetRootLogPath() },
                { AppSettingsConstants.OutputPath, "" },
                { AppSettingsConstants.LogPath, "" },

                { AppSettingsConstants.EnableCombinedLogAndReport, AppConfigReader.EnableCombinedLogAndReport() },
                { AppSettingsConstants.CombinedOutputPath, AppConfigReader.GetCombinedOutputPath() },
                { AppSettingsConstants.CombinedSummaryLogPath, AppConfigReader.GetCombinedSummaryLogPath() },
                { AppSettingsConstants.CombinedErrorLogPath, AppConfigReader.GetCombinedErrorLogPath() },

                { AppSettingsConstants.LogUpdateTimeInSec, AppConfigReader.GetLogUpdateTime() }
            };
        }