/// <summary> /// Wczytuje zawartość bieżącego pliku napisów z dysku. /// </summary> /// <exception cref="System.Exception">Not supported subtitles format.</exception> public void Load() { if (!IsCurrentSubtitlesExtensionSupported()) { throw new Exception("Not supported subtitles format."); } CurrentSubtitles.Load(); CurrentSubtitlesFormat = GetCurrentSubtitlesFormat(); OnLoad(); }
/// <summary> /// Zapisuje bieżący plik napsiów na dysk. /// </summary> public void Save() { //String extension = Path.GetExtension(CurrentSubtitles.Path); //var supportedSubsList = (from subs in supportedSubtitlesFormats where subs.Extension == extension select subs).ToList(); //if (supportedSubsList.Count > 0) //{ // CurrentSubtitles.Save(); // CurrentSubtitlesFormat = supportedSubsList[0]; //} //else //{ // throw new Exception("Not supported subtitles format."); //} CurrentSubtitles.Save(); OnSave(); }