private void videoRecordBackplayWindow1_DragDrop(object sender, DragEventArgs e) { string strPath = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString(); //获取文件路径 VideoRecordInfo v = VideoRecordInfoConvert.GetVideoRecordInfo_ByFileName(strPath); //videoBackplayWindow1.Init_SetVideoRecord(v); //videoBackplayWindow1.PlayVideoRecord(); }
private void tsmiSelectedFile_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); DialogResult d = openFileDialog.ShowDialog(); if (d == DialogResult.OK) { string strFilePath = openFileDialog.FileName; VideoRecordInfo v = VideoRecordInfoConvert.GetVideoRecordInfo_ByFileName(strFilePath); videoRecordBackplayWindow1.SetVideoRecordInfo(v); videoRecordBackplayWindow1.OpenVideoRecord(); videoRecordBackplayWindow1.PlayVideoRecord(); } }