protected void LoadSettings()
        {
            _isSettingsLoading = true;

            try
            {
                _viewData = DefaultViewData.Load(BrowserManager.GetViewData(_views, "Default"));
                var settings = _viewData.ExportNotesOptions;

                if (settings.Mode == ExportMode.Excel)
                {
                    rdbExcelExport.Checked = true;
                }
                else
                {
                    rdbXmlExport.Checked = true;
                }

                txtNumberOfLines.Value = settings.ExcelNumberOfLines;
                txtOutputFolder.Text   = settings.OutputFolder;

                if (settings.ExportCriteria == ExportCriteria.Positive)
                {
                    rdbExportPositive.Checked = true;
                }
                else if (settings.ExportCriteria == ExportCriteria.PositiveNegative)
                {
                    rdbExportPositiveOrNegative.Checked = true;
                }
                else
                {
                    rdbExportAll.Checked = true;
                }

                chkbExportDocumentsWithCategory.Checked = settings.ExportWithCategory;

                if (settings.Categories.Any())
                {
                    SetCategoriesChecked(categoryID => settings.Categories.Contains(categoryID));
                }
                else
                {
                    SetCategoriesChecked(true);
                }

                chkbHighlightMatches.Checked    = settings.ColorMatches;
                chkbIncludePrefixSuffix.Checked = settings.ColorMatches;

                if (String.IsNullOrEmpty(txtOutputFolder.Text))
                {
                    txtOutputFolder.Text = Path.Combine(Directory.GetCurrentDirectory(), "Data");
                }
            }
            finally
            {
                _isSettingsLoading = false;
            }
        }
示例#2
0
        protected void LoadData()
        {
            var json = BrowserManager.GetViewData(_views, "Default");

            _viewData = DefaultViewData.Load(json);
        }