示例#1
0
        private async Task GetDate()
        {
            var isContain = DatabaseImages.DatabaseIsContain($"{DataBase.TableName}");

            LightColor         = isContain ? Colors.Orange : Colors.Blue;
            DarkColor          = isContain ? Colors.DarkOrange : Colors.DarkBlue;
            DataTupe           = isContain ? $"{DataBase.TableName}" : "Words";
            StatisticsDatabase = isContain
                ? await DBStatistics.GetImages($"{DataBase.TableName}")
                : await DBStatistics.GetWords($"{DataBase.TableName}");
        }
 public DictionaryLanguageViewModel()
 {
     Task.Run(async() =>
     {
         Home             = await DBStatistics.GetWords($"{TableNamesLanguage.Home}");
         Education        = await DBStatistics.GetWords($"{TableNamesLanguage.Education}");
         PopularWords     = await DBStatistics.GetWords($"{TableNamesLanguage.Popular_Words}");
         ThreeFormsOfVerb = await DBStatistics.GetWords($"{TableNamesLanguage.ThreeFormsOfVerb}");
         ComputerScience  = await DBStatistics.GetWords($"{TableNamesLanguage.ComputerScience}");
         Nature           = await DBStatistics.GetWords($"{TableNamesLanguage.Nature}");
         MyDirectly       = await DBStatistics.GetWords($"{TableNamesLanguage.My_Directly}");
     }).Wait();
 }
示例#3
0
 public GeneralStatisticsViewModel()
 {
     Task.Run(async() =>
     {
         Database      = await DBStatistics.GetData($"{DataBase.TableName}");
         var isContain = DatabaseImages.DatabaseIsContain($"{DataBase.TableName}");
         DatabaseStats = isContain
             ? await DBStatistics.GetImages($"{DataBase.TableName}")
             : await DBStatistics.GetWords($"{DataBase.TableName}");
         _avgTrueToday = await DBStatistics.AverageTrueToday($"{DataBase.TableName}");
         _avgTrueMonth = await DBStatistics.AverageTrueMonth($"{DataBase.TableName}");
         _avgTrue      = await DBStatistics.AveragePercentTrue(Database);
     }).Wait();
 }