예제 #1
0
        public async void Initialize()
        {
            
            PhraseViewModel.ButtonCommand = new Command(ProcessCommand);
            
            _random = new Random();

            if (CultureInfo.CurrentCulture.Name == "pt-BR")
            {
                var data = new DataAccess<PhrasesPtBr>();

                _list = await data.GetPhrases(Num);

            }
            else
            {
                var data = new DataAccess<Phrases>();

                _list = await data.GetPhrases(Num);
            }


            if (_list != null)
            {
                LoadPhrase();
            }
            else
            {
                throw new Exception("Error to load phrases from database");
            }
        }