public Import ( |
||
subtitles | The subtitles to import the translation to. | |
translation | The translated subtitles. | |
timeBetweenSubtitles | int | |
리턴 | void |
public void OpenTranslation (string path, Encoding encoding) { if (this.IsTranslationLoaded) CloseTranslation(); SubtitleFactory factory = new SubtitleFactory(); factory.Verbose = true; factory.Encoding = encoding; factory.FallbackEncoding = GetFallbackEncoding(); SubLib.Core.Domain.Subtitles openedTranslation = factory.Open(path); FileProperties newTranslationFile = factory.FileProperties; AddExtraSubtitles(openedTranslation); Translations translations = new Translations(); translations.Import(subtitles, openedTranslation, Base.Config.PrefsTimingsTimeBetweenSubtitles); if (newTranslationFile.SubtitleType != SubtitleType.Unknown) canTranslationBeSaved = true; this.translationFile = newTranslationFile; this.isTranslationLoaded = true; }