예제 #1
0
        public static CovidData sendItemData()
        {
            const string Url  = "https://api.covid19api.com/summary";
            string       json = downloadJsonString(Url);

            CovidData item = JsonConvert.DeserializeObject <CovidData>(json);

            return(item);
        }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();

            rowGrid = new List <GridCustomRow>();
            rowGrid.Clear();

            covidData = new CovidData();
            covidData = JsonOperation.sendItemData();

            var item = from u in covidData.Countries
                       orderby u.TotalConfirmed descending
                       select u;

            updateGrid(item.ToList());
            updateHeader(covidData.Global);
        }