예제 #1
0
        public void StoreValues(Data data, string path)
        {
            Accounts.StoreValues(data, path + @"Accounts\");
            JobHistory.StoreValues(data, path + @"JobHistory\");

            for (int i = 0; i < PrinterMappings.Count; i++)
            {
                PrinterMapping tmp = PrinterMappings[i];
                tmp.StoreValues(data, @"" + path + @"PrinterMappings\" + i + @"\");
            }
            data.SetValue(@"" + path + @"PrinterMappings\numClasses", PrinterMappings.Count.ToString());

            RssFeed.StoreValues(data, path + @"RssFeed\");

            for (int i = 0; i < TitleReplacement.Count; i++)
            {
                TitleReplacement tmp = TitleReplacement[i];
                tmp.StoreValues(data, @"" + path + @"TitleReplacement\" + i + @"\");
            }
            data.SetValue(@"" + path + @"TitleReplacement\numClasses", TitleReplacement.Count.ToString());

            UsageStatistics.StoreValues(data, path + @"UsageStatistics\");
            data.SetValue(@"" + path + @"ConversionTimeout", ConversionTimeout.ToString(System.Globalization.CultureInfo.InvariantCulture));
            data.SetValue(@"" + path + @"EnableTips", EnableTips.ToString());
            data.SetValue(@"" + path + @"Language", Data.EscapeString(Language));
            data.SetValue(@"" + path + @"LicenseExpirationReminder", LicenseExpirationReminder.ToString("yyyy-MM-dd HH:mm:ss"));
            data.SetValue(@"" + path + @"LoggingLevel", LoggingLevel.ToString());
            data.SetValue(@"" + path + @"NextUpdate", NextUpdate.ToString("yyyy-MM-dd HH:mm:ss"));
            data.SetValue(@"" + path + @"UnitOfMeasurement", UnitOfMeasurement.ToString());
            data.SetValue(@"" + path + @"UpdateInterval", UpdateInterval.ToString());
        }
예제 #2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("NextUpdate=" + NextUpdate.ToString());
            sb.AppendLine("SettingsVersion=" + SettingsVersion.ToString());

            return(sb.ToString());
        }
예제 #3
0
 public void StoreValues(Data data, string path)
 {
     data.SetValue(@"" + path + @"NextUpdate", NextUpdate.ToString("yyyy-MM-dd HH:mm:ss"));
     data.SetValue(@"" + path + @"SettingsVersion", SettingsVersion.ToString(CultureInfo.InvariantCulture));
 }
예제 #4
0
        /// <summary>
        /// Save the General.Global.ShowInformationTypes settings to the settings file
        /// </summary>
        /// <param name="infoNode">XML-node for the General.Global.ShowInformationTypes settings</param>
        public void Save(XmlNode infoNode)
        {
            string xpath;

            xpath = "./officialStatistics";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, OfficialStatistics.ToString());

            xpath = "./unit";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Unit.ToString());

            xpath = "./contact";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Contact.ToString());

            xpath = "./lastUpdated";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, LastUpdated.ToString());

            xpath = "./refPeriod";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, RefPeriod.ToString());

            xpath = "./stockFA";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, StockFa.ToString());

            xpath = "./cfPrices";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, CFPrices.ToString());

            xpath = "./dayADj";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, DayAdj.ToString());

            xpath = "./seasAdj";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, SeasAdj.ToString());

            xpath = "./basePeriod";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, BasePeriod.ToString());

            xpath = "./updateFrequency";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, UpdateFrequency.ToString());

            xpath = "./nextUpdate";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, NextUpdate.ToString());

            xpath = "./survey";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Survey.ToString());

            xpath = "./link";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Link.ToString());

            xpath = "./creationDate";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, CreationDate.ToString());

            xpath = "./copyright";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Copyright.ToString());

            xpath = "./source";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Source.ToString());

            xpath = "./matrix";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Matrix.ToString());

            xpath = "./database";
            SettingsHelper.SetSettingAttributeValue(xpath, "enabled", infoNode, Database.ToString());
        }