public void SetRemotePlaybackInfo(VideoChannelRemotePlaybackInfo value) { currentRemotePlaybackInfo = value; if (value != null) { //文件信息进行排序 List <RemotePlaybackFileInfo> lstBackplayFile = value.PlaybackFiles.OrderBy(item => item.StartTimeStamp).ToList(); long lStart = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(value.StartTime); long lEnd = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(value.EndTime); int intMaxValue = this.Width; Graphics g = pictureBox1.CreateGraphics(); Rectangle r = new Rectangle(0, 0, pictureBox1.Width, pictureBox1.Height); SolidBrush brush = new SolidBrush(pictureBox1.BackColor); g.FillRectangle(brush, r); foreach (RemotePlaybackFileInfo item in lstBackplayFile) { int intStartPosition = GetPosition(lStart, lEnd, item.StartTimeStamp, pictureBox1.Width); int intEndPosition = GetPosition(lStart, lEnd, item.EndTimeStamp, pictureBox1.Width); int Temp_intWidth = intEndPosition - intStartPosition; r = new Rectangle(intStartPosition, 0, Temp_intWidth, this.Height); brush = new SolidBrush(Color.Green); g.FillRectangle(brush, r); } } }
public void SetRemotePlaybackInfo(VideoChannelRemotePlaybackInfo value) { currentRemotePlaybackInfo = value; if (value != null) { chkChannel.Text = value.ChnnelInfo.CameraName; proportionInfo.SetRemotePlaybackInfo(value); } }
/// <summary> /// 设置远程回放文件信息 /// </summary> /// <param name="value"></param> public void SetRemotePlaybackInfo(VideoChannelRemotePlaybackInfo value) { proportionInfo.SetRemotePlaybackInfo(value); if (currentRemotePlaybackInfo != value) { currentRemotePlaybackInfo = value; proportionInfo.SetRemotePlaybackInfo_Scale(this.Width / 6); SetCurrentPositionDateTime(GetFlagDateTime()); } }
public VideoChannelRemotePlaybackInfo GetVideoChannelRemoteBackplayInfo(CameraInfo cInfo, List <RemotePlaybackFileInfo> lstBackplayInfo) { VideoChannelRemotePlaybackInfo result = new VideoChannelRemotePlaybackInfo() { ChnnelInfo = cInfo, PlaybackFiles = new List <RemotePlaybackFileInfo>(), StartTime = ProgPara.CurrentProgPara.PlaybackTimeStart, EndTime = ProgPara.CurrentProgPara.PlaybackTimeEnd, }; return(result); }
private void Button1_Click(object sender, EventArgs e) { //List<RemotePlaybackFileInfo> FileInfo = new List<RemotePlaybackFileInfo>(); //FileInfo.Add(new RemotePlaybackFileInfo //{ // StartTimeStamp = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(DateTime.Now.AddHours(-12)), // EndTimeStamp = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(DateTime.Now.AddHours(-11)), //}); //FileInfo.Add(new RemotePlaybackFileInfo //{ // StartTimeStamp = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(DateTime.Now.AddHours(-11)), // EndTimeStamp = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(DateTime.Now.AddHours(-10)), //}); //FileInfo.Add(new RemotePlaybackFileInfo //{ // StartTimeStamp = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(DateTime.Now.AddHours(-10)), // EndTimeStamp = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(DateTime.Now.AddHours(-4)), //}); //FileInfo.Add(new RemotePlaybackFileInfo //{ // StartTimeStamp = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(DateTime.Now.AddHours(-4)), // EndTimeStamp = VideoCurrencyModule.PubMethod.DateTimeToUnixTimestamp(DateTime.Now.AddHours(-1)), //}); DateTime timStart = DateTime.Now.AddDays(-1); DateTime timEnd = DateTime.Now.AddDays(1); string strPath = @"G:\Working\Currency\VideoPlayControl\VideoPlayControlTests\bin\Debug\Test\FILE_MAP_09"; List <RemotePlaybackFileInfo> Temp_lst = PubMethod.GetRemotePlaybackFileInfo_SKN(strPath, timStart, timEnd); VideoChannelRemotePlaybackInfo channelInfo = new VideoChannelRemotePlaybackInfo { ChnnelInfo = new PublicClassCurrency.CameraInfo { Channel = 1, CameraName = "通道1" }, StartTime = timStart, EndTime = timEnd, PlaybackFiles = Temp_lst, }; remoteBackplayInfoControl1.SetRemotePlaybackInfo(channelInfo); remoteBackplayControl1.SetRemotePlaybackInfo(channelInfo); //remoteBackplayControl1.SetCurrentPositionDateTime(DateTime.Now.AddHours(-3)); channelRemoteBackplayInfo1.SetRemotePlaybackInfo(channelInfo); }