summaryrefslogtreecommitdiffstats
path: root/win/C#/Parsing/Chapter.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-04-24 15:10:03 +0000
committersr55 <[email protected]>2010-04-24 15:10:03 +0000
commit1fe85f1a237d4d0242862bb92d2383c1058f6158 (patch)
tree1f0ebffb6217e446f706df88ff04f27dea2d1c2d /win/C#/Parsing/Chapter.cs
parentafc5df999de924212bf9891a6a724a015a154388 (diff)
WinGui:
- Use Auto Properties in the Parser git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3258 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Parsing/Chapter.cs')
-rw-r--r--win/C#/Parsing/Chapter.cs26
1 files changed, 5 insertions, 21 deletions
diff --git a/win/C#/Parsing/Chapter.cs b/win/C#/Parsing/Chapter.cs
index 01aced03a..4b3bb2d00 100644
--- a/win/C#/Parsing/Chapter.cs
+++ b/win/C#/Parsing/Chapter.cs
@@ -16,30 +16,14 @@ namespace Handbrake.Parsing
public class Chapter
{
/// <summary>
- /// Chapter Number
- /// </summary>
- private int chapterNumber;
-
- /// <summary>
- /// The Duration of the chapter
- /// </summary>
- private TimeSpan duration;
-
- /// <summary>
/// Gets The number of this Chapter, in regards to it's parent Title
/// </summary>
- public int ChapterNumber
- {
- get { return chapterNumber; }
- }
+ public int ChapterNumber { get; private set; }
/// <summary>
/// Gets The length in time this Chapter spans
/// </summary>
- public TimeSpan Duration
- {
- get { return duration; }
- }
+ public TimeSpan Duration { get; private set; }
/// <summary>
/// Parse a CLI string to a Chapter object
@@ -59,8 +43,8 @@ namespace Handbrake.Parsing
{
var thisChapter = new Chapter
{
- chapterNumber = int.Parse(m.Groups[1].Value.Trim()),
- duration = TimeSpan.Parse(m.Groups[5].Value)
+ ChapterNumber = int.Parse(m.Groups[1].Value.Trim()),
+ Duration = TimeSpan.Parse(m.Groups[5].Value)
};
return thisChapter;
}
@@ -103,7 +87,7 @@ namespace Handbrake.Parsing
/// <returns>A string formatted as: {chapter #}</returns>
public override string ToString()
{
- return chapterNumber.ToString();
+ return ChapterNumber.ToString();
}
}
} \ No newline at end of file