diff options
author | sr55 <[email protected]> | 2009-04-01 23:48:34 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-04-01 23:48:34 +0000 |
commit | 414d6a56cc67f2fa56353ee3ce80adaa8cfeb45f (patch) | |
tree | 171172730223e0e525b68f4afb3ea6ff2e5ccc9c /win/C#/Parsing/AudioTrack.cs | |
parent | 683faec1c917365b32332d86693e72479ba315bf (diff) |
WinGui:
- Just some minor code tweaks to clean things up.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2291 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Parsing/AudioTrack.cs')
-rw-r--r-- | win/C#/Parsing/AudioTrack.cs | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/win/C#/Parsing/AudioTrack.cs b/win/C#/Parsing/AudioTrack.cs index d2d6f3fac..86c2b6e05 100644 --- a/win/C#/Parsing/AudioTrack.cs +++ b/win/C#/Parsing/AudioTrack.cs @@ -79,8 +79,8 @@ namespace Handbrake.Parsing {
if (m_subFormat == null)
return string.Format("{0} {1} ({2})", m_trackNumber, m_language, m_format);
- else
- return string.Format("{0} {1} ({2}) ({3})", m_trackNumber, m_language, m_format, m_subFormat);
+
+ return string.Format("{0} {1} ({2}) ({3})", m_trackNumber, m_language, m_format, m_subFormat);
}
public static AudioTrack Parse(StringReader output)
@@ -91,25 +91,30 @@ namespace Handbrake.Parsing Match y = Regex.Match(audio_track, @"^ \+ ([0-9]*), ([A-Za-z0-9]*) \((.*)\)");
if (m.Success)
{
- var thisTrack = new AudioTrack();
- thisTrack.m_trackNumber = int.Parse(m.Groups[1].Value.Trim());
- thisTrack.m_language = m.Groups[2].Value;
- thisTrack.m_format = m.Groups[3].Value;
- thisTrack.m_subFormat = m.Groups[4].Value;
- thisTrack.m_frequency = int.Parse(m.Groups[5].Value.Trim());
- thisTrack.m_bitrate = int.Parse(m.Groups[6].Value.Trim());
+ var thisTrack = new AudioTrack
+ {
+ m_trackNumber = int.Parse(m.Groups[1].Value.Trim()),
+ m_language = m.Groups[2].Value,
+ m_format = m.Groups[3].Value,
+ m_subFormat = m.Groups[4].Value,
+ m_frequency = int.Parse(m.Groups[5].Value.Trim()),
+ m_bitrate = int.Parse(m.Groups[6].Value.Trim())
+ };
return thisTrack;
}
- else if (y.Success)
+
+ if (y.Success)
{
- var thisTrack = new AudioTrack();
- thisTrack.m_trackNumber = int.Parse(y.Groups[1].Value.Trim());
- thisTrack.m_language = y.Groups[2].Value;
- thisTrack.m_format = y.Groups[3].Value;
+ var thisTrack = new AudioTrack
+ {
+ m_trackNumber = int.Parse(y.Groups[1].Value.Trim()),
+ m_language = y.Groups[2].Value,
+ m_format = y.Groups[3].Value
+ };
return thisTrack;
}
- else
- return null;
+
+ return null;
}
public static AudioTrack[] ParseList(StringReader output)
|