Exemplo n.º 1
0
        bool CloseProject()
        {
            var projectFilename = Path.GetFileName(project.FileName);

            if (project.UnsavedChanges && Dialogs.SaveChanges(projectFilename) == MessageBoxResult.Cancel)
            {
                return(false);
            }

            var editTrack = timeline.Tracks[1];
            var refTrack  = timeline.Tracks[0];

            player.Stop();
            player.PlaylistClear();
            project = new Project();
            LoadSubtitles(project, timeline);
            LoadRefSubtitles(project, timeline);
            viewModel.ActiveItem = null;
            Title = GetTitle(project, listView.SelectedIndex);
            return(true);
        }