Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 private ToppingSingleton()
 {
     if (Toppings == null)
     {
         Toppings = _fileRepo.ReadFromFile <List <AComponent> >(_path);
     }
 }
Ejemplo n.º 2
0
        private async void SetCountrys()
        {
            ObservableCollection <string> countrys = new ObservableCollection <string>();

            selectedCountry = FileRepo.ReadFromFile(FileRepo.FAV_COUNTRY)[0];
            f_code_left     = selectedCountry.Substring(selectedCountry.Length - 4, 3);

            //teams = await DataLayer
            //     .Data
            //     .GetTeams();
            teams = await Data.GetCountries("https://worldcup.sfg.io/teams/results");

            teams.Sort((x, y) => x.CountryName.CompareTo(y.CountryName));
            teams.ForEach(team => countrys.Add($"{team.CountryName.ToUpper()}  ({team.FifaCode})"));

            cbFavRep.ItemsSource   = countrys;
            cbFavRep.SelectedValue = selectedCountry;
        }