private void buttonPreview_Click(object sender, EventArgs e) { if (BoardView.SelectedRows.Count == 0) { MessageBox.Show("请选择需御览的内容."); return; } int BoardId = Convert.ToInt32(BoardView.SelectedRows[0].Cells["Id"].Value); BoardInfo BoardInfo = null; for (int i = 0; i < _BoardList.Count; i++) { if (_BoardList[i].Id == BoardId) { BoardInfo = _BoardList[i]; break; } } PreviewVideo previewVideo = new PreviewVideo(); previewVideo._VideoSource = BoardInfo.Source; previewVideo.ShowDialog(); }
private void buttonPreview_Click(object sender, EventArgs e) { PreviewVideo previewVideo = new PreviewVideo(); previewVideo._VideoSource = textSource.Text.Trim(); previewVideo.ShowDialog(); }