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());
        }
Beispiel #2
0
 private void BirdDetails_Load(object sender, EventArgs e)
 {
     try
     {
         cmbUM.DataSource              = Enum.GetValues(typeof(UnitOfMeasurement));
         cmbUM.SelectedText            = Um.ToString();
         cmbSkeletonType.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         MessageBox.Show(@"Error:" + ex.Message);
     }
 }
Beispiel #3
0
        private string GetRequestUri(Coordinates coordinates, List <Exclude> excludes = null)
        {
            var excludeParts = excludes == null ? "" : String.Join(", ", excludes.ToArray()).ToLower();
            var units        = _unitOfMeasurement.ToString().ToLower();
            var uri          = $"https://api.openweathermap.org/data/2.5/onecall?" +
                               $"lat={coordinates.Latitude}&" +
                               $"lon={coordinates.Longitude}&" +
                               $"exclude={excludeParts}&" +
                               $"appid={_apiKey}&" +
                               $"units={units}&" +
                               $"lang={_language.LanguageCode}";

            return(uri);
        }