private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) { if (treeList1.FocusedNode.Level == 0) { return; } videoplay = VideoData.GetIndexVideoInfo(int.Parse(treeList1.FocusedNode.GetValue(0).ToString())); SetFocusInfo(); SetLabel(int.Parse(treeList1.FocusedNode.Tag.ToString())); PlayVideo(); }
private void PlayVideo(bool isnew = true) { ReturnRepetition re = (ReturnRepetition)gridView1.GetRow(gridView1.FocusedRowHandle); VideoPlay play = new VideoPlay(); List <VideoPlay> plays = new List <VideoPlay>(); if (isnew) { play = VideoData.GetIndexVideoInfo(re.ID); plays.Add(play); } else { if (re.DuplicateId == 0) { return; } play = VideoData.GetIndexVideoInfo(re.DuplicateId); foreach (var item in re.Duplicates) { VideoPlay video = VideoData.GetIndexVideoInfo(item.Id); plays.Add(video); } } if (play == null) { MessageBox.Show("不存在该视频或者已经被删除"); return; } VideoRecording recording = new VideoRecording(play, plays); if (play == null || play.Uri == null) { return; } if (File.Exists(AppSettings.ReturnStringUrl(Methods.ConversionString(play.Uri)))) { recording.Show(); Program.log.Error($"打开{AppSettings.ReturnStringUrl(Methods.ConversionString(play.Uri))}", new Exception("打开成功")); } else { DialogResult MsgBoxResult = MessageBox.Show("指定目录没有找到该视频,是否继续标注", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2); if (MsgBoxResult != DialogResult.Yes) { return; } recording.Show(); Program.log.Error($"打开{AppSettings.ReturnStringUrl(Methods.ConversionString(play.Uri))}", new Exception("没有找到视频")); } }