summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Model
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-04-16 18:36:23 +0000
committersr55 <[email protected]>2011-04-16 18:36:23 +0000
commitc921f0242dd7da08ea07b9ef5e02d37dd91b020d (patch)
tree8f1324382a0ffae776274957d925cb10e90ac4bb /win/CS/HandBrake.ApplicationServices/Model
parent680ed831fb94849f57565665ed4f467f2d3283e5 (diff)
WinGui:
- Switching Audio Selection dropdown to be databound. Added The scanned source track to the Audio Track model. - Added new Move to Top / Bottom options on the right click. - Further UI tweaks and fixes. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3935 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Model')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs56
1 files changed, 43 insertions, 13 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
index 159beb8e8..b9ecca97d 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
@@ -5,6 +5,8 @@
namespace HandBrake.ApplicationServices.Model.Encoding
{
+ using HandBrake.ApplicationServices.Parsing;
+
/// <summary>
/// An Audio Track for the Audio Panel
/// </summary>
@@ -20,6 +22,11 @@ namespace HandBrake.ApplicationServices.Model.Encoding
/// The DRC Value
/// </summary>
private double drc;
+
+ /// <summary>
+ /// The Scanned Audio Track
+ /// </summary>
+ private Audio scannedTrack;
#endregion
/// <summary>
@@ -33,7 +40,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding
this.SampleRate = 48;
this.Bitrate = 160;
this.DRC = 1;
- this.SourceTrack = "Automatic";
+ this.ScannedTrack = new Audio();
}
/// <summary>
@@ -43,24 +50,51 @@ namespace HandBrake.ApplicationServices.Model.Encoding
{
get
{
- string[] tempSub = SourceTrack.Split(' ');
- int value;
- if (int.TryParse(tempSub[0], out value))
+ if (this.ScannedTrack != null)
{
- return value;
+ return this.ScannedTrack.TrackNumber;
}
+
return null;
}
}
/// <summary>
+ /// Gets or sets the Scanned Audio Tracks
+ /// </summary>
+ public Audio ScannedTrack
+ {
+ get
+ {
+ return this.scannedTrack;
+ }
+
+ set
+ {
+ this.scannedTrack = value;
+ this.OnPropertyChanged("ScannedTrack");
+ }
+ }
+
+ /// <summary>
+ /// Gets the Display Value for this model.
+ /// </summary>
+ public string TrackDisplay
+ {
+ get
+ {
+ return this.ScannedTrack.ToString();
+ }
+ }
+
+ /// <summary>
/// Gets the The UI display value for sample rate
/// </summary>
public string SampleRateDisplayValue
{
get
{
- return SampleRate == 0 ? "Auto" : SampleRate.ToString();
+ return this.SampleRate == 0 ? "Auto" : this.SampleRate.ToString();
}
}
@@ -71,17 +105,11 @@ namespace HandBrake.ApplicationServices.Model.Encoding
{
get
{
- return Bitrate == 0 ? "Auto" : Bitrate.ToString();
+ return this.Bitrate == 0 ? "Auto" : this.Bitrate.ToString();
}
}
/// <summary>
- /// Gets or sets the Source Track
- /// Used for display purposes only.
- /// </summary>
- public string SourceTrack { get; set; }
-
- /// <summary>
/// Gets or sets Audio Mixdown
/// </summary>
public Mixdown MixDown { get; set; }
@@ -110,6 +138,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding
{
return this.drc;
}
+
set
{
if (!object.Equals(value, this.drc))
@@ -129,6 +158,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding
{
return this.gain;
}
+
set
{
if (!object.Equals(value, this.gain))