diff options
author | sr55 <[email protected]> | 2012-03-01 19:01:54 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-03-01 19:01:54 +0000 |
commit | 2efd8f264113bcd3d8c39a1f408c16cc27100aa7 (patch) | |
tree | aedb1cc0017839a91bdc80c46819332b76a975f9 /win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs | |
parent | 5bb4078641106578dd0a8e1eab6e1cfbc814067e (diff) |
WinGui: (WPF) Further work wiring up the new UI.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4479 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs index c36a7bcef..0495b8fcc 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs @@ -217,6 +217,16 @@ namespace HandBrakeWPF.ViewModels }
/// <summary>
+ /// Setup this tab for the specified preset.
+ /// </summary>
+ /// <param name="preset">
+ /// The preset.
+ /// </param>
+ public void SetPreset(Preset preset)
+ {
+ }
+
+ /// <summary>
/// Set the Source Chapters List
/// </summary>
/// <param name="sourceChapters">
@@ -229,10 +239,15 @@ namespace HandBrakeWPF.ViewModels this.Chapters.Clear();
// Then Add new Chapter Markers.
+ int counter = 1;
+
foreach (Chapter chapter in this.SourceChapterList)
{
- var marker = new ChapterMarker(chapter.ChapterNumber, chapter.ChapterName);
+ string chapterName = string.IsNullOrEmpty(chapter.ChapterName) ? string.Format("Chapter {0}", counter) : chapter.ChapterName;
+ var marker = new ChapterMarker(chapter.ChapterNumber, chapterName);
this.Chapters.Add(marker);
+
+ counter += 1;
}
}
|