/// <summary>
 /// 获取更新数据
 /// </summary>
 public void GetData()
 {
     foreach (SeatManage.ClassModel.PlaylistItemInfo item in PlaylistModel.MediaPlayList)
     {
         SeatManage.Bll.FileOperate fileDownload = new SeatManage.Bll.FileOperate();
         string filePath = string.Format(@"{0}temp\{1}", AppDomain.CurrentDomain.BaseDirectory, item.MediaFileName.Split('_')[1]);
         if (fileDownload.FileDownLoad(filePath, item.MediaFileName, SeatManage.EnumType.SeatManageSubsystem.PlaylistAd))
         {
             VideoItems.Add(GetNewItme(filePath));
         }
     }
 }
Пример #2
0
 /// <summary>
 /// 获取更新数据
 /// </summary>
 public void GetData()
 {
     foreach (AMS.Model.PlaylistItemInfo item in PlaylistModel.MediaPlayList)
     {
         if (!Directory.Exists(string.Format(@"{0}temp", AppDomain.CurrentDomain.BaseDirectory)))
         {
             Directory.CreateDirectory(string.Format(@"{0}temp", AppDomain.CurrentDomain.BaseDirectory));
         }
         AMS.ServiceProxy.FileOperate fileDownload = new AMS.ServiceProxy.FileOperate();
         string filePath = string.Format(@"{0}temp\{1}", AppDomain.CurrentDomain.BaseDirectory, item.MediaFileName.Split('_')[1]);
         if (fileDownload.FileDownLoad(filePath, item.MediaFileName, SeatManage.EnumType.SeatManageSubsystem.PlaylistAd) == "")
         {
             VideoItems.Add(GetNewItme(filePath));
         }
     }
 }
Пример #3
0
        public static VideoItems GetVideoSources(string path)
        {
            var        pattern    = ".avi|.mp4|.mov|.rmvb|.wmv|.flv|.f4v|.vob|.mpg|.mkv|.3gp|.rm";
            var        sourceList = FileHelper.FindFiles(path, pattern);
            VideoItems items      = new VideoItems();

            if (items != null)
            {
                foreach (var v in sourceList)
                {
                    items.Add(new VideoItem {
                        Path = v
                    });
                }
            }
            return(items);
        }
Пример #4
0
        protected override void OnInitialized()
        {
            var video1 = new VideoDto
            {
                Title       = "Tyranny",
                Description = "This is a wider card with supporting text below as a natural lead-in to additional content.",
                Date        = new DateTime(2020, 12, 12),
                ImageSource = "",
                Link        = "https://www.youtube.com/watch?v=0HU1rMDGyB8&t=202s"
            };

            var video2 = new VideoDto
            {
                Title       = "Nerium",
                Description = "This is a wider card with supporting text below as a natural lead-in to additional content.This is a wider card with supporting text below as a natural lead-in to additional content",
                Date        = new DateTime(2020, 12, 12),
                ImageSource = @"img\Eka logo.jpeg",
                Link        = "https://www.youtube.com/watch?v=BL2NHqc74sQ&ab_channel=NERIUMOFFICIALNERIUMOFFICIAL"
            };

            var video3 = new VideoDto
            {
                Title       = "Whiskey Blues",
                Description = "This is a wider card with supporting text below as a natural lead-in to additional content.",
                Date        = new DateTime(2020, 12, 12),
                ImageSource = @"img\tattoo\leon.jpeg",
                Link        = "https://www.youtube.com/watch?v=f5jGX9A6ErA&ab_channel=JAZZ%26BLUESJAZZ%26BLUES"
            };

            var video4 = new VideoDto
            {
                Title       = "Bra vs Ger",
                Description = "This is a wider card with supporting text below as a natural lead-in to additional content.",
                Date        = new DateTime(2020, 12, 12),
                ImageSource = @"img\Eka logo.jpeg",
                Link        = "https://www.youtube.com/watch?v=m3HZKHTLHDU&ab_channel=RptimaoTV2RptimaoTV2"
            };

            var video5 = new VideoDto
            {
                Title       = "The Witcher",
                Description = "This is a wider card with supporting text below as a natural lead-in to additional content.",
                Date        = new DateTime(2020, 12, 12),
                ImageSource = "",
                Link        = "https://www.youtube.com/watch?v=PyYlB_MVuLM"
            };

            var video6 = new VideoDto
            {
                Title       = "Breaking Bad",
                Description = "This is a wider card with supporting text below as a natural lead-in to additional content.",
                Date        = new DateTime(2020, 12, 12),
                ImageSource = "",
                Link        = "https://www.youtube.com/watch?v=NQ1n5KHTAvo&ab_channel=Shane"
            };

            VideoItems.Add(video1);
            VideoItems.Add(video2);
            VideoItems.Add(video3);
            VideoItems.Add(video4);
            VideoItems.Add(video5);
            VideoItems.Add(video6);
        }