Ejemplo n.º 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="tableNode">XML-node for the Presentation.Table settings</param>
        public TableSettings(XmlNode tableNode)
        {
            string  xpath;
            XmlNode node;

            xpath = "./tableTransformation";
            TableTransformation = SettingsHelper.GetSettingValue(xpath, tableNode, PCAxis.Web.Controls.TableTransformationType.NoTransformation);

            xpath         = "./defaultLayout";
            DefaultLayout = SettingsHelper.GetSettingValue(xpath, tableNode, PCAxis.Web.Controls.TableLayoutType.Layout1);

            xpath      = "./maxColumns";
            MaxColumns = SettingsHelper.GetSettingValue(xpath, tableNode, 50);

            xpath   = "./maxRows";
            MaxRows = SettingsHelper.GetSettingValue(xpath, tableNode, 10000);

            xpath        = "./titleVisible";
            TitleVisible = SettingsHelper.GetSettingValue(xpath, tableNode, true);

            xpath = "./useStickyHeaderFullscreen";
            UseStickyHeaderFullscreen = SettingsHelper.GetSettingValue(xpath, tableNode, true);

            xpath = "./attributes";
            node  = SettingsHelper.GetNode(tableNode, xpath);
            _attributeSettings = new AttributeSettings(node);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="menuNode">XML-node for the navigation flow settings</param>
        public NavigationSettings(XmlNode navigationNode)
        {
            string xpath;

            xpath = "./showNavigationFlow";
            ShowNavigationFlow = SettingsHelper.GetSettingValue(xpath, navigationNode, true);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="commandBarNode">XML-node for the Presentation.CommandBar settings</param>
        public CommandBarSettings(XmlNode commandBarNode)
        {
            string  xpath;
            XmlNode node;

            xpath    = "./viewMode";
            ViewMode = SettingsHelper.GetSettingValue(xpath, commandBarNode, PCAxis.Web.Controls.CommandBar.CommandBarViewMode.DropDown);

            xpath       = "./operations";
            node        = commandBarNode.SelectSingleNode(xpath);
            xpath       = ".//plugin";
            _operations = SettingsHelper.GetSettingValue(xpath, node);

            xpath = "./operationShortcuts";
            node  = commandBarNode.SelectSingleNode(xpath);
            xpath = ".//plugin";
            _operationShortcuts = SettingsHelper.GetSettingValue(xpath, node);

            xpath          = "./outputFormats";
            node           = commandBarNode.SelectSingleNode(xpath);
            xpath          = ".//outputFormat";
            _outputFormats = SettingsHelper.GetSettingValue(xpath, node);

            xpath = "./outputFormatShortcuts";
            node  = commandBarNode.SelectSingleNode(xpath);
            xpath = ".//outputFormat";
            _outputFormatShortcuts = SettingsHelper.GetSettingValue(xpath, node);

            xpath = "./presentationViews";
            //node = commandBarNode.SelectSingleNode(xpath);
            node  = SettingsHelper.GetNode(commandBarNode, xpath);
            xpath = ".//plugin";
            _presentationViews = SettingsHelper.GetSettingValue(xpath, node);

            xpath = "./presentationViewShortcuts";
            //node = commandBarNode.SelectSingleNode(xpath);
            node  = SettingsHelper.GetNode(commandBarNode, xpath);
            xpath = ".//plugin";
            _presentationViewShortcuts = SettingsHelper.GetSettingValue(xpath, node);

            xpath = "./commandBarShortcuts";
            node  = commandBarNode.SelectSingleNode(xpath);
            xpath = ".//plugin";
            _commandBarShortcuts = SettingsHelper.GetSettingValue(xpath, node);

            xpath             = "./operationButtons";
            node              = commandBarNode.SelectSingleNode(xpath);
            xpath             = ".//plugin";
            _operationButtons = SettingsHelper.GetSettingValue(xpath, node);

            xpath            = "./fileTypeButtons";
            node             = commandBarNode.SelectSingleNode(xpath);
            xpath            = ".//outputFormat";
            _fileTypeButtons = SettingsHelper.GetSettingValue(xpath, node);

            xpath = "./presentationViewButtons";
            node  = SettingsHelper.GetNode(commandBarNode, xpath);
            xpath = ".//plugin";
            _presentationViewButtons = SettingsHelper.GetSettingValue(xpath, node);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="apiNode">XML-node for the saved query settings</param>
        public SavedQuerySettings(XmlNode sqNode)
        {
            string xpath;

            xpath       = "./storageType";
            StorageType = SettingsHelper.GetSettingValue(xpath, sqNode, SavedQueryStorageType.File);

            xpath       = "./enableCache";
            EnableCache = SettingsHelper.GetSettingValue(xpath, sqNode, true);

            xpath     = "./cacheTime";
            CacheTime = SettingsHelper.GetSettingValue(xpath, sqNode, 2);

            xpath      = "./enableCORS";
            EnableCORS = SettingsHelper.GetSettingValue(xpath, sqNode, true);

            xpath           = "./showPeriodAndId";
            ShowPeriodAndId = SettingsHelper.GetSettingValue(xpath, sqNode, false);

            xpath = "./enableLimiterRequest";
            EnableLimitRequest = SettingsHelper.GetSettingValue(xpath, sqNode, true);

            xpath           = "./limiterRequests";
            LimiterRequests = SettingsHelper.GetSettingValue(xpath, sqNode, 10);

            xpath           = "./limiterTimespan";
            LimiterTimespan = SettingsHelper.GetSettingValue(xpath, sqNode, 10);

            xpath = "./limiterHttpHeaderName";
            LimiterHttpHeaderName = SettingsHelper.GetSettingValue(xpath, sqNode, "");
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="apiNode">XML-node for the background worker process settings</param>
        public BackgroundWorkerSettings(XmlNode node)
        {
            string xpath;

            xpath     = "./sleepTime";
            SleepTime = SettingsHelper.GetSettingValue(xpath, node, 3600);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="markingTipsNode">XML-node for the Selection.MarkingTips settings</param>
        public MarkingTipsSettings(XmlNode markingTipsNode)
        {
            string xpath;

            xpath           = "./showMarkingTips";
            ShowMarkingTips = SettingsHelper.GetSettingValue(xpath, markingTipsNode, true);

            //xpath = "./markingTipsUrl";
            //MarkingTipsUrl = SettingsHelper.GetSettingValue(xpath, markingTipsNode, "MarkingTips.aspx");
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="attributeNode">XML-node for the Attribute settings</param>
        public AttributeSettings(XmlNode attributeNode)
        {
            string xpath;

            xpath             = "./displayAttributes";
            DisplayAttributes = SettingsHelper.GetSettingValue(xpath, attributeNode, false);

            xpath = "./displayDefaultAttributes";
            DisplayDefaultAttributes = SettingsHelper.GetSettingValue(xpath, attributeNode, false);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="menuNode">XML-node for the Search index settings</param>
        public ProtectionSettings(XmlNode indexNode)
        {
            string xpath;

            xpath       = "./isProtected";
            IsProtected = SettingsHelper.GetSettingValue(xpath, indexNode, false);

            xpath = "./authorizationMethod";
            SetAuthorizationMethod(SettingsHelper.GetSettingValue(xpath, indexNode, ""));
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="menuNode">XML-node for the Menu settings</param>
        public MenuSettings(XmlNode menuNode)
        {
            string xpath;

            xpath    = "./menuMode";
            MenuMode = SettingsHelper.GetSettingValue(xpath, menuNode, MenuModeType.TreeViewWithFiles);

            xpath = "./numberOfValuesInDefaultView";
            NumberOfValuesInDefaultView = SettingsHelper.GetSettingValue(xpath, menuNode, 3);

            xpath    = "./showRoot";
            ShowRoot = SettingsHelper.GetSettingValue(xpath, menuNode, false);

            xpath     = "./expandAll";
            ExpandAll = SettingsHelper.GetSettingValue(xpath, menuNode, false);

            xpath       = "./sortByAlias";
            SortByAlias = SettingsHelper.GetSettingValue(xpath, menuNode, true);

            xpath          = "./showSelectLink";
            ShowSelectLink = SettingsHelper.GetSettingValue(xpath, menuNode, true);

            xpath        = "./viewLinkMode";
            ViewLinkMode = SettingsHelper.GetSettingValue(xpath, menuNode, MenuViewLinkModeType.DefaultValues);

            xpath            = "./showDownloadLink";
            ShowDownloadLink = SettingsHelper.GetSettingValue(xpath, menuNode, PCAxis.Web.Controls.DownloadLinkVisibilityType.ShowIfSmallFile);

            xpath            = "./showModifiedDate";
            ShowModifiedDate = SettingsHelper.GetSettingValue(xpath, menuNode, true);

            xpath           = "./showLastUpdated";
            ShowLastUpdated = SettingsHelper.GetSettingValue(xpath, menuNode, true);

            xpath        = "./showFileSize";
            ShowFileSize = SettingsHelper.GetSettingValue(xpath, menuNode, true);

            xpath             = "./showTableCategory";
            ShowTableCategory = SettingsHelper.GetSettingValue(xpath, menuNode, false);

            xpath = "./showTableUpdatedAfterPublish";
            ShowTableUpdatedAfterPublish = SettingsHelper.GetSettingValue(xpath, menuNode, false);

            xpath = "./showVariablesAndValues";
            ShowVariablesAndValues = SettingsHelper.GetSettingValue(xpath, menuNode, true);

            xpath           = "./metadataAsIcons";
            MetadataAsIcons = SettingsHelper.GetSettingValue(xpath, menuNode, true);

            xpath = "./showTextToMetadata";
            ShowTextToMetadata = SettingsHelper.GetSettingValue(xpath, menuNode, true);

            xpath = "./showMenuExplanation";
            ShowMenuExplanation = SettingsHelper.GetSettingValue(xpath, menuNode, true);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="siteNode">XML-node for the General.Site settings</param>
        public SiteSettings(XmlNode siteNode)
        {
            string xpath;

            //Load the Site settings
            xpath           = "./applicationName";
            ApplicationName = SettingsHelper.GetSettingValue(xpath, siteNode, "PX-Web");

            xpath    = "./logoPath";
            LogoPath = SettingsHelper.GetSettingValue(xpath, siteNode, "PX-WEb.gif");
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="fileFormatsNode">XML-node for the General.FileFormats settings</param>
        public FileFormatsSettings(XmlNode fileFormatsNode)
        {
            string  xpath;
            XmlNode node;

            xpath = "./cellLimitDownloads";
            CellLimitDownloads = SettingsHelper.GetSettingValue(xpath, fileFormatsNode, 10000);

            xpath          = "./excel";
            node           = fileFormatsNode.SelectSingleNode(xpath);
            _excelSettings = new ExcelSettings(node);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="hierarchiesNode">XML-node for the Selection.Hierarchies settings</param>
        public HierarchiesSettings(XmlNode hierarchiesNode)
        {
            string xpath;

            //XmlNode node;

            xpath           = "./showHierarchies";
            ShowHierarchies = SettingsHelper.GetSettingValue(xpath, hierarchiesNode, true);

            xpath = "./hierarchicalLevelsOpen";
            HierarchicalLevelsOpen = SettingsHelper.GetSettingValue(xpath, hierarchiesNode, 1);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="excelNode">XML-node for the General.FileFormats.Excel settings</param>
        public ExcelSettings(XmlNode excelNode)
        {
            string xpath;

            xpath            = "./informationLevel";
            InformationLevel = SettingsHelper.GetSettingValue(xpath, excelNode, PCAxis.Paxiom.InformationLevelType.AllInformation);

            xpath        = "./doubleColumn";
            DoubleColumn = SettingsHelper.GetSettingValue(xpath, excelNode, false);

            xpath         = "./showDataNotes";
            ShowDataNotes = SettingsHelper.GetSettingValue(xpath, excelNode, false);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="homepageNode">XML node for homepage information for a specific language</param>
        public HomepageSettings(XmlNode homepageNode)
        {
            string xpath;

            xpath    = "./language";
            Language = SettingsHelper.GetSettingValue(xpath, homepageNode, "");

            xpath = "./url";
            Url   = SettingsHelper.GetSettingValue(xpath, homepageNode, "~/Default.aspx");

            xpath      = "./isExternal";
            IsExternal = SettingsHelper.GetSettingValue(xpath, homepageNode, false);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="fontsNode">XML-node for the Charts font settings</param>
        public ChartFontSettings(XmlNode fontNode)
        {
            string xpath;

            xpath = "./name";
            Name  = SettingsHelper.GetSettingValue(xpath, fontNode, "Verdana");

            xpath     = "./titleSize";
            TitleSize = SettingsHelper.GetSettingValue(xpath, fontNode, 18);

            xpath    = "./axisSize";
            AxisSize = SettingsHelper.GetSettingValue(xpath, fontNode, 12);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="fontsNode">XML-node for the Charts legend settings</param>
        public ChartLegendSettings(XmlNode legendNode)
        {
            string xpath;

            xpath   = "./visible";
            Visible = SettingsHelper.GetSettingValue(xpath, legendNode, true);

            xpath    = "./fontSize";
            FontSize = SettingsHelper.GetSettingValue(xpath, legendNode, 12);

            xpath  = "./height";
            Height = SettingsHelper.GetSettingValue(xpath, legendNode, 20);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="menuNode">XML-node for the Search settings</param>
        public SearchSettings(XmlNode searchNode)
        {
            string xpath;

            xpath     = "./cacheTime";
            CacheTime = SettingsHelper.GetSettingValue(xpath, searchNode, 60);

            xpath            = "./resultListLength";
            ResultListLength = SettingsHelper.GetSettingValue(xpath, searchNode, 250);

            xpath           = "./defaultOperator";
            DefaultOperator = SettingsHelper.GetSettingValue(xpath, searchNode, PCAxis.Search.DefaultOperator.OR);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="fontsNode">XML-node for the Charts guidelines settings</param>
        public ChartGuidelinesSettings(XmlNode guidelineNode)
        {
            string xpath;

            xpath = "./color";
            Color = SettingsHelper.GetSettingValue(xpath, guidelineNode, "#AAAAAA");

            xpath      = "./horizontal";
            Horizontal = SettingsHelper.GetSettingValue(xpath, guidelineNode, true);

            xpath    = "./vertical";
            Vertical = SettingsHelper.GetSettingValue(xpath, guidelineNode, false);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="siteNode">XML-node for the General.Site settings</param>
        public SiteSettings(XmlNode siteNode)
        {
            string xpath;

            //Load the Site settings
            xpath           = "./applicationName";
            ApplicationName = SettingsHelper.GetSettingValue(xpath, siteNode, "PxWeb");

            xpath    = "./logoPath";
            LogoPath = SettingsHelper.GetSettingValue(xpath, siteNode, "PX-WEb.gif");

            xpath = "./mainHeaderForTables";
            MainHeaderForTables = SettingsHelper.GetSettingValue(xpath, siteNode, MainHeaderForTablesType.TableName);
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="fileFormatsNode">XML-node for the General.FileFormats settings</param>
        public FileFormatsSettings(XmlNode fileFormatsNode)
        {
            string  xpath;
            XmlNode node;

            xpath = "./cellLimitDownloads";
            CellLimitDownloads = SettingsHelper.GetSettingValue(xpath, fileFormatsNode, 10000);

            xpath        = "./fileBaseName";
            FileBaseName = SettingsHelper.GetSettingValue(xpath, fileFormatsNode, PCAxis.Paxiom.FileBaseNameType.Matrix);

            xpath          = "./excel";
            node           = fileFormatsNode.SelectSingleNode(xpath);
            _excelSettings = new ExcelSettings(node);
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="menuNode">XML-node for the Search index settings</param>
        public SearchIndexSettings(XmlNode indexNode)
        {
            string xpath;

            _logger = log4net.LogManager.GetLogger(typeof(SearchIndexSettings));

            xpath  = "./status";
            Status = SettingsHelper.GetSettingValue(xpath, indexNode, SearchIndexStatusType.NotIndexed);

            xpath        = "./indexUpdated";
            IndexUpdated = SettingsHelper.GetSettingValue(xpath, indexNode, "");

            xpath = "./updateMethod";
            SetUpdateMethod(SettingsHelper.GetSettingValue(xpath, indexNode, ""));
        }
Ejemplo n.º 22
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="metadataNode">XML-node for the metadata settings</param>
        public MetadataSettings(XmlNode metadataNode)
        {
            string xpath;

            _logger = log4net.LogManager.GetLogger(typeof(SearchIndexSettings));

            xpath       = "./useMetadata";
            UseMetadata = SettingsHelper.GetSettingValue(xpath, metadataNode, false);

            xpath = "./metaSystemConfigFile";
            MetaSystemConfigFile = SettingsHelper.GetSettingValue(xpath, metadataNode, "");

            xpath = "./metaLinkMethod";
            SetMetaLinkMethod(SettingsHelper.GetSettingValue(xpath, metadataNode, ""));
        }
Ejemplo n.º 23
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="modulesNode">XML-node for the General.Modules settings</param>
        public ModulesSettings(XmlNode modulesNode)
        {
            string xpath;

            //XmlNode node;

            xpath     = "./showLogin";
            ShowLogin = SettingsHelper.GetSettingValue(xpath, modulesNode, false);

            xpath        = "./usageLogging";
            UsageLogging = SettingsHelper.GetSettingValue(xpath, modulesNode, false);

            xpath        = "./savedQueries";
            SavedQueries = SettingsHelper.GetSettingValue(xpath, modulesNode, false);
        }
Ejemplo n.º 24
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="presentationNode">XML-node for the Presentation settings</param>
        public PresentationSettings(XmlNode presentationNode)
        {
            string  xpath;
            XmlNode node;

            xpath = "./promptMandatoryFootnotes";
            PromptMandatoryFootnotes = SettingsHelper.GetSettingValue(xpath, presentationNode, true);

            xpath          = "./table";
            node           = presentationNode.SelectSingleNode(xpath);
            _tableSettings = new TableSettings(node);

            xpath = "./commandBar";
            node  = presentationNode.SelectSingleNode(xpath);
            _commandBarSettings = new CommandBarSettings(node);
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="pathsNode">XML-node for the General.Paths settings</param>
        public PathsSettings(XmlNode pathsNode)
        {
            string xpath;

            xpath         = "./languagesPath";
            LanguagesPath = SettingsHelper.GetSettingValue(xpath, pathsNode, "~/Resources/Languages");

            xpath      = "./imagesPath";
            ImagesPath = SettingsHelper.GetSettingValue(xpath, pathsNode, "~/Resources/Images/");

            xpath           = "./pxDatabasesPath";
            PxDatabasesPath = SettingsHelper.GetSettingValue(xpath, pathsNode, "~/Resources/PX/Databases/");

            xpath = "./pxAggreagationsPath";
            PxAggregationsPath = SettingsHelper.GetSettingValue(xpath, pathsNode, "~/Resources/PX/Aggregations/");
        }
Ejemplo n.º 26
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="databasesNode">XML-node for the General.Administration settings</param>
        public AdministrationSettings(XmlNode administrationNode)
        {
            string  xpath;
            XmlNode node;

            //XmlNodeList nodeList;

            _logger = log4net.LogManager.GetLogger(typeof(AdministrationSettings));

            xpath       = "./useIPFilter";
            UseIPFilter = SettingsHelper.GetSettingValue(xpath, administrationNode, true);

            xpath        = "./ipAddresses";
            node         = administrationNode.SelectSingleNode(xpath);
            xpath        = ".//ipAddress";
            _ipAddresses = SettingsHelper.GetSettingValue(xpath, node);
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="apiNode">XML-node for the API settings</param>
        public ApiSettings(XmlNode apiNode)
        {
            string xpath;

            xpath   = "./urlRoot";
            UrlRoot = SettingsHelper.GetSettingValue(xpath, apiNode, "");

            xpath       = "./routePrefix";
            RoutePrefix = SettingsHelper.GetSettingValue(xpath, apiNode, "api/v1/");

            xpath             = "./maxValuesReturned";
            MaxValuesReturned = SettingsHelper.GetSettingValue(xpath, apiNode, 1000);

            xpath           = "./limiterRequests";
            LimiterRequests = SettingsHelper.GetSettingValue(xpath, apiNode, 10);

            xpath           = "./limiterTimespan";
            LimiterTimespan = SettingsHelper.GetSettingValue(xpath, apiNode, 10);

            xpath          = "./fetchCellLimit";
            FetchCellLimit = SettingsHelper.GetSettingValue(xpath, apiNode, 100000);

            xpath      = "./enableCORS";
            EnableCORS = SettingsHelper.GetSettingValue(xpath, apiNode, true);

            xpath       = "./enableCache";
            EnableCache = SettingsHelper.GetSettingValue(xpath, apiNode, true);

            xpath = "./showQueryInformation";
            ShowQueryInformation = SettingsHelper.GetSettingValue(xpath, apiNode, true);

            xpath   = "./infoURL";
            InfoURL = SettingsHelper.GetSettingValue(xpath, apiNode, "");

            xpath = "./defaultExampleResponseFormat";
            DefaultExampleResponseFormat = SettingsHelper.GetSettingValue(xpath, apiNode, "px");

            xpath = "./showSaveApiQueryButton";
            ShowSaveApiQueryButton = SettingsHelper.GetSettingValue(xpath, apiNode, false);

            xpath            = "./saveApiQueryText";
            SaveApiQueryText = SettingsHelper.GetSettingValue(xpath, apiNode, string.Empty);
        }
Ejemplo n.º 28
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="databasesNode">XML-node for the General.Databases settings</param>
        public DatabasesSettings(XmlNode databasesNode)
        {
            string  xpath;
            XmlNode node;

            _logger = log4net.LogManager.GetLogger(typeof(DatabasesSettings));

            _pxDatabases = new List <string>();
            xpath        = "./pxDatabases";
            node         = databasesNode.SelectSingleNode(xpath);
            xpath        = ".//database";
            _pxDatabases = SettingsHelper.GetSettingValue(xpath, node);


            _cnmmDatabases = new List <string>();
            xpath          = "./cnmmDatabases";
            node           = databasesNode.SelectSingleNode(xpath);
            xpath          = ".//database";
            _cnmmDatabases = SettingsHelper.GetSettingValue(xpath, node);
        }
Ejemplo n.º 29
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="databasesNode">XML-node for the Features.General settings</param>
        public FeaturesGeneralSettings(XmlNode featuresGeneralNode)
        {
            string xpath;

            xpath                   = "./chartsEnabled";
            ChartsEnabled           = SettingsHelper.GetSettingValue(xpath, featuresGeneralNode, true);
            xpath                   = "./apiEnabled";
            ApiEnabled              = SettingsHelper.GetSettingValue(xpath, featuresGeneralNode, false);
            xpath                   = "./saveQueryEnabled";
            SavedQueryEnabled       = SettingsHelper.GetSettingValue(xpath, featuresGeneralNode, false);
            xpath                   = "./userFriendlyUrlsEnabled";
            UserFriendlyUrlsEnabled = SettingsHelper.GetSettingValue(xpath, featuresGeneralNode, false);
            xpath                   = "./userStatisticsEnabled";
            UserStatisticsEnabled   = SettingsHelper.GetSettingValue(xpath, featuresGeneralNode, false);
            xpath                   = "./searchEnabled";
            SearchEnabled           = SettingsHelper.GetSettingValue(xpath, featuresGeneralNode, false);
            xpath                   = "./backgroundWorkerEnabled";
            BackgroundWorkerEnabled = SettingsHelper.GetSettingValue(xpath, featuresGeneralNode, false);
            xpath                   = "./clearCache";
            ClearCache              = SettingsHelper.GetSettingValue(xpath, featuresGeneralNode, "");
        }
Ejemplo n.º 30
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="languageNode">XML-node for General.Languages´.Language settings</param>
        public LanguageSettings(XmlNode languageNode)
        {
            string xpath;

            PCAxis.Paxiom.Settings.LocaleSettings defaultValues;

            // Load the Language settings

            // Name
            xpath = "./name";
            Name  = SettingsHelper.GetSettingValue(xpath, languageNode, "");

            if (Name.Length > 0)
            {
                // Get default values for this language
                defaultValues = PCAxis.Paxiom.Settings.GetLocale(Name);

                // Default language
                xpath           = "./default";
                DefaultLanguage = SettingsHelper.GetSettingValue(xpath, languageNode, false);

                // Decimal separator
                xpath            = "./decimalSeparator";
                DecimalSeparator = SettingsHelper.GetSettingValue(xpath, languageNode, defaultValues.DecimalSeparator);
                DecimalSeparator = DecodeDecimalSeparator(DecimalSeparator);

                // Thousand separator
                xpath             = "./thousandSeparator";
                ThousandSeparator = SettingsHelper.GetSettingValue(xpath, languageNode, defaultValues.ThousandSeparator);
                ThousandSeparator = DecodeThousandSeparator(ThousandSeparator);

                // Date format
                xpath      = "./dateFormat";
                DateFormat = SettingsHelper.GetSettingValue(xpath, languageNode, defaultValues.DateFormat);
            }
        }