/// <summary>
 /// 刷新数据源并加载到控件
 /// </summary>
 private void ReloadLocalMusicList()
 {
     if (Application.Current.IsRunningOutOfBrowser)
     {
         CommHelper.GetLocalMusicList();
         lbLocalMusicList.ItemsSource = CommHelper.LocalMusicInfos;
     }
     else
     {
         ucmDel.Show("请安装后再刷新!谢谢!");
         this.UpdateLayout();
     }
 }
예제 #2
0
        void MusicListPanel_Loaded(object sender, RoutedEventArgs e)
        {
            mebg.Source      = new Uri("/Res/Sound/jingle_result.wma", UriKind.Relative);
            mebg.AutoPlay    = _isStartPlay;
            mebg.MediaEnded += new RoutedEventHandler(me_MediaEnded_Replay);
            LayoutRoot.Children.Add(mebg);

            //默认音乐
            ReadMusicXML();
            lbMusicList.ItemsSource = MusicInfos;
            //本地录制歌曲
            if (CommHelper.LocalMusicInfos == null)
            {
                CommHelper.GetLocalMusicList();
            }
            lbLocalMusicList.ItemsSource = CommHelper.LocalMusicInfos;
        }
예제 #3
0
 private void btnUpdateList_Click(object sender, RoutedEventArgs e)
 {
     lbLocalMusicList.ItemsSource = CommHelper.GetLocalMusicList();
 }