コード例 #1
0
        /// <summary>
        /// 打开视频文件
        /// </summary>
        public void OpenVideoAudioFile(string uri)
        {
            try
            {
                MediaPlayerView mediaPlayerView = new MediaPlayerView(uri);
                mediaPlayerView.OpenVideo(uri);

                mediaPlayerView.Title = Path.GetFileNameWithoutExtension(uri);
                //加载UI事件(比如多媒体播放器)
                this.book_LoadUI(mediaPlayerView);
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
コード例 #2
0
 /// <summary>
 /// 打开视频文件
 /// </summary>
 public void OpenVideoAudioFile(string uri)
 {
     try
     {
         if (this.mediaPlayerView == null)
         {
             this.mediaPlayerView = new MediaPlayerView(uri);
         }
         else
         {
             this.mediaPlayerView.OpenVideo(uri);
         }
         //加载UI事件(比如多媒体播放器)
         this.book_LoadUI(this.mediaPlayerView);
     }
     catch (Exception ex)
     {
         LogManage.WriteLog(this.GetType(), ex);
     }
 }