summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs14
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/Views/ChaptersView.xaml3
3 files changed, 16 insertions, 3 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs
index db3794151..1a20379f4 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/ChapterMarker.cs
@@ -9,6 +9,8 @@
namespace HandBrake.ApplicationServices.Model.Encoding
{
+ using System;
+
using Caliburn.Micro;
/// <summary>
@@ -37,10 +39,14 @@ namespace HandBrake.ApplicationServices.Model.Encoding
/// <param name="name">
/// The name.
/// </param>
- public ChapterMarker(int number, string name)
+ /// <param name="duration">
+ /// The duration.
+ /// </param>
+ public ChapterMarker(int number, string name, TimeSpan duration)
{
this.ChapterName = name;
this.ChapterNumber = number;
+ this.Duration = duration;
}
/// <summary>
@@ -54,6 +60,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding
{
this.ChapterName = chapter.ChapterName;
this.ChapterNumber = chapter.ChapterNumber;
+ this.Duration = chapter.Duration;
}
/// <summary>
@@ -62,6 +69,11 @@ namespace HandBrake.ApplicationServices.Model.Encoding
public int ChapterNumber { get; set; }
/// <summary>
+ /// Gets or sets the duration.
+ /// </summary>
+ public TimeSpan Duration { get; set; }
+
+ /// <summary>
/// Gets or sets ChapterName.
/// </summary>
public string ChapterName
diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
index 69a8a5d05..4276b97a4 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
@@ -274,7 +274,7 @@ namespace HandBrakeWPF.ViewModels
foreach (Chapter chapter in this.SourceChapterList)
{
string chapterName = string.IsNullOrEmpty(chapter.ChapterName) ? string.Format("Chapter {0}", counter) : chapter.ChapterName;
- var marker = new ChapterMarker(chapter.ChapterNumber, chapterName);
+ var marker = new ChapterMarker(chapter.ChapterNumber, chapterName, chapter.Duration);
this.Task.ChapterNames.Add(marker);
counter += 1;
diff --git a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
index c6cefb35e..a5fa6a6da 100644
--- a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
+++ b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml
@@ -38,7 +38,8 @@
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
- <DataGridTextColumn Header="Chapter Number" Width="150" Binding="{Binding ChapterNumber}" IsReadOnly="True" />
+ <DataGridTextColumn Header="Chapter Number" Width="120" Binding="{Binding ChapterNumber}" IsReadOnly="True" />
+ <DataGridTextColumn Header="Duration" Width="100" Binding="{Binding Duration}" IsReadOnly="True" />
<DataGridTextColumn Header="Chapter Name" Width="*" Binding="{Binding ChapterName}" IsReadOnly="False" />
</DataGrid.Columns>
</DataGrid>