Ejemplo n.º 1
0
        private async Task Blitz(bool isImage)
        {
            Settings.TypeOfRepetition = TypeOfRepetitions.FourOptions;
            if (isImage)
            {
                var database = await DatabaseImages.GetDataNotLearned();

                if (database.Count == 0)
                {
                    Mvx.IoCProvider.Resolve <IMessageCore>().Toast(this["RepeatedAllImages"]);
                }
                else
                {
                    await NavigationService.Navigate <BlitzPollViewModel, List <DatabaseImages> >(database);
                }
            }
            else
            {
                var database = await DatabaseWords.GetDataNotLearned();

                if (database.Count == 0)
                {
                    Mvx.IoCProvider.Resolve <IMessageCore>().Toast(this["RepeatedAllWords"]);
                }
                else
                {
                    await NavigationService.Navigate <Languages.BlitzPollViewModel, List <DatabaseWords> >(database);
                }
            }
        }
Ejemplo n.º 2
0
        private async Task NavigateToLearn()
        {
            if (DatabaseImages.DatabaseIsContain($"{DataBase.TableName}"))
            {
                var database = await DatabaseImages.GetDataNotLearned();

                if (database.Count == 0)
                {
                    Mvx.IoCProvider.Resolve <IMessageCore>().Toast(this["RepeatedAllImages"]);
                }
                else
                {
                    await NavigationService.Navigate <LearnViewModel, List <DatabaseImages> >(database);
                }
            }
            else
            {
                var database = await DatabaseWords.GetDataNotLearned();

                if (database.Count == 0)
                {
                    Mvx.IoCProvider.Resolve <IMessageCore>().Toast(this["RepeatedAllWords"]);
                }
                else
                {
                    await NavigationService.Navigate <Languages.LearnViewModel, List <DatabaseWords> >(database);
                }
            }
        }