示例#1
0
        public void updateAllWidgets(String selectedCountrySlug)
        {
            List <CountryInfo> countryInfoList = new List <CountryInfo>();
            CovidHelper        covidHelper     = new CovidHelper();

            countryInfoList = covidHelper.getCountryInfoList(selectedCountrySlug);
            TopBar_Panel.updateCountryInfo(countryInfoList.Last());
            updateCharts(countryInfoList);
        }
示例#2
0
文件: CovidVM.cs 项目: f0zzi/wpf5
        public async void MakeRequest()
        {
            Info info = await CovidHelper.GetInfo();

            Global = info.Global;
            Countries.Clear();
            foreach (var item in info.Countries)
            {
                Countries.Add(item);
            }
        }
示例#3
0
        public TopBar()
        {
            this.InitializeComponent();

            this.countryInfo = new CountryInfo();
            this.covidHelper = new CovidHelper();
            this.DataContext = this.countryInfo;
            countryList      = this.covidHelper.getCountries();
            List <Countries> orderedCountryList = countryList.OrderBy(o => o.country).ToList();

            foreach (Countries country in orderedCountryList)
            {
                ComboBox_Country.Items.Add(country.country);
            }
        }
示例#4
0
 public Chart()
 {
     this.InitializeComponent();
     covidHelper = new CovidHelper();
 }