예제 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            PairModel pm = new PairModel()
            {
                rates = new Rates()
            };

            foreach (var p in pm.rates.GetType().GetProperties().OrderBy(x => x.Name))
            {
                PairsCbx.Items.Add(new ComboBoxItem()
                {
                    Content                  = p.Name,
                    VerticalAlignment        = VerticalAlignment.Center,
                    VerticalContentAlignment = VerticalAlignment.Center,
                    FontSize                 = 14
                });
            }
        }
예제 #2
0
        public static async Task <PairModel> GetPrices(string pair)
        {
            PairModel data = (await $"latest?base={pair}".JsonFromWeb()).FromJson <PairModel>();

            return(data);
        }