summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-07-25 14:59:19 +0000
committersr55 <[email protected]>2010-07-25 14:59:19 +0000
commitfe6f44ed88e1d69d7e67738d7c10589a19f60568 (patch)
tree610fdbf28fe94d29e108de0b4eb64cdf9ce614bb
parent422ce524afd6b470150a211ee6891af670af1db5 (diff)
WinGui:
- Cleanup stylecop warnings. Import new stylecop for resharper settings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3459 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Controls/Filters.cs3
-rw-r--r--win/C#/Controls/x264Panel.cs8
-rw-r--r--win/C#/Functions/AppcastReader.cs5
-rw-r--r--win/C#/Functions/Main.cs5
-rw-r--r--win/C#/Functions/PresetLoader.cs3
-rw-r--r--win/C#/Functions/Win32.cs5
-rw-r--r--win/C#/HandBrake.5.0.ReSharper379
-rw-r--r--win/C#/HandBrake.5.1.ReSharper337
-rw-r--r--win/C#/HandBrake.ApplicationServices/Functions/Logging.cs3
-rw-r--r--win/C#/HandBrake.ApplicationServices/Functions/Win32.cs5
-rw-r--r--win/C#/HandBrake.ApplicationServices/Init.cs1
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Encode.cs14
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Interfaces/IQueue.cs17
-rw-r--r--win/C#/HandBrake.ApplicationServices/Services/Queue.cs7
-rw-r--r--win/C#/HandBrakeCS.csproj.ReSharper3
-rw-r--r--win/C#/Presets/PresetsHandler.cs2
-rw-r--r--win/C#/Program.cs11
-rw-r--r--win/C#/Settings.StyleCop15
-rw-r--r--win/C#/frmAddPreset.cs4
-rw-r--r--win/C#/frmDownload.cs61
-rw-r--r--win/C#/frmMain.cs15
-rw-r--r--win/C#/frmOptions.cs5
-rw-r--r--win/C#/frmQueue.cs1
23 files changed, 431 insertions, 478 deletions
diff --git a/win/C#/Controls/Filters.cs b/win/C#/Controls/Filters.cs
index 9f75f69d3..dda8c9548 100644
--- a/win/C#/Controls/Filters.cs
+++ b/win/C#/Controls/Filters.cs
@@ -8,6 +8,9 @@ namespace Handbrake.Controls
using System;
using System.Windows.Forms;
+ /// <summary>
+ /// The Filters Panel
+ /// </summary>
public partial class Filters : UserControl
{
/// <summary>
diff --git a/win/C#/Controls/x264Panel.cs b/win/C#/Controls/x264Panel.cs
index 8d223f6ab..1be389376 100644
--- a/win/C#/Controls/x264Panel.cs
+++ b/win/C#/Controls/x264Panel.cs
@@ -8,6 +8,9 @@ namespace Handbrake.Controls
using System;
using System.Windows.Forms;
+ /// <summary>
+ /// The x264 Panel
+ /// </summary>
public partial class x264Panel : UserControl
{
/*
@@ -38,7 +41,10 @@ namespace Handbrake.Controls
{
return rtf_x264Query.Text;
}
- set { rtf_x264Query.Text = value; }
+ set
+ {
+ rtf_x264Query.Text = value;
+ }
}
/// <summary>
diff --git a/win/C#/Functions/AppcastReader.cs b/win/C#/Functions/AppcastReader.cs
index e6bd64b08..6b4a48470 100644
--- a/win/C#/Functions/AppcastReader.cs
+++ b/win/C#/Functions/AppcastReader.cs
@@ -54,9 +54,8 @@ namespace Handbrake.Functions
Match verShort = Regex.Match(result, @"sparkle:shortVersionString=""(([svn]*)([0-9.\s]*))\""");
this.Build = ver.ToString().Replace("sparkle:version=", string.Empty).Replace("\"", string.Empty);
- this.Version = verShort.ToString().Replace("sparkle:shortVersionString=", string.Empty).Replace("\"",
- string.
- Empty);
+ this.Version = verShort.ToString().Replace("sparkle:shortVersionString=", string.Empty).Replace(
+ "\"", string.Empty);
this.DownloadFile = nodeItem["windows"].InnerText;
this.DescriptionUrl = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);
}
diff --git a/win/C#/Functions/Main.cs b/win/C#/Functions/Main.cs
index 148f8f315..4d82fb13b 100644
--- a/win/C#/Functions/Main.cs
+++ b/win/C#/Functions/Main.cs
@@ -411,6 +411,9 @@ namespace Handbrake.Functions
/// <summary>
/// Recover a queue from file.
/// </summary>
+ /// <param name="encodeQueue">
+ /// The encode Queue.
+ /// </param>
public static void RecoverQueue(IQueue encodeQueue)
{
DialogResult result = DialogResult.None;
@@ -449,7 +452,7 @@ namespace Handbrake.Functions
}
/// <summary>
- /// Checks if this HandBrake is running multiple instances
+ /// Gets a value indicating whether HandBrake is running in multi instance mode
/// </summary>
/// <returns>True if the UI has another instance running</returns>
public static bool IsMultiInstance
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 649804914..790d51163 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -26,9 +26,6 @@ namespace Handbrake.Functions
/// <param name="name">
/// Name of the preset
/// </param>
- /// <param name="pictureSettings">
- /// Save picture settings in the preset
- /// </param>
public static void LoadPreset(frmMain mainWindow, QueryParser presetQuery, string name)
{
#region Source
diff --git a/win/C#/Functions/Win32.cs b/win/C#/Functions/Win32.cs
index a50102688..982ba1e95 100644
--- a/win/C#/Functions/Win32.cs
+++ b/win/C#/Functions/Win32.cs
@@ -99,10 +99,7 @@ namespace Handbrake.Functions
/// The lp buffer.
/// </param>
[DllImport("kernel32.dll")]
- public static extern void GlobalMemoryStatus
- (
- ref MEMORYSTATUS lpBuffer
- );
+ public static extern void GlobalMemoryStatus(ref MEMORYSTATUS lpBuffer);
/// <summary>
/// Generate a Console Ctrl Event
diff --git a/win/C#/HandBrake.5.0.ReSharper b/win/C#/HandBrake.5.0.ReSharper
deleted file mode 100644
index 22ca79976..000000000
--- a/win/C#/HandBrake.5.0.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/C#/HandBrake.5.1.ReSharper b/win/C#/HandBrake.5.1.ReSharper
index 4c4f88170..22ca79976 100644
--- a/win/C#/HandBrake.5.1.ReSharper
+++ b/win/C#/HandBrake.5.1.ReSharper
@@ -5,6 +5,20 @@
<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>
@@ -21,12 +35,305 @@
<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 />
+ <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 />
@@ -49,22 +356,24 @@
<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="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="PrivateStaticFields" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
- <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
</Naming2>
</CodeStyleSettings>
</Configuration> \ No newline at end of file
diff --git a/win/C#/HandBrake.ApplicationServices/Functions/Logging.cs b/win/C#/HandBrake.ApplicationServices/Functions/Logging.cs
index aba92dbbe..8231ba6cc 100644
--- a/win/C#/HandBrake.ApplicationServices/Functions/Logging.cs
+++ b/win/C#/HandBrake.ApplicationServices/Functions/Logging.cs
@@ -23,6 +23,9 @@ namespace HandBrake.ApplicationServices.Functions
/// <param name="encJob">
/// The Encode Job Object
/// </param>
+ /// <returns>
+ /// The create cli log header.
+ /// </returns>
public static string CreateCliLogHeader(Job encJob)
{
StringBuilder logHeader = new StringBuilder();
diff --git a/win/C#/HandBrake.ApplicationServices/Functions/Win32.cs b/win/C#/HandBrake.ApplicationServices/Functions/Win32.cs
index a45d7441a..98f224797 100644
--- a/win/C#/HandBrake.ApplicationServices/Functions/Win32.cs
+++ b/win/C#/HandBrake.ApplicationServices/Functions/Win32.cs
@@ -99,10 +99,7 @@ namespace HandBrake.ApplicationServices.Functions
/// The lp buffer.
/// </param>
[DllImport("kernel32.dll")]
- public static extern void GlobalMemoryStatus
- (
- ref MEMORYSTATUS lpBuffer
- );
+ public static extern void GlobalMemoryStatus(ref MEMORYSTATUS lpBuffer);
/// <summary>
/// Generate a Console Ctrl Event
diff --git a/win/C#/HandBrake.ApplicationServices/Init.cs b/win/C#/HandBrake.ApplicationServices/Init.cs
index e8f2e18af..bacf1323a 100644
--- a/win/C#/HandBrake.ApplicationServices/Init.cs
+++ b/win/C#/HandBrake.ApplicationServices/Init.cs
@@ -140,6 +140,5 @@ namespace HandBrake.ApplicationServices
/// Prevent system sleep
/// </summary>
public static bool PreventSleep;
-
}
}
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
index 09099ba13..9ca8cdf58 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Encode.cs
@@ -252,14 +252,15 @@ namespace HandBrake.ApplicationServices.Services
SendKeys.Send("^C");
SendKeys.Flush();
- //if (HbProcess != null)
+ /*/if (HbProcess != null)
//{
// HbProcess.StandardInput.AutoFlush = true;
// HbProcess.StandardInput.WriteLine("^c^z");
- //}
+ //}*/
}
/* Helpers */
+
/// <summary>
/// Save a copy of the log to the users desired location or a default location
/// if this feature is enabled in options.
@@ -314,9 +315,6 @@ namespace HandBrake.ApplicationServices.Services
private void HbProcess_Exited(object sender, EventArgs e)
{
IsEncoding = false;
-
- // ReadFile(null);
-
if (this.EncodeEnded != null)
this.EncodeEnded(this, new EventArgs());
@@ -344,9 +342,6 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// Read the log file
/// </summary>
- /// <param name="n">
- /// The object.
- /// </param>
private void ReadFile()
{
logBuffer = new StringBuilder();
@@ -398,6 +393,9 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// Setup the logging.
/// </summary>
+ /// <param name="encodeJob">
+ /// The encode Job.
+ /// </param>
private void SetupLogging(Job encodeJob)
{
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IQueue.cs b/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IQueue.cs
index 981f3c19e..b489f75bd 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IQueue.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Interfaces/IQueue.cs
@@ -58,16 +58,6 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
int Count { get; }
/// <summary>
- /// Gets a value indicating whether IsEncoding.
- /// </summary>
- bool IsEncoding { get; }
-
- /// <summary>
- /// Gets ActivityLog.
- /// </summary>
- string ActivityLog { get; }
-
- /// <summary>
/// Adds an item to the queue.
/// </summary>
/// <param name="query">
@@ -121,7 +111,12 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
/// <summary>
/// Writes the current state of the queue in the form of a batch (.bat) file.
/// </summary>
- /// <param name="file">The location of the file to write the batch file to.</param>
+ /// <param name="file">
+ /// The location of the file to write the batch file to.
+ /// </param>
+ /// <returns>
+ /// The write batch script to file.
+ /// </returns>
bool WriteBatchScriptToFile(string file);
/// <summary>
diff --git a/win/C#/HandBrake.ApplicationServices/Services/Queue.cs b/win/C#/HandBrake.ApplicationServices/Services/Queue.cs
index 59c084f1c..7500dfec3 100644
--- a/win/C#/HandBrake.ApplicationServices/Services/Queue.cs
+++ b/win/C#/HandBrake.ApplicationServices/Services/Queue.cs
@@ -252,7 +252,12 @@ namespace HandBrake.ApplicationServices.Services
/// <summary>
/// Writes the current state of the queue in the form of a batch (.bat) file.
/// </summary>
- /// <param name="file">The location of the file to write the batch file to.</param>
+ /// <param name="file">
+ /// The location of the file to write the batch file to.
+ /// </param>
+ /// <returns>
+ /// The write batch script to file.
+ /// </returns>
public bool WriteBatchScriptToFile(string file)
{
string queries = string.Empty;
diff --git a/win/C#/HandBrakeCS.csproj.ReSharper b/win/C#/HandBrakeCS.csproj.ReSharper
deleted file mode 100644
index 9b0507870..000000000
--- a/win/C#/HandBrakeCS.csproj.ReSharper
+++ /dev/null
@@ -1,3 +0,0 @@
-<Configuration>
- <Localizable>No</Localizable>
-</Configuration> \ No newline at end of file
diff --git a/win/C#/Presets/PresetsHandler.cs b/win/C#/Presets/PresetsHandler.cs
index 971a47859..d53a64ddd 100644
--- a/win/C#/Presets/PresetsHandler.cs
+++ b/win/C#/Presets/PresetsHandler.cs
@@ -46,7 +46,7 @@ namespace Handbrake.Presets
private List<Preset> userPresets = new List<Preset>();
/// <summary>
- /// Last preset added
+ /// Gets or sets the Last preset added
/// </summary>
public Preset LastPresetAdded { get; set; }
diff --git a/win/C#/Program.cs b/win/C#/Program.cs
index 1c428c874..ff9174670 100644
--- a/win/C#/Program.cs
+++ b/win/C#/Program.cs
@@ -12,10 +12,9 @@ namespace Handbrake
using HandBrake.ApplicationServices;
+ using Handbrake.Presets;
using Handbrake.Properties;
- using Presets;
-
/// <summary>
/// HandBrake Starts Here
/// </summary>
@@ -24,6 +23,9 @@ namespace Handbrake
/// <summary>
/// The main entry point for the application.
/// </summary>
+ /// <param name="args">
+ /// The args.
+ /// </param>
[STAThread]
public static void Main(string[] args)
{
@@ -121,9 +123,6 @@ namespace Handbrake
}
}
-
- public static int InstanceId = 0;
-
-
+ public static int InstanceId;
}
} \ No newline at end of file
diff --git a/win/C#/Settings.StyleCop b/win/C#/Settings.StyleCop
index 73638a716..a9622d880 100644
--- a/win/C#/Settings.StyleCop
+++ b/win/C#/Settings.StyleCop
@@ -87,6 +87,11 @@
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
+ <Rule Name="AccessModifierMustBeDeclared">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
@@ -102,6 +107,11 @@
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
+ <Rule Name="ClosingParenthesisMustBeSpacedCorrectly">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
@@ -222,6 +232,11 @@
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
+ <Rule Name="UsingDirectivesMustBeOrderedAlphabeticallyByNamespace">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
diff --git a/win/C#/frmAddPreset.cs b/win/C#/frmAddPreset.cs
index 22ba835d7..8a497d7ac 100644
--- a/win/C#/frmAddPreset.cs
+++ b/win/C#/frmAddPreset.cs
@@ -28,7 +28,9 @@ namespace Handbrake
/// <summary>
/// Initializes a new instance of the <see cref="frmAddPreset"/> class.
/// </summary>
- /// <param name="mainWindow"></param>
+ /// <param name="mainWindow">
+ /// The Main Window
+ /// </param>
/// <param name="presetHandler">
/// The preset handler.
/// </param>
diff --git a/win/C#/frmDownload.cs b/win/C#/frmDownload.cs
index a3067e17d..e7f06f6ea 100644
--- a/win/C#/frmDownload.cs
+++ b/win/C#/frmDownload.cs
@@ -12,15 +12,18 @@ namespace Handbrake
using System.Threading;
using System.Windows.Forms;
+ /// <summary>
+ /// The Download Window
+ /// </summary>
public partial class frmDownload : Form
{
- private readonly Thread _downloadThread;
- private Stream _responceStream;
- private Stream _loacalStream;
- private HttpWebRequest _webRequest;
- private HttpWebResponse _webResponse;
- private static int _progress;
- private bool _killThread;
+ private readonly Thread downloadThread;
+ private Stream responceStream;
+ private Stream localStream;
+ private HttpWebRequest webRequest;
+ private HttpWebResponse webResponse;
+ private static int progress;
+ private bool killThread;
private delegate void UpdateProgessCallback(long bytesRead, long totalBytes);
@@ -32,14 +35,14 @@ namespace Handbrake
{
InitializeComponent();
- _downloadThread = new Thread(Download);
- _downloadThread.Start(filename);
+ this.downloadThread = new Thread(Download);
+ this.downloadThread.Start(filename);
}
private void Download(object file)
{
string tempPath = Path.Combine(Path.GetTempPath(), "handbrake-setup.exe");
- string hbUpdate = (string) file;
+ string hbUpdate = (string)file;
WebClient wcDownload = new WebClient();
try
@@ -47,29 +50,29 @@ namespace Handbrake
if (File.Exists(tempPath))
File.Delete(tempPath);
- _webRequest = (HttpWebRequest) WebRequest.Create(hbUpdate);
- _webRequest.Credentials = CredentialCache.DefaultCredentials;
- _webResponse = (HttpWebResponse) _webRequest.GetResponse();
- long fileSize = _webResponse.ContentLength;
+ this.webRequest = (HttpWebRequest)WebRequest.Create(hbUpdate);
+ this.webRequest.Credentials = CredentialCache.DefaultCredentials;
+ this.webResponse = (HttpWebResponse)this.webRequest.GetResponse();
+ long fileSize = this.webResponse.ContentLength;
- _responceStream = wcDownload.OpenRead(hbUpdate);
- _loacalStream = new FileStream(tempPath, FileMode.Create, FileAccess.Write, FileShare.None);
+ this.responceStream = wcDownload.OpenRead(hbUpdate);
+ this.localStream = new FileStream(tempPath, FileMode.Create, FileAccess.Write, FileShare.None);
int bytesSize;
byte[] downBuffer = new byte[2048];
long flength = 0;
- while ((bytesSize = _responceStream.Read(downBuffer, 0, downBuffer.Length)) > 0)
+ while ((bytesSize = this.responceStream.Read(downBuffer, 0, downBuffer.Length)) > 0)
{
- if (_killThread)
+ if (this.killThread)
return;
- _loacalStream.Write(downBuffer, 0, bytesSize);
- flength = _loacalStream.Length;
- Invoke(new UpdateProgessCallback(this.UpdateProgress), new object[] {_loacalStream.Length, fileSize});
+ this.localStream.Write(downBuffer, 0, bytesSize);
+ flength = this.localStream.Length;
+ Invoke(new UpdateProgessCallback(this.UpdateProgress), new object[] {this.localStream.Length, fileSize});
}
- _responceStream.Close();
- _loacalStream.Close();
+ this.responceStream.Close();
+ this.localStream.Close();
if (flength != fileSize)
Invoke(new DownloadFailedCallback(this.DownloadFailed));
@@ -85,8 +88,8 @@ namespace Handbrake
private void UpdateProgress(long bytesRead, long totalBytes)
{
long p = (bytesRead * 100) / totalBytes;
- int.TryParse(p.ToString(), out _progress);
- progress_download.Value = _progress;
+ int.TryParse(p.ToString(), out progress);
+ progress_download.Value = progress;
lblProgress.Text = (bytesRead / 1024) + "k of " + (totalBytes / 1024) + "k ";
}
@@ -108,11 +111,11 @@ namespace Handbrake
private void btn_cancel_Click(object sender, EventArgs e)
{
- _killThread = true;
+ this.killThread = true;
lblProgress.Text = "Cancelling ...";
- if (_webResponse != null) _webResponse.Close();
- if (_responceStream != null) _responceStream.Close();
- if (_loacalStream != null) _loacalStream.Close();
+ if (this.webResponse != null) this.webResponse.Close();
+ if (this.responceStream != null) this.responceStream.Close();
+ if (this.localStream != null) this.localStream.Close();
this.Close();
}
}
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 83135c6c0..642eb1f84 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -26,6 +26,9 @@ namespace Handbrake
using Presets;
using Properties;
+ /// <summary>
+ /// The Main Window
+ /// </summary>
public partial class frmMain : Form
{
// Objects which may be used by one or more other objects *************
@@ -910,7 +913,7 @@ namespace Handbrake
MessageBox.Show("This feature has not been implimented yet.", "Not Implimented", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
- SaveFileDialog savefiledialog = new SaveFileDialog();
+ /*SaveFileDialog savefiledialog = new SaveFileDialog();
savefiledialog.Filter = "plist|*.plist";
if (treeView_presets.SelectedNode != null)
@@ -921,7 +924,7 @@ namespace Handbrake
Preset preset = presetHandler.GetPreset(treeView_presets.SelectedNode.Text);
PlistPresetHandler.Export(savefiledialog.FileName, preset);
}
- }
+ }*/
}
#endregion
@@ -1126,7 +1129,6 @@ namespace Handbrake
lbl_encode.Text = encodeQueue.Count + " encode(s) pending in the queue";
queueWindow.Show();
-
}
/// <summary>
@@ -1288,7 +1290,6 @@ namespace Handbrake
int id;
if (int.TryParse(driveId, out id))
{
-
this.dvdDrivePath = drives[id].RootDirectory;
this.dvdDriveLabel = drives[id].VolumeLabel;
@@ -1761,7 +1762,7 @@ namespace Handbrake
}
}
- private double _cachedCqStep = Properties.Settings.Default.x264cqstep;
+ private double cachedCqStep = Properties.Settings.Default.x264cqstep;
/// <summary>
/// Update the CQ slider for x264 for a new CQ step. This is set from option
@@ -1769,7 +1770,7 @@ namespace Handbrake
public void setQualityFromSlider()
{
// Work out the current RF value.
- double cqStep = _cachedCqStep;
+ double cqStep = this.cachedCqStep;
double rfValue = 51.0 - slider_videoQuality.Value * cqStep;
// Change the maximum value for the slider
@@ -1788,7 +1789,7 @@ namespace Handbrake
}
// Cache the CQ step for the next calculation
- _cachedCqStep = Properties.Settings.Default.x264cqstep;
+ this.cachedCqStep = Properties.Settings.Default.x264cqstep;
}
private void slider_videoQuality_Scroll(object sender, EventArgs e)
diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs
index 4475d9071..6af23b0ed 100644
--- a/win/C#/frmOptions.cs
+++ b/win/C#/frmOptions.cs
@@ -10,12 +10,15 @@ namespace Handbrake
using System.Diagnostics;
using System.Globalization;
using System.Windows.Forms;
- using Functions;
using HandBrake.ApplicationServices;
+ using Handbrake.Functions;
using Handbrake.Properties;
+ /// <summary>
+ /// The Options Window
+ /// </summary>
public partial class frmOptions : Form
{
private frmMain mainWindow;
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs
index 7d52ddef5..e4c5089f9 100644
--- a/win/C#/frmQueue.cs
+++ b/win/C#/frmQueue.cs
@@ -425,6 +425,7 @@ namespace Handbrake
}
/* Right Click Menu */
+
/// <summary>
/// Handle the Move Up Menu Item
/// </summary>