void MenuSrtExport_Click(object sender, RoutedEventArgs e) { var dialog = new SaveFileDialog { AddExtension = true, DefaultExt = "srt", Filter = SRT_FILTER }; if (dialog.ShowDialog() == true) { Srt.Write(dialog.FileName, project.Subtitles); } }
void MenuSrtRefImport_Click(object sender, RoutedEventArgs e) { var dialog = new OpenFileDialog { Filter = SRT_FILTER }; if (dialog.ShowDialog() == true) { project.RefSubtitles = Srt.Read(dialog.FileName); project.RefTrackName = Path.GetFileNameWithoutExtension(dialog.SafeFileName); LoadRefSubtitles(project, timeline); } }