diff options
author | sr55 <[email protected]> | 2011-04-16 15:21:42 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-04-16 15:21:42 +0000 |
commit | 680ed831fb94849f57565665ed4f467f2d3283e5 (patch) | |
tree | 784b72fd4521cf5fc21b097a406d56051f5cd5c5 /win | |
parent | a05f96f954d41c88f91b1a254f8fa6982cb0e86b (diff) |
WinGui:
- Moved DRC onto the advanced audio panel and tweaked the UI slightly.
- Updated to Stylecop 4.5
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3934 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/Controls/AudioPanel.Designer.cs | 40 | ||||
-rw-r--r-- | win/CS/Controls/AudioPanel.cs | 31 | ||||
-rw-r--r-- | win/CS/Controls/AudioPanel.resx | 11 | ||||
-rw-r--r-- | win/CS/HandBrake.5.1.ReSharper | 379 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj | 2 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs | 21 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Settings.StyleCop | 10 | ||||
-rw-r--r-- | win/CS/HandBrakeCS.5.0.ReSharper | 388 | ||||
-rw-r--r-- | win/CS/HandBrakeCS.csproj | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/HandBrakeWPF.csproj | 1 | ||||
-rw-r--r-- | win/CS/ToolWindows/AdvancedAudio.Designer.cs | 70 | ||||
-rw-r--r-- | win/CS/ToolWindows/AdvancedAudio.cs | 40 |
12 files changed, 143 insertions, 852 deletions
diff --git a/win/CS/Controls/AudioPanel.Designer.cs b/win/CS/Controls/AudioPanel.Designer.cs index dd6dc768e..dbc1e84c9 100644 --- a/win/CS/Controls/AudioPanel.Designer.cs +++ b/win/CS/Controls/AudioPanel.Designer.cs @@ -35,7 +35,6 @@ namespace Handbrake.Controls private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioPanel));
this.audioMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.audioList_moveup = new System.Windows.Forms.ToolStripMenuItem();
this.audioList_movedown = new System.Windows.Forms.ToolStripMenuItem();
@@ -43,8 +42,6 @@ namespace Handbrake.Controls this.audioList_remove = new System.Windows.Forms.ToolStripMenuItem();
this.btn_RemoveAudioTrack = new System.Windows.Forms.Button();
this.btn_addAudioTrack = new System.Windows.Forms.Button();
- this.lbl_drc = new System.Windows.Forms.Label();
- this.tb_drc = new System.Windows.Forms.TrackBar();
this.label68 = new System.Windows.Forms.Label();
this.drp_audioEncoder = new System.Windows.Forms.ComboBox();
this.drp_audioMix = new System.Windows.Forms.ComboBox();
@@ -65,7 +62,6 @@ namespace Handbrake.Controls this.DRC = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Gain = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.audioMenu.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.tb_drc)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.audioList)).BeginInit();
this.SuspendLayout();
//
@@ -132,30 +128,6 @@ namespace Handbrake.Controls this.btn_addAudioTrack.UseVisualStyleBackColor = false;
this.btn_addAudioTrack.Click += new System.EventHandler(this.AddAudioTrack_Click);
//
- // lbl_drc
- //
- this.lbl_drc.AutoSize = true;
- this.lbl_drc.BackColor = System.Drawing.Color.Transparent;
- this.lbl_drc.Location = new System.Drawing.Point(666, 90);
- this.lbl_drc.Name = "lbl_drc";
- this.lbl_drc.Size = new System.Drawing.Size(13, 13);
- this.lbl_drc.TabIndex = 62;
- this.lbl_drc.Text = "0";
- //
- // tb_drc
- //
- this.tb_drc.BackColor = System.Drawing.SystemColors.Window;
- this.tb_drc.LargeChange = 0;
- this.tb_drc.Location = new System.Drawing.Point(608, 84);
- this.tb_drc.Margin = new System.Windows.Forms.Padding(0);
- this.tb_drc.Maximum = 31;
- this.tb_drc.Name = "tb_drc";
- this.tb_drc.Size = new System.Drawing.Size(57, 45);
- this.tb_drc.TabIndex = 60;
- this.tb_drc.TickFrequency = 10;
- this.ToolTips.SetToolTip(this.tb_drc, resources.GetString("tb_drc.ToolTip"));
- this.tb_drc.Scroll += new System.EventHandler(this.ControlChanged);
- //
// label68
//
this.label68.AutoSize = true;
@@ -321,9 +293,9 @@ namespace Handbrake.Controls this.btn_AdvancedAudio.BackColor = System.Drawing.Color.Transparent;
this.btn_AdvancedAudio.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_AdvancedAudio.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_AdvancedAudio.Location = new System.Drawing.Point(630, 38);
+ this.btn_AdvancedAudio.Location = new System.Drawing.Point(607, 86);
this.btn_AdvancedAudio.Name = "btn_AdvancedAudio";
- this.btn_AdvancedAudio.Size = new System.Drawing.Size(71, 23);
+ this.btn_AdvancedAudio.Size = new System.Drawing.Size(94, 23);
this.btn_AdvancedAudio.TabIndex = 70;
this.btn_AdvancedAudio.Text = "Advanced";
this.btn_AdvancedAudio.UseVisualStyleBackColor = false;
@@ -394,31 +366,29 @@ namespace Handbrake.Controls this.Gain.DataPropertyName = "Gain";
this.Gain.HeaderText = "Gain (dB)";
this.Gain.Name = "Gain";
+ this.Gain.ReadOnly = true;
this.Gain.Width = 60;
//
// AudioPanel
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.btn_AdvancedAudio);
this.Controls.Add(this.label1);
this.Controls.Add(this.lbl_audioTrack);
this.Controls.Add(this.drp_audioTrack);
+ this.Controls.Add(this.btn_AdvancedAudio);
this.Controls.Add(this.drp_audioSample);
this.Controls.Add(this.audioList);
this.Controls.Add(this.label68);
this.Controls.Add(this.drp_audioBitrate);
this.Controls.Add(this.drp_audioMix);
this.Controls.Add(this.btn_addAudioTrack);
- this.Controls.Add(this.lbl_drc);
this.Controls.Add(this.btn_RemoveAudioTrack);
this.Controls.Add(this.drp_audioEncoder);
- this.Controls.Add(this.tb_drc);
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "AudioPanel";
this.Size = new System.Drawing.Size(720, 310);
this.audioMenu.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.tb_drc)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.audioList)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -429,8 +399,6 @@ namespace Handbrake.Controls private System.Windows.Forms.Button btn_RemoveAudioTrack;
private System.Windows.Forms.Button btn_addAudioTrack;
- internal System.Windows.Forms.Label lbl_drc;
- internal System.Windows.Forms.TrackBar tb_drc;
internal System.Windows.Forms.Label label68;
internal System.Windows.Forms.ComboBox drp_audioEncoder;
internal System.Windows.Forms.ComboBox drp_audioMix;
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index ddd75d703..ed38c368f 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -230,11 +230,13 @@ namespace Handbrake.Controls // Configure the widgets with values
if (drp_audioEncoder.Text.Contains(AC3Passthru) || drp_audioEncoder.Text.Contains(DTSPassthru))
{
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = tb_drc.Enabled = false;
+ drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = false;
+ track.Gain = 0;
+ track.DRC = 0;
}
else
{
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = tb_drc.Enabled = true;
+ drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;
}
// Update an item in the Audio list if required.
@@ -259,17 +261,6 @@ namespace Handbrake.Controls track.Bitrate = bitrate;
break;
- case "tb_drc":
- double value;
- if (tb_drc.Value == 0) value = 0;
- else
- value = ((tb_drc.Value - 1) / 10.0) + 1;
-
- lbl_drc.Text = value.ToString();
- track.DRC = value;
- audioList.Select();
- audioList.Refresh();
- break;
}
audioList.Refresh();
@@ -303,14 +294,6 @@ namespace Handbrake.Controls drp_audioMix.SelectedItem = EnumHelper<Mixdown>.GetDescription(track.MixDown);
drp_audioSample.SelectedItem = track.SampleRate;
drp_audioBitrate.SelectedItem = track.Bitrate;
- double drcValue = 0;
- int drcCalculated;
- if (track.DRC != 0)
- drcValue = ((track.DRC * 10) + 1) - 10;
- int.TryParse(drcValue.ToString(Culture), out drcCalculated);
- tb_drc.Value = drcCalculated;
- lbl_drc.Text = track.DRC.ToString();
-
lbl_audioTrack.Text = track.SourceTrack;
// Set the Advanced Control.
@@ -349,10 +332,6 @@ namespace Handbrake.Controls }
// Get Some Values
- double drcValue = 0;
- if (tb_drc.Value != 0)
- drcValue = ((tb_drc.Value - 1) / 10.0) + 1;
-
int bitrate;
double samplerate;
@@ -368,7 +347,7 @@ namespace Handbrake.Controls SampleRate = samplerate,
Bitrate = bitrate,
Gain = 0,
- DRC = drcValue
+ DRC = 0,
};
this.audioTracks.Add(track);
diff --git a/win/CS/Controls/AudioPanel.resx b/win/CS/Controls/AudioPanel.resx index 483d3e97c..6b186fbc0 100644 --- a/win/CS/Controls/AudioPanel.resx +++ b/win/CS/Controls/AudioPanel.resx @@ -123,14 +123,6 @@ <metadata name="ToolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>330, 16</value>
</metadata>
- <data name="tb_drc.ToolTip" xml:space="preserve">
- <value>Dynamic Range Compression
-Adjust the dynamic range of the output audio track.
-
-For source audio that has a wide dynamic range (very loud and very soft
-sequences), DRC allows you to 'compress' the range by making loud
-sections softer and soft sections louder</value>
- </data>
<metadata name="AudioMenuRowHeightHack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>35, 17</value>
</metadata>
@@ -155,4 +147,7 @@ sections softer and soft sections louder</value> <metadata name="Gain.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
+ <metadata name="ToolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>330, 16</value>
+ </metadata>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrake.5.1.ReSharper b/win/CS/HandBrake.5.1.ReSharper deleted file mode 100644 index 22ca79976..000000000 --- a/win/CS/HandBrake.5.1.ReSharper +++ /dev/null @@ -1,379 +0,0 @@ -<Configuration>
- <CodeStyleSettings>
- <ExternalPath IsNull="False">
- </ExternalPath>
- <Sharing>SOLUTION</Sharing>
- <CSharp>
- <FormatSettings>
- <ALIGN_MULTILINE_ARGUMENT>False</ALIGN_MULTILINE_ARGUMENT>
- <BLANK_LINES_AROUND_SINGLE_LINE_FIELD>1</BLANK_LINES_AROUND_SINGLE_LINE_FIELD>
- <BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>1</BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>
- <BLANK_LINES_BETWEEN_USING_GROUPS>1</BLANK_LINES_BETWEEN_USING_GROUPS>
- <FORCE_ATTRIBUTE_STYLE>SEPARATE</FORCE_ATTRIBUTE_STYLE>
- <FORCE_FOR_BRACES_STYLE>ALWAYS_ADD</FORCE_FOR_BRACES_STYLE>
- <FORCE_FOREACH_BRACES_STYLE>ALWAYS_ADD</FORCE_FOREACH_BRACES_STYLE>
- <FORCE_IFELSE_BRACES_STYLE>ALWAYS_ADD</FORCE_IFELSE_BRACES_STYLE>
- <FORCE_WHILE_BRACES_STYLE>ALWAYS_ADD</FORCE_WHILE_BRACES_STYLE>
- <INDENT_ANONYMOUS_METHOD_BLOCK>False</INDENT_ANONYMOUS_METHOD_BLOCK>
- <INDENT_EMBRACED_INITIALIZER_BLOCK>False</INDENT_EMBRACED_INITIALIZER_BLOCK>
- <KEEP_BLANK_LINES_IN_CODE>1</KEEP_BLANK_LINES_IN_CODE>
- <KEEP_BLANK_LINES_IN_DECLARATIONS>1</KEEP_BLANK_LINES_IN_DECLARATIONS>
- <KEEP_USER_LINEBREAKS>False</KEEP_USER_LINEBREAKS>
- <MODIFIERS_ORDER IsNull="False">
- <Item>public</Item>
- <Item>protected</Item>
- <Item>internal</Item>
- <Item>private</Item>
- <Item>new</Item>
- <Item>abstract</Item>
- <Item>virtual</Item>
- <Item>override</Item>
- <Item>sealed</Item>
- <Item>static</Item>
- <Item>readonly</Item>
- <Item>extern</Item>
- <Item>unsafe</Item>
- <Item>volatile</Item>
- </MODIFIERS_ORDER>
- <PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>False</PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>
- <PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>False</PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>
- <PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>False</PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>
- <PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>False</PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>
- <PLACE_WHILE_ON_NEW_LINE>True</PLACE_WHILE_ON_NEW_LINE>
- <REDUNDANT_THIS_QUALIFIER_STYLE>ALWAYS_USE</REDUNDANT_THIS_QUALIFIER_STYLE>
- <SIMPLE_EMBEDDED_STATEMENT_STYLE>ON_SINGLE_LINE</SIMPLE_EMBEDDED_STATEMENT_STYLE>
- <SPACE_AFTER_TYPECAST_PARENTHESES>False</SPACE_AFTER_TYPECAST_PARENTHESES>
- <SPACE_AROUND_MULTIPLICATIVE_OP>True</SPACE_AROUND_MULTIPLICATIVE_OP>
- <SPACE_BEFORE_SIZEOF_PARENTHESES>False</SPACE_BEFORE_SIZEOF_PARENTHESES>
- <SPACE_BEFORE_TYPEOF_PARENTHESES>False</SPACE_BEFORE_TYPEOF_PARENTHESES>
- <SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>True</SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>
- <STICK_COMMENT>False</STICK_COMMENT>
- <WRAP_AFTER_DECLARATION_LPAR>True</WRAP_AFTER_DECLARATION_LPAR>
- <WRAP_AFTER_INVOCATION_LPAR>True</WRAP_AFTER_INVOCATION_LPAR>
- <WRAP_ARGUMENTS_STYLE>CHOP_IF_LONG</WRAP_ARGUMENTS_STYLE>
- <WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>True</WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>
- <WRAP_EXTENDS_LIST_STYLE>CHOP_IF_LONG</WRAP_EXTENDS_LIST_STYLE>
- <WRAP_PARAMETERS_STYLE>CHOP_IF_LONG</WRAP_PARAMETERS_STYLE>
- </FormatSettings>
- <UsingsSettings>
- <AddImportsToDeepestScope>True</AddImportsToDeepestScope>
- <QualifiedUsingAtNestedScope>True</QualifiedUsingAtNestedScope>
- </UsingsSettings>
- <Naming2>
- <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
- <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
- <ExceptionName IsNull="False">
- </ExceptionName>
- <OverrideDefaultSettings>True</OverrideDefaultSettings>
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
- <PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
- <PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
- </Naming2>
- <CustomMemberReorderingPatterns><![CDATA[<?xml version="1.0" encoding="utf-8"?>
-<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">
-
- <!-- Do not reorder COM interfaces -->
- <Pattern>
- <Match>
- <And Weight="2000">
- <Kind Is="interface"/>
- <HasAttribute CLRName="System.Runtime.InteropServices.InterfaceTypeAttribute"
- Inherit="true"/>
- </And>
- </Match>
- </Pattern>
-
- <!-- Do not reorder P/Invoke structs -->
- <Pattern>
- <Match>
- <And Weight="2000">
- <Or>
- <Kind Is="struct"/>
- <Kind Is="class"/>
- </Or>
- <HasAttribute CLRName="System.Runtime.InteropServices.StructLayoutAttribute"
- Inherit="true"/>
- </And>
- </Match>
- </Pattern>
-
- <!-- Do not reorder P/Invoke classes (called xxxNativeMethods) -->
- <Pattern>
- <Match>
- <And Weight="2000">
- <Kind Is="class"/>
- <Name Is=".*NativeMethods" />
- </And>
- </Match>
- </Pattern>
-
- <!-- StyleCop pattern -->
- <Pattern RemoveAllRegions="true">
- <Match>
- <Or Weight="1000" >
- <Kind Is="class" />
- <Kind Is="struct" />
- <Kind Is="interface"/>
- </Or>
- </Match>
-
- <!-- constants and fields -->
- <Entry>
- <Match>
- <Or>
- <Kind Is="constant"/>
- <Kind Is="field"/>
- </Or>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private"/>
- <Kind Order="constant field"/>
- <Readonly/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Constants and Fields"/>
- </Entry>
-
- <!-- constructors -->
- <Entry>
- <Match>
- <Or Weight="200">
- <Kind Is="constructor"/>
- <Kind Is="destructor"/>
- </Or>
- </Match>
- <Sort>
- <Static/>
- <Kind Order="constructor destructor"/>
- <Access Order="public internal protected-internal protected private"/>
- </Sort>
- <Group Region="Constructors and Destructors"/>
- </Entry>
-
- <!-- delegates -->
- <Entry>
- <Match>
- <Kind Is="delegate"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Static />
- <Name/>
- </Sort>
- <Group Region="Delegates"/>
- </Entry>
-
- <!-- events -->
- <Entry>
- <Match>
- <Kind Is="event"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Static />
- <Name/>
- </Sort>
- <Group Region="Events"/>
- </Entry>
-
- <!-- enum -->
- <Entry>
- <Match>
- <Kind Is="enum"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Name/>
- </Sort>
- <Group Region="Enums"/>
- </Entry>
-
- <!-- interfaces -->
- <Entry>
- <Match>
- <Kind Is="interface" />
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Name/>
- </Sort>
- <Group Region="Interfaces"/>
- </Entry>
-
- <!-- properties -->
- <Entry>
- <Match>
- <Kind Is="property"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private"/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Properties"/>
- </Entry>
-
- <!-- indexers -->
- <Entry>
- <Match>
- <Kind Is="indexer"
- Weight="300" />
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Indexers"/>
- </Entry>
-
- <!-- operator -->
- <Entry>
- <Match>
- <Kind Is="operator"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Operators"/>
- </Entry>
-
- <!-- public methods -->
- <Entry>
- <Match>
- <And>
- <Kind Is="method"/>
- <Access Is="public"/>
- </And>
- </Match>
- <Sort>
- <Access Order="public"/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Public Methods"/>
- </Entry>
-
- <!-- Implemented Interfaces -->
- <Entry>
- <Match>
- <And Weight="500">
- <Kind Is="method"/>
- <ImplementsInterface CLRName=".*"/>
- </And>
- </Match>
- <Sort>
- <ImplementsInterface />
- <Access Order="public internal protected-internal protected private"/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Implemented Interfaces">
- <ImplementsInterface Region="${ImplementsInterface}" />
- </Group>
- </Entry>
-
- <!-- other methods -->
- <Entry>
- <Match>
- <Kind Is="method"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private"/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Methods"/>
- </Entry>
-
- <!-- Nested structs -->
- <Entry>
- <Match>
- <Kind Is="struct"
- Weight="600" />
- </Match>
- <Sort>
- <Static />
- <Access Order="public internal protected-internal protected private" />
- <Name/>
- </Sort>
- </Entry>
-
- <!-- Nested classes -->
- <Entry>
- <Match>
- <Kind Is="class"
- Weight="700" />
- </Match>
- <Sort>
- <Static />
- <Access Order="public internal protected-internal protected private" />
- <Name/>
- </Sort>
- </Entry>
-
- <!-- all other members -->
- <Entry/>
-
- </Pattern>
-</Patterns>
-]]></CustomMemberReorderingPatterns>
- </CSharp>
- <VB>
- <FormatSettings />
- <ImportsSettings />
- <Naming2>
- <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
- <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
- </Naming2>
- </VB>
- <Web>
- <Naming2 />
- </Web>
- <Xaml>
- <Naming2 />
- </Xaml>
- <XML>
- <FormatSettings />
- </XML>
- <GenerateMemberBody />
- <Naming2>
- <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
- <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
- <ExceptionName IsNull="False">
- </ExceptionName>
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
- <PredefinedRule Inspect="False" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
- <PredefinedRule Inspect="False" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
- <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
- <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
- </Naming2>
- </CodeStyleSettings>
-</Configuration>
\ No newline at end of file diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index 7f4592241..65a1b3e5f 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -180,7 +180,7 @@ </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.4\Microsoft.StyleCop.targets" />
+ <Import Project="$(ProgramFiles)\MSBuild\StyleCop\v4.5\StyleCop.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs index a6db51572..159beb8e8 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs @@ -15,6 +15,11 @@ namespace HandBrake.ApplicationServices.Model.Encoding /// The gain value
/// </summary>
private int gain;
+
+ /// <summary>
+ /// The DRC Value
+ /// </summary>
+ private double drc;
#endregion
/// <summary>
@@ -99,7 +104,21 @@ namespace HandBrake.ApplicationServices.Model.Encoding /// <summary>
/// Gets or sets Dynamic Range Compression
/// </summary>
- public double DRC { get; set; }
+ public double DRC
+ {
+ get
+ {
+ return this.drc;
+ }
+ set
+ {
+ if (!object.Equals(value, this.drc))
+ {
+ this.drc = value;
+ this.OnPropertyChanged("DRC");
+ }
+ }
+ }
/// <summary>
/// Gets or sets the Gain for the audio track
diff --git a/win/CS/HandBrake.ApplicationServices/Settings.StyleCop b/win/CS/HandBrake.ApplicationServices/Settings.StyleCop index 7f55ce6c6..c8383e569 100644 --- a/win/CS/HandBrake.ApplicationServices/Settings.StyleCop +++ b/win/CS/HandBrake.ApplicationServices/Settings.StyleCop @@ -1 +1,9 @@ -<StyleCopSettings Version="4.3" />
\ No newline at end of file +<StyleCopSettings Version="105">
+ <Parsers>
+ <Parser ParserId="StyleCop.CSharp.CsParser">
+ <ParserSettings>
+ <BooleanProperty Name="AnalyzeDesignerFiles">False</BooleanProperty>
+ </ParserSettings>
+ </Parser>
+ </Parsers>
+</StyleCopSettings>
\ No newline at end of file diff --git a/win/CS/HandBrakeCS.5.0.ReSharper b/win/CS/HandBrakeCS.5.0.ReSharper deleted file mode 100644 index 59f681991..000000000 --- a/win/CS/HandBrakeCS.5.0.ReSharper +++ /dev/null @@ -1,388 +0,0 @@ -<Configuration>
- <CodeStyleSettings>
- <ExternalPath IsNull="False">
- </ExternalPath>
- <Sharing>SOLUTION</Sharing>
- <CSharp>
- <FormatSettings>
- <ALIGN_MULTILINE_ARGUMENT>False</ALIGN_MULTILINE_ARGUMENT>
- <BLANK_LINES_AROUND_SINGLE_LINE_FIELD>1</BLANK_LINES_AROUND_SINGLE_LINE_FIELD>
- <BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>1</BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>
- <BLANK_LINES_BETWEEN_USING_GROUPS>1</BLANK_LINES_BETWEEN_USING_GROUPS>
- <FORCE_ATTRIBUTE_STYLE>SEPARATE</FORCE_ATTRIBUTE_STYLE>
- <FORCE_FOR_BRACES_STYLE>ALWAYS_ADD</FORCE_FOR_BRACES_STYLE>
- <FORCE_FOREACH_BRACES_STYLE>ALWAYS_ADD</FORCE_FOREACH_BRACES_STYLE>
- <FORCE_IFELSE_BRACES_STYLE>ALWAYS_ADD</FORCE_IFELSE_BRACES_STYLE>
- <FORCE_WHILE_BRACES_STYLE>ALWAYS_ADD</FORCE_WHILE_BRACES_STYLE>
- <INDENT_ANONYMOUS_METHOD_BLOCK>False</INDENT_ANONYMOUS_METHOD_BLOCK>
- <INDENT_EMBRACED_INITIALIZER_BLOCK>False</INDENT_EMBRACED_INITIALIZER_BLOCK>
- <KEEP_BLANK_LINES_IN_CODE>1</KEEP_BLANK_LINES_IN_CODE>
- <KEEP_BLANK_LINES_IN_DECLARATIONS>1</KEEP_BLANK_LINES_IN_DECLARATIONS>
- <KEEP_USER_LINEBREAKS>False</KEEP_USER_LINEBREAKS>
- <MODIFIERS_ORDER IsNull="False">
- <Item>public</Item>
- <Item>protected</Item>
- <Item>internal</Item>
- <Item>private</Item>
- <Item>new</Item>
- <Item>abstract</Item>
- <Item>virtual</Item>
- <Item>override</Item>
- <Item>sealed</Item>
- <Item>static</Item>
- <Item>readonly</Item>
- <Item>extern</Item>
- <Item>unsafe</Item>
- <Item>volatile</Item>
- </MODIFIERS_ORDER>
- <PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>False</PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>
- <PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>False</PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>
- <PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>False</PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>
- <PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>False</PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>
- <PLACE_WHILE_ON_NEW_LINE>True</PLACE_WHILE_ON_NEW_LINE>
- <REDUNDANT_THIS_QUALIFIER_STYLE>ALWAYS_USE</REDUNDANT_THIS_QUALIFIER_STYLE>
- <SIMPLE_EMBEDDED_STATEMENT_STYLE>ON_SINGLE_LINE</SIMPLE_EMBEDDED_STATEMENT_STYLE>
- <SPACE_AFTER_TYPECAST_PARENTHESES>False</SPACE_AFTER_TYPECAST_PARENTHESES>
- <SPACE_AROUND_MULTIPLICATIVE_OP>True</SPACE_AROUND_MULTIPLICATIVE_OP>
- <SPACE_BEFORE_SIZEOF_PARENTHESES>False</SPACE_BEFORE_SIZEOF_PARENTHESES>
- <SPACE_BEFORE_TYPEOF_PARENTHESES>False</SPACE_BEFORE_TYPEOF_PARENTHESES>
- <SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>True</SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>
- <STICK_COMMENT>False</STICK_COMMENT>
- <WRAP_AFTER_DECLARATION_LPAR>True</WRAP_AFTER_DECLARATION_LPAR>
- <WRAP_AFTER_INVOCATION_LPAR>True</WRAP_AFTER_INVOCATION_LPAR>
- <WRAP_ARGUMENTS_STYLE>CHOP_IF_LONG</WRAP_ARGUMENTS_STYLE>
- <WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>True</WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>
- <WRAP_EXTENDS_LIST_STYLE>CHOP_IF_LONG</WRAP_EXTENDS_LIST_STYLE>
- <WRAP_PARAMETERS_STYLE>CHOP_IF_LONG</WRAP_PARAMETERS_STYLE>
- </FormatSettings>
- <UsingsSettings>
- <AddImportsToDeepestScope>True</AddImportsToDeepestScope>
- <QualifiedUsingAtNestedScope>True</QualifiedUsingAtNestedScope>
- </UsingsSettings>
- <Naming2>
- <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
- <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
- <ExceptionName IsNull="False">
- </ExceptionName>
- <OverrideDefaultSettings>True</OverrideDefaultSettings>
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
- <PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
- <PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
- </Naming2>
- <CustomMemberReorderingPatterns><![CDATA[<?xml version="1.0" encoding="utf-8"?>
-<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">
-
- <!-- Do not reorder COM interfaces -->
- <Pattern>
- <Match>
- <And Weight="2000">
- <Kind Is="interface"/>
- <HasAttribute CLRName="System.Runtime.InteropServices.InterfaceTypeAttribute"
- Inherit="true"/>
- </And>
- </Match>
- </Pattern>
-
- <!-- Do not reorder P/Invoke structs -->
- <Pattern>
- <Match>
- <And Weight="2000">
- <Or>
- <Kind Is="struct"/>
- <Kind Is="class"/>
- </Or>
- <HasAttribute CLRName="System.Runtime.InteropServices.StructLayoutAttribute"
- Inherit="true"/>
- </And>
- </Match>
- </Pattern>
-
- <!-- Do not reorder P/Invoke classes (called xxxNativeMethods) -->
- <Pattern>
- <Match>
- <And Weight="2000">
- <Kind Is="class"/>
- <Name Is=".*NativeMethods" />
- </And>
- </Match>
- </Pattern>
-
- <!-- StyleCop pattern -->
- <Pattern RemoveAllRegions="true">
- <Match>
- <Or Weight="1000" >
- <Kind Is="class" />
- <Kind Is="struct" />
- <Kind Is="interface"/>
- </Or>
- </Match>
-
- <!-- constants and fields -->
- <Entry>
- <Match>
- <Or>
- <Kind Is="constant"/>
- <Kind Is="field"/>
- </Or>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private"/>
- <Kind Order="constant field"/>
- <Readonly/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Constants and Fields"/>
- </Entry>
-
- <!-- constructors -->
- <Entry>
- <Match>
- <Or Weight="200">
- <Kind Is="constructor"/>
- <Kind Is="destructor"/>
- </Or>
- </Match>
- <Sort>
- <Static/>
- <Kind Order="constructor destructor"/>
- <Access Order="public internal protected-internal protected private"/>
- </Sort>
- <Group Region="Constructors and Destructors"/>
- </Entry>
-
- <!-- delegates -->
- <Entry>
- <Match>
- <Kind Is="delegate"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Static />
- <Name/>
- </Sort>
- <Group Region="Delegates"/>
- </Entry>
-
- <!-- events -->
- <Entry>
- <Match>
- <Kind Is="event"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Static />
- <Name/>
- </Sort>
- <Group Region="Events"/>
- </Entry>
-
- <!-- enum -->
- <Entry>
- <Match>
- <Kind Is="enum"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Name/>
- </Sort>
- <Group Region="Enums"/>
- </Entry>
-
- <!-- interfaces -->
- <Entry>
- <Match>
- <Kind Is="interface" />
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Name/>
- </Sort>
- <Group Region="Interfaces"/>
- </Entry>
-
- <!-- properties -->
- <Entry>
- <Match>
- <Kind Is="property"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private"/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Properties"/>
- </Entry>
-
- <!-- indexers -->
- <Entry>
- <Match>
- <Kind Is="indexer"
- Weight="300" />
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Indexers"/>
- </Entry>
-
- <!-- operator -->
- <Entry>
- <Match>
- <Kind Is="operator"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private" />
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Operators"/>
- </Entry>
-
- <!-- public methods -->
- <Entry>
- <Match>
- <And>
- <Kind Is="method"/>
- <Access Is="public"/>
- </And>
- </Match>
- <Sort>
- <Access Order="public"/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Public Methods"/>
- </Entry>
-
- <!-- Implemented Interfaces -->
- <Entry>
- <Match>
- <And Weight="500">
- <Kind Is="method"/>
- <ImplementsInterface CLRName=".*"/>
- </And>
- </Match>
- <Sort>
- <ImplementsInterface />
- <Access Order="public internal protected-internal protected private"/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Implemented Interfaces">
- <ImplementsInterface Region="${ImplementsInterface}" />
- </Group>
- </Entry>
-
- <!-- other methods -->
- <Entry>
- <Match>
- <Kind Is="method"/>
- </Match>
- <Sort>
- <Access Order="public internal protected-internal protected private"/>
- <Static/>
- <Name/>
- </Sort>
- <Group Region="Methods"/>
- </Entry>
-
- <!-- Nested structs -->
- <Entry>
- <Match>
- <Kind Is="struct"
- Weight="600" />
- </Match>
- <Sort>
- <Static />
- <Access Order="public internal protected-internal protected private" />
- <Name/>
- </Sort>
- </Entry>
-
- <!-- Nested classes -->
- <Entry>
- <Match>
- <Kind Is="class"
- Weight="700" />
- </Match>
- <Sort>
- <Static />
- <Access Order="public internal protected-internal protected private" />
- <Name/>
- </Sort>
- </Entry>
-
- <!-- all other members -->
- <Entry/>
-
- </Pattern>
-</Patterns>
-]]></CustomMemberReorderingPatterns>
- </CSharp>
- <VB>
- <FormatSettings />
- <ImportsSettings />
- <Naming2>
- <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
- <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
- </Naming2>
- </VB>
- <Web>
- <Naming2 />
- </Web>
- <Xaml>
- <Naming2 />
- </Xaml>
- <XML>
- <FormatSettings />
- </XML>
- <FileHeader><![CDATA[/* file.cs$
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>
- It may be used under the terms of the GNU General Public License. */]]></FileHeader>
- <GenerateMemberBody />
- <Naming2>
- <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
- <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
- <ExceptionName IsNull="False">
- </ExceptionName>
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
- <PredefinedRule Inspect="False" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
- <PredefinedRule Inspect="False" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
- <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
- <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
- <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
- <Abbreviation Text="CLI" />
- <Abbreviation Text="DRC" />
- <Abbreviation Text="ID" />
- <Abbreviation Text="MP" />
- <Abbreviation Text="DVD" />
- </Naming2>
- </CodeStyleSettings>
-</Configuration>
\ No newline at end of file diff --git a/win/CS/HandBrakeCS.csproj b/win/CS/HandBrakeCS.csproj index dec9da341..87229cfa6 100644 --- a/win/CS/HandBrakeCS.csproj +++ b/win/CS/HandBrakeCS.csproj @@ -486,7 +486,7 @@ <Target Name="AfterBuild">
</Target>
-->
- <Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.4\Microsoft.StyleCop.targets" />
+ <Import Project="$(ProgramFiles)\MSBuild\StyleCop\v4.5\StyleCop.targets" />
<PropertyGroup Condition=" '$(Configuration)' == 'Install' ">
<PostBuildEvent>
makensis Installer.nsi
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 0937aea29..65b497534 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -287,6 +287,7 @@ </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(ProgramFiles)\MSBuild\StyleCop\v4.5\StyleCop.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/win/CS/ToolWindows/AdvancedAudio.Designer.cs b/win/CS/ToolWindows/AdvancedAudio.Designer.cs index aac2bd574..41e28429a 100644 --- a/win/CS/ToolWindows/AdvancedAudio.Designer.cs +++ b/win/CS/ToolWindows/AdvancedAudio.Designer.cs @@ -33,24 +33,29 @@ this.gainTrackBar = new System.Windows.Forms.TrackBar();
this.lbl_GainValue = new System.Windows.Forms.Label();
this.btn_close = new System.Windows.Forms.Button();
+ this.label2 = new System.Windows.Forms.Label();
+ this.lbl_drc = new System.Windows.Forms.Label();
+ this.tb_drc = new System.Windows.Forms.TrackBar();
((System.ComponentModel.ISupportInitialize)(this.gainTrackBar)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.tb_drc)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(12, 22);
+ this.label1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(54, 13);
+ this.label1.Size = new System.Drawing.Size(97, 13);
this.label1.TabIndex = 1;
- this.label1.Text = "Gain (dB):";
+ this.label1.Text = "Audio Gain (dB):";
//
// gainTrackBar
//
- this.gainTrackBar.Location = new System.Drawing.Point(72, 12);
+ this.gainTrackBar.Location = new System.Drawing.Point(12, 25);
this.gainTrackBar.Maximum = 41;
this.gainTrackBar.Name = "gainTrackBar";
- this.gainTrackBar.Size = new System.Drawing.Size(171, 45);
+ this.gainTrackBar.Size = new System.Drawing.Size(231, 45);
this.gainTrackBar.TabIndex = 2;
this.gainTrackBar.Value = 21;
this.gainTrackBar.Scroll += new System.EventHandler(this.gainTrackBar_Scroll);
@@ -58,18 +63,19 @@ // lbl_GainValue
//
this.lbl_GainValue.AutoSize = true;
- this.lbl_GainValue.Location = new System.Drawing.Point(249, 22);
+ this.lbl_GainValue.Location = new System.Drawing.Point(249, 31);
this.lbl_GainValue.Name = "lbl_GainValue";
- this.lbl_GainValue.Size = new System.Drawing.Size(29, 13);
+ this.lbl_GainValue.Size = new System.Drawing.Size(28, 13);
this.lbl_GainValue.TabIndex = 3;
this.lbl_GainValue.Text = "0 dB";
//
// btn_close
//
+ this.btn_close.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btn_close.FlatAppearance.BorderColor = System.Drawing.Color.Black;
this.btn_close.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_close.Location = new System.Drawing.Point(207, 52);
+ this.btn_close.Location = new System.Drawing.Point(207, 133);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(71, 22);
this.btn_close.TabIndex = 5;
@@ -78,25 +84,64 @@ this.btn_close.UseVisualStyleBackColor = true;
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
//
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label2.Location = new System.Drawing.Point(12, 69);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(98, 13);
+ this.label2.TabIndex = 6;
+ this.label2.Text = "Dynamic Range:";
+ //
+ // lbl_drc
+ //
+ this.lbl_drc.AutoSize = true;
+ this.lbl_drc.Location = new System.Drawing.Point(249, 95);
+ this.lbl_drc.Name = "lbl_drc";
+ this.lbl_drc.Size = new System.Drawing.Size(13, 13);
+ this.lbl_drc.TabIndex = 8;
+ this.lbl_drc.Text = "0";
+ //
+ // tb_drc
+ //
+ this.tb_drc.LargeChange = 0;
+ this.tb_drc.Location = new System.Drawing.Point(15, 89);
+ this.tb_drc.Margin = new System.Windows.Forms.Padding(0);
+ this.tb_drc.Maximum = 31;
+ this.tb_drc.Name = "tb_drc";
+ this.tb_drc.Size = new System.Drawing.Size(228, 45);
+ this.tb_drc.TabIndex = 61;
+ this.tb_drc.Scroll += new System.EventHandler(this.tb_drc_Scroll);
+ //
// AdvancedAudio
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(295, 83);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.ClientSize = new System.Drawing.Size(289, 164);
+ this.Controls.Add(this.tb_drc);
+ this.Controls.Add(this.lbl_drc);
+ this.Controls.Add(this.label2);
this.Controls.Add(this.btn_close);
this.Controls.Add(this.lbl_GainValue);
this.Controls.Add(this.gainTrackBar);
this.Controls.Add(this.label1);
+ this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AdvancedAudio";
+ this.Opacity = 0.95D;
this.ShowIcon = false;
+ this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Advanced Audio";
this.TopMost = true;
((System.ComponentModel.ISupportInitialize)(this.gainTrackBar)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.tb_drc)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -108,5 +153,8 @@ private System.Windows.Forms.TrackBar gainTrackBar;
private System.Windows.Forms.Label lbl_GainValue;
internal System.Windows.Forms.Button btn_close;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label lbl_drc;
+ internal System.Windows.Forms.TrackBar tb_drc;
}
}
\ No newline at end of file diff --git a/win/CS/ToolWindows/AdvancedAudio.cs b/win/CS/ToolWindows/AdvancedAudio.cs index 616d40f70..5adc7c49e 100644 --- a/win/CS/ToolWindows/AdvancedAudio.cs +++ b/win/CS/ToolWindows/AdvancedAudio.cs @@ -6,6 +6,7 @@ namespace Handbrake.ToolWindows
{
using System;
+ using System.Globalization;
using System.Windows.Forms;
using HandBrake.ApplicationServices.Model.Encoding;
@@ -15,6 +16,12 @@ namespace Handbrake.ToolWindows /// </summary>
public partial class AdvancedAudio : Form
{
+ // Culture Info
+ private static readonly CultureInfo Culture = new CultureInfo("en-US", false);
+
+ /// <summary>
+ /// The Advanced Audio Panel
+ /// </summary>
public AdvancedAudio()
{
InitializeComponent();
@@ -55,6 +62,15 @@ namespace Handbrake.ToolWindows }
lbl_GainValue.Text = string.Format("{0} dB", track.Gain);
+
+ // Set the DRC Control
+ double drcValue = 0;
+ int drcCalculated;
+ if (track.DRC != 0)
+ drcValue = ((track.DRC * 10) + 1) - 10;
+ int.TryParse(drcValue.ToString(Culture), out drcCalculated);
+ tb_drc.Value = drcCalculated;
+ lbl_drc.Text = track.DRC.ToString();
}
}
@@ -93,6 +109,14 @@ namespace Handbrake.ToolWindows lbl_GainValue.Text = string.Format("{0} dB", gain);
+ // Figure out the DRC Value
+ double drcValue = 0;
+ int drcCalculated;
+ if (track.DRC != 0)
+ drcValue = ((track.DRC * 10) + 1) - 10;
+ int.TryParse(drcValue.ToString(Culture), out drcCalculated);
+ tb_drc.Value = drcCalculated;
+
// Set the model.
if (this.track == null)
{
@@ -100,5 +124,21 @@ namespace Handbrake.ToolWindows }
this.Track.Gain = gain;
}
+
+ /// <summary>
+ /// The Dynamic Range Controller
+ /// </summary>
+ /// <param name="sender">The Sender</param>
+ /// <param name="e">The Event Args</param>
+ private void tb_drc_Scroll(object sender, EventArgs e)
+ {
+ double value;
+ if (tb_drc.Value == 0) value = 0;
+ else
+ value = ((tb_drc.Value - 1) / 10.0) + 1;
+
+ lbl_drc.Text = value.ToString();
+ track.DRC = value;
+ }
}
}
|