Exemple #1
0
 async void LoadData()
 {
     if (CaravanQuests == null)
     {
         CaravanQuests = (from item in (await MHDatabaseHelper.GetAllQuestsForHub("Caravan"))
                          group item by item.stars into questGroup
                          select new QuestHubGroup(questGroup)
         {
             Stars = questGroup.Key
         }).ToList();
     }
     if (GuildQuests == null)
     {
         GuildQuests = (from item in (await MHDatabaseHelper.GetAllQuestsForHub("Guild"))
                        group item by item.stars into questGroup
                        select new QuestHubGroup(questGroup)
         {
             Stars = questGroup.Key
         }).ToList();
     }
     if (EventQuests == null)
     {
         EventQuests = (from item in (await MHDatabaseHelper.GetAllQuestsForHub("Event"))
                        group item by item.stars into questGroup
                        select new QuestHubGroup(questGroup)
         {
             Stars = questGroup.Key
         }).ToList();
     }
 }