示例#1
0
        //Felhasználja a TranslateService szolgáltatásait, lekéri a viewmodelbe a nyelveket, majd feltölti a comboboxot a nyelvekkel.
        public async void getLangs()
        {
            var service           = new TranslateService();
            var languagesFromJson = await service.GetLanguagesAsync();

            if (languagesFromJson != null)
            {
                //Languages lg = new Languages();
                lg.LanguagePairs = languagesFromJson;

                lg.makeList();
                foreach (KeyValuePair <string, List <string> > entry in lg.languageMap)
                {
                    // Debug.WriteLine("meste: " + entry.Key);
                    Languages.Add(entry.Key);
                }
                selectedLanguage = Languages[0];

                foreach (string item in lg.languageMap[selectedLanguage])
                {
                    LanguagesToSelectedLanguage.Add(item);
                }
            }
        }