private void PrePlay(object sender, RoutedEventArgs e) { minTime = int.Parse(startTimeBox.Text); maxTime = int.Parse(endTimeBox.Text); audioPlay audioPlay = new audioPlay(); audioPlay.FilePath = FilePath; audioPlay.outputPath = outputPath; audioPlay.extension = extension; audioPlay.startTime = minTime; audioPlay.endTime = maxTime; audioPlay.isPreplay = true; audioPlay.ShowDialog(); }
private void start(object sender, RoutedEventArgs e) { int type=0; minTime = int.Parse(startTimeBox.Text); maxTime = int.Parse(endTimeBox.Text); audioPlay audioPlay = new audioPlay(); if (extension == ".mp4") { type = MP4_audio(FilePath, outputPath, minTime, maxTime); } if (extension == ".flv") { type = FLV_audio(FilePath, outputPath, minTime, maxTime); } if (type == 1) generFile = outputPath + ".mp3"; if (type == 2) generFile = outputPath + ".aac"; audioPlay.isPreplay = false; audioPlay.generFile = generFile; MessageBox.Show("完成"); audioPlay.ShowDialog(); }