Exemplo n.º 1
0
        private string GetResultFromFirstItem(Media_Files item)
        {
            string Title = item.Title;
            string FileName = item.FileName;
            string FileUrl =  item.FileUrl;
            string  Photo =  item.Photo;
            string  Thumbnail=  item.Thumbnail;
            string thumnail_path = string.Empty, video_url=string.Empty;

            if (Thumbnail != string.Empty)
                thumnail_path = baseUrl + "/" + upload_media_image_dir + "/thumbnails/" + Thumbnail;
            else
                thumnail_path = baseUrl + "/images/no_image.jpg";      

             if (FileName != string.Empty)
                    video_url = baseUrl + "/" + upload_video_dir + "/" + FileName;
                else
                    video_url = "Không tìm thấy file trên hệ thống";       


            string firstItem = "<a title=\"" + Title + "\" class=\"title\">" + Title + "</a>"
                           + "<div id=\"play-box\">"
                           + "	<embed height=\"180\" width=\"300\" flashvars=\"width=300&amp;height=180&amp;file=" + video_url
                                       + "&amp;image=" + thumnail_path + "\" wmode=\"transparent\" allowfullscreen=\"true\" allowscriptaccess=\"always\" quality=\"high\" name=\"MediaPlayer\" id=\"MediaPlayer\""
                                       + " src=\"" + media_player_path + "\" type=\"application/x-shockwave-flash\">"
                           + "</div>";    
            return firstItem;
        }
Exemplo n.º 2
0
        private string GetResultFromOtherItem(Media_Files item)
        {
            string otherItems = string.Empty, photo_path = string.Empty, thumnail_path = string.Empty, video_url = string.Empty;            
           
            if (item.FileName != string.Empty)
                video_url = baseUrl + "/" + upload_video_dir + "/" + item.FileName;
            else
                video_url = "Không tìm thấy file trên hệ thống";    

            if (item.Photo != string.Empty)
                photo_path = baseUrl + "/" + upload_media_image_dir + "/photo/" + item.Photo;
            else
                photo_path = baseUrl + "/images/no_image.jpg";

            if (item.Thumbnail != string.Empty)
                thumnail_path = baseUrl + "/" + upload_media_image_dir + "/thumbnails/" + item.Thumbnail;
            else
                thumnail_path = baseUrl + "/images/no_image.jpg";  

            otherItems = "<a onclick=\"playVideo('" + photo_path + "','" + video_url + "','" + item.Title + "')\" href=\"javascript:;\" title=\"" + item.Title + "\">"
                    + "<img alt=\"" + item.Title + "\" src=\"" + thumnail_path + "\">"
                    + "</a>";
            return otherItems;
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Media_Files EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMedia_Files(Media_Files media_Files)
 {
     base.AddObject("Media_Files", media_Files);
 }
 /// <summary>
 /// Create a new Media_Files object.
 /// </summary>
 /// <param name="fileId">Initial value of the FileId property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 /// <param name="iPLog">Initial value of the IPLog property.</param>
 public static Media_Files CreateMedia_Files(global::System.Int32 fileId, global::System.String title, global::System.String iPLog)
 {
     Media_Files media_Files = new Media_Files();
     media_Files.FileId = fileId;
     media_Files.Title = title;
     media_Files.IPLog = iPLog;
     return media_Files;
 }