Example #1
0
        public async Task ExecuteLoadItemsCommand()
        {
            IsBusy = true;

            try
            {
                Guilds.Clear();
                var guildsApiServises = new GuildApiServises();
                var guilds            = await guildsApiServises.SelectGuildsAsync();

                var sortedGuilds = from g in guilds
                                   orderby g.Topposition
                                   select g;
                foreach (var guild in sortedGuilds)
                {
                    Guilds.Add(guild);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Example #2
0
        private async Task RefreshGuilds()
        {
            GuildsName.Clear();
            Guilds.Clear();
            var guildApiServises = new GuildApiServises();
            var guilds           = await guildApiServises.SelectGuildsAsync();

            var sortedGuilds = from g in guilds
                               orderby g.Name
                               select g;

            foreach (var guild in sortedGuilds)
            {
                GuildsName.Add(guild.Name);
                Guilds.Add(guild);
            }
        }