Esempio n. 1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            SoonZik.Models.Music elem = e.Parameter as SoonZik.Models.Music;
            DataContext = new MusicViewModel(elem.id);
            media.Source = new Uri("http://api.lvh.me:3000/musics/get/" + elem.id.ToString(), UriKind.RelativeOrAbsolute);

            //music_id.Text = elem.id.ToString();
            ////music_artist.Text = elem.user.username;
            //music_title.Text = elem.title;
            //music_price.Text = Math.Round(elem.price, 3).ToString();
            //music_note.Text = elem.getAverageNote.ToString();
            //music_duration.Text = TimeSpan.FromSeconds(elem.duration).ToString();

            //string request_elem = "/musics/" + elem.id.ToString();

            //// To get comment list
            //var comments = new CommentViewModel(request_elem);
            //comment_lv.ItemsSource = comments.commentlist;
        }
Esempio n. 2
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     SoonZik.Models.Music elem = e.Parameter as SoonZik.Models.Music;
     DataContext = new MusicViewModel(elem.id);
     media.Source = new Uri("http://api.lvh.me:3000/musics/get/" + elem.id.ToString() + "?user_id=" + Singleton.Instance.Current_user.id.ToString() + "&secureKey=" + Singleton.Instance.secureKey , UriKind.RelativeOrAbsolute);
 }