Esempio n. 1
0
        private async void ChangeGerneCommandExecute(object obj)
        {
            RankCollection.Clear();

            RankCollection.Add(new RankList()
            {
                singer = "로딩중",
            });

            string type   = obj.ToString();
            var    result = await serivce.GetRankFromUrl(type);



            if (result != null)
            {
                RankCollection.Clear();

                foreach (var i in result)
                {
                    string[] values = i.Value.Split(new string[] { "<divided>" }, StringSplitOptions.None);

                    RankCollection.Add(new RankList()
                    {
                        rank          = i.Key + 1,
                        singer        = values[0],
                        song          = values[1],
                        SearchCommand = this.SearchCommand
                    });
                }
            }

            else
            {
                DependencyService.Get <IMessageToast>().Alert("연결 오류");
            }
        }