123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- using Org.BouncyCastle.Asn1.Crmf;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Windows;
- using System.Windows.Input;
- using XHWK.Model;
-
- namespace XHWK.WKTool
- {
- /// <summary>
- /// 文件目录
- /// </summary>
- public partial class FileDirectoryWindow : Window
- {
- /// <summary>
- /// 视频模型
- /// </summary>
- List<Model_Video> model_VideoList =null;
- internal FileDirectoryData pageData = new FileDirectoryData();
- /// <summary>
- /// 文件目录
- /// </summary>
- public FileDirectoryWindow()
- {
- InitializeComponent();
- Initialize();
- }
- /// <summary>
- /// 初始化
- /// </summary>
- public void Initialize()
- {
- //加载视频列表
- LoadingVideoList();
- int i = 1;
- //显示视频
- foreach (Model_Video videoinfo in model_VideoList)
- {
- //是否已上传
- //videoinfo.IsUpload;
- //录制时间
- //videoinfo.RSTime;
- //文件大小
- //videoinfo.VideoSize;
- //文件缩略图路径
- //videoinfo.ThumbnailPath;
- //文件唯一标示 上传事件筛选需要上传的视频
- //videoinfo.FileGuid;
- //文件存储路径
- //videoinfo.VidePath;
-
- pageData.menuList.Add(new FileDirectoryModel()
- {
- SerialNumber = i,
- VideoName = Common.system.FileToolsCommon.GetIOFileName( videoinfo.VidePath),
- VideoDuration = 0,
- VideoSize = videoinfo.VideoSize,
- VideoTime = videoinfo.RSTime,
-
- });
- i++;
- }
- DataContext = pageData;
- }
- /// <summary>
- /// 加载视频列表
- /// </summary>
- public void LoadingVideoList()
- {
- model_VideoList = new List<Model_Video>();
- foreach(Model_WKData Vdata in APP.WKDataList)
- {
- if (Vdata.VideoList == null)
- continue;
- foreach(Model_Video videoinfo in Vdata.VideoList)
- {
- model_VideoList.Add(videoinfo);
- }
- }
- }
- /// <summary>
- /// 关闭
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnDown_Click(object sender, RoutedEventArgs e)
- {
- this.Hide();
- }
- /// <summary>
- /// 窗口移动
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
- {
- DragMove();
- }
-
- }
- public class FileDirectoryData : NotifyModel
- {
- public ObservableCollection<FileDirectoryModel> menuList { get; set; }
-
- public FileDirectoryData()
- {
- menuList = new ObservableCollection<FileDirectoryModel>();
- }
- }
-
- public class FileDirectoryModel : NotifyModel
- {
- private int _serialNumber;
- /// <summary>
- /// 序号
- /// </summary>
- public int SerialNumber
- {
- get => _serialNumber;
- set
- {
- _serialNumber = value;
- OnPropertyChanged("SerialNumber");
- }
- }
- private string _videoName;
- /// <summary>
- /// 视频名称
- /// </summary>
- public string VideoName
- {
- get => _videoName;
- set
- {
- _videoName = value;
- OnPropertyChanged("VideoName");
- }
- }
- private int _videoDuration;
- /// <summary>
- /// 视频时长
- /// </summary>
- public int VideoDuration
- {
- get => _videoDuration;
- set
- {
- _videoDuration = value;
- OnPropertyChanged("VideoDuration");
- }
- }
- private string _videoSize;
- /// <summary>
- /// 视频大小
- /// </summary>
- public string VideoSize
- {
- get => _videoSize;
- set
- {
- _videoSize = value;
- OnPropertyChanged("VideoSize");
- }
- }
- private string _videoTime;
- /// <summary>
- /// 日期
- /// </summary>
- public string VideoTime
- {
- get => _videoTime;
- set
- {
- _videoTime = value;
- OnPropertyChanged("VideoTime");
- }
- }
- private string _colour;
- /// <summary>
- /// 颜色
- /// </summary>
- public string Colour
- {
- get => _colour;
- set
- {
- _colour = value;
- OnPropertyChanged("Colour");
- }
- }
- }
- }
|