Ejemplo n.º 1
0
        async Task LoadLanguagesAsync()
        {
            if (_isLoadingLanguages)
            {
                return;
            }
            try
            {
                IsBusy = true;
                _isLoadingLanguages = true;

                var service  = new MiscServices();
                var request  = new BaseModel();
                var responce = await service.FetchAllLanguages(request);

                foreach (var language in responce.Languages)
                {
                    RequestLanguages.Add(language);
                }

                if (!_isRecentsApplied)
                {
                    ApplyRecentValues();
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                _isLoadingLanguages = false;
                IsBusy = false;
            }
        }
Ejemplo n.º 2
0
        async Task LoadLanguagesAsync()
        {
            try
            {
                var service  = new MiscServices();
                var request  = new BaseModel();
                var responce = await service.FetchAllLanguages(request);

                foreach (var language in responce.Languages)
                {
                    Languages.Add(language);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 3
0
        async Task LoadLanguagesAsync()
        {
            if (_isLoadingLanguages)
            {
                return;
            }
            try
            {
                IsBusy = true;
                _isLoadingLanguages = true;

                var service  = new MiscServices();
                var request  = new BaseModel();
                var responce = await service.FetchAllLanguages(request);

                foreach (var language in responce.Languages)
                {
                    RequestLanguages.Add(language);
                }

                if (!_isRecentsApplied)
                {
                    ApplyRecentValues();
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                SelectedClientLanguage = ClientLanguages[0];
                for (int i = 0; i < RequestLanguages.Count; i++)
                {
                    if (RequestLanguages[i].Name == "Spanish")
                    {
                        SelectedRequestLanguage = RequestLanguages[i];
                    }
                }
                _isLoadingLanguages = false;
                IsBusy = false;
            }
        }