// Update state of checked boxes after a change public void UpdateBoxes(SourceSubtitleViewModel updatedSubtitle = null) { this.DeselectDefaults(); if (updatedSubtitle != null && updatedSubtitle.Selected) { if (!updatedSubtitle.CanPass) { // If we just selected a burn-in only subtitle, deselect all other subtitles. foreach (SourceSubtitleViewModel sourceSub in this.SourceSubtitles) { if (sourceSub != updatedSubtitle) { sourceSub.Deselect(); } } } else { // We selected a soft subtitle. Deselect any burn-in-only subtitles. foreach (SourceSubtitleViewModel sourceSub in this.SourceSubtitles) { if (!sourceSub.CanPass) { sourceSub.Deselect(); } } } } }
public void DuplicateSourceSubtitle(SourceSubtitleViewModel sourceSubtitleViewModel) { sourceSubtitleViewModel.Selected = true; if (sourceSubtitleViewModel.BurnedIn) { sourceSubtitleViewModel.BurnedIn = false; } var newSubtitle = new SourceSubtitleViewModel( this, new SourceSubtitle { BurnedIn = false, Default = false, Forced = !sourceSubtitleViewModel.ForcedOnly, TrackNumber = sourceSubtitleViewModel.TrackNumber }); newSubtitle.Selected = true; this.SourceSubtitles.Insert( this.SourceSubtitles.IndexOf(sourceSubtitleViewModel) + 1, newSubtitle); this.UpdateBoxes(); this.UpdateButtonVisibility(); this.UpdateWarningVisibility(); }
public void RemoveSourceSubtitle(SourceSubtitleViewModel subtitleViewModel) { this.SourceSubtitles.Remove(subtitleViewModel); this.UpdateBoxes(); this.UpdateButtonVisibility(); this.UpdateWarningVisibility(); }
public void ReportBurned(SourceSubtitleViewModel subtitleViewModel) { foreach (SourceSubtitleViewModel sourceVM in this.SourceSubtitles) { if (sourceVM != subtitleViewModel) { sourceVM.BurnedIn = false; } } foreach (SrtSubtitleViewModel srtVM in this.SrtSubtitles) { srtVM.BurnedIn = false; } }
public Subtitle GetSubtitle(SourceSubtitleViewModel sourceSubtitleViewModel) { return this.mainViewModel.SelectedTitle.Subtitles[sourceSubtitleViewModel.TrackNumber - 1]; }
public Subtitle GetSubtitle(SourceSubtitleViewModel sourceSubtitleViewModel) { return(this.mainViewModel.SelectedTitle.Subtitles[sourceSubtitleViewModel.TrackNumber - 1]); }