*/
if (hbInstanceNum > 1)
{
- alertTitle = [NSString stringWithFormat:
- NSLocalizedString(@"There is already an instance of HandBrake running.", @"")];
- NSBeginCriticalAlertSheet(
+ alertTitle = [NSString stringWithFormat:
+ NSLocalizedString(@"There is already an instance of HandBrake running.", @"")];
+ NSBeginCriticalAlertSheet(
alertTitle,
NSLocalizedString(@"Reload Queue", nil),
nil,
}
else
{
- if (fWorkingCount > 0 || fPendingCount > 0)
+ if (fWorkingCount > 0)
{
- if (fWorkingCount > 0)
- {
- alertTitle = [NSString stringWithFormat:
- NSLocalizedString(@"HandBrake Has Detected %d Previously Encoding Item(s) and %d Pending Item(s) In Your Queue.", @""),
- fWorkingCount,fPendingCount];
- }
- else
- {
- alertTitle = [NSString stringWithFormat:
- NSLocalizedString(@"HandBrake Has Detected %d Pending Item(s) In Your Queue.", @""),
- fPendingCount];
- }
-
- NSBeginCriticalAlertSheet(
- alertTitle,
- NSLocalizedString(@"Reload Queue", nil),
- nil,
- NSLocalizedString(@"Empty Queue", nil),
- fWindow, self,
- nil, @selector(didDimissReloadQueue:returnCode:contextInfo:), nil,
- NSLocalizedString(@" Do you want to reload them ?", nil));
+ alertTitle = [NSString stringWithFormat:
+ NSLocalizedString(@"HandBrake Has Detected %d Previously Encoding Item and %d Pending Item(s) In Your Queue.", @""),
+ fWorkingCount,fPendingCount];
}
else
{
- /* Since we addressed any pending or previously encoding items above, we go ahead and make sure the queue
- * is empty of any finished items or cancelled items */
- [self clearQueueAllItems];
- /* We show whichever open source window specified in LaunchSourceBehavior preference key */
- if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"LaunchSourceBehavior"] isEqualToString: @"Open Source"])
- {
- [self browseSources:nil];
- }
-
- if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"LaunchSourceBehavior"] isEqualToString: @"Open Source (Title Specific)"])
- {
- [self browseSources:(id)fOpenSourceTitleMMenu];
- }
+ alertTitle = [NSString stringWithFormat:
+ NSLocalizedString(@"HandBrake Has Detected %d Pending Item(s) In Your Queue.", @""),
+ fPendingCount];
}
+ NSBeginCriticalAlertSheet(
+ alertTitle,
+ NSLocalizedString(@"Reload Queue", nil),
+ nil,
+ NSLocalizedString(@"Empty Queue", nil),
+ fWindow, self,
+ nil, @selector(didDimissReloadQueue:returnCode:contextInfo:), nil,
+ NSLocalizedString(@" Do you want to reload them ?", nil));
}
+
}
else
{
{
if ([[runningAppsDictionary valueForKey:@"NSApplicationName"] isEqualToString:@"HandBrake"])
{
+ hbInstances++;
/*Report the path to each active instances app path */
runningInstancePidNum = [[runningAppsDictionary valueForKey:@"NSApplicationProcessIdentifier"] intValue];
runningInstanceAppPath = [runningAppsDictionary valueForKey:@"NSApplicationPath"];
/* Tell fQueueController what our pidNum is */
[fQueueController setPidNum:pidNum];
}
- hbInstances++;
- }
+ }
}
return hbInstances;
}
- (void) didDimissReloadQueue: (NSWindow *)sheet returnCode: (int)returnCode contextInfo: (void *)contextInfo
{
-
- [self writeToActivityLog: "didDimissReloadQueue number of hb instances:%d", hbInstanceNum];
if (returnCode == NSAlertOtherReturn)
{
- [self writeToActivityLog: "didDimissReloadQueue NSAlertOtherReturn Chosen"];
[self clearQueueAllItems];
/* We show whichever open source window specified in LaunchSourceBehavior preference key */
}
else
{
- [self writeToActivityLog: "didDimissReloadQueue First Button Chosen"];
- if (hbInstanceNum == 1)
+ if ([self hbInstances] == 1)
{
-
[self setQueueEncodingItemsAsPending];
}
[self showQueueWindow:NULL];
/* we look here to see if the preset is we move on to the next one */
while ( tempObject = [enumerator nextObject] )
{
- /* We want to keep any queue item that is pending or was previously being encoded */
- if ([[tempObject objectForKey:@"Status"] intValue] == 1 || [[tempObject objectForKey:@"Status"] intValue] == 2)
+ /* If the queue item is marked as "encoding" (1)
+ * then change its status back to pending (2) which effectively
+ * puts it back into the queue to be encoded
+ */
+ if ([[tempObject objectForKey:@"Status"] intValue] == 1)
{
- /* If the queue item is marked as "encoding" (1)
- * then change its status back to pending (2) which effectively
- * puts it back into the queue to be encoded
- */
- if ([[tempObject objectForKey:@"Status"] intValue] == 1)
- {
- [tempObject setObject:[NSNumber numberWithInt: 2] forKey:@"Status"];
- }
- [tempArray addObject:tempObject];
+ [tempObject setObject:[NSNumber numberWithInt: 2] forKey:@"Status"];
}
+ [tempArray addObject:tempObject];
}
[QueueFileArray setArray:tempArray];
using System;\r
using System.Windows.Forms;\r
\r
- /// <summary>\r
- /// The Filters Panel\r
- /// </summary>\r
public partial class Filters : UserControl\r
{\r
+ /// <summary>\r
+ /// The Filter settings have changed\r
+ /// </summary>\r
+ public event EventHandler FilterSettingsChanged;\r
+\r
/// <summary>\r
/// Initializes a new instance of the <see cref="Filters"/> class. \r
/// Creates a new instance of Filters\r
drop_detelecine.SelectedIndex = 0;\r
}\r
\r
- /// <summary>\r
- /// The Filter settings have changed\r
- /// </summary>\r
- public event EventHandler FilterSettingsChanged;\r
-\r
/// <summary>\r
/// Gets the CLI query for the query generator.\r
/// </summary>\r
}\r
\r
// Controls\r
-\r
- /// <summary>\r
- /// Delecine Selected Index Changed\r
- /// </summary>\r
- /// <param name="sender">The Sender</param>\r
- /// <param name="e">The EventArgs</param>\r
private void DropDetelecineSelectedIndexChanged(object sender, EventArgs e)\r
{\r
text_customDT.Visible = drop_detelecine.Text == "Custom";\r
this.FilterSettingsChanged(this, new EventArgs());\r
}\r
\r
- /// <summary>\r
- /// Decomb Selected Index Changed\r
- /// </summary>\r
- /// <param name="sender">The Sender</param>\r
- /// <param name="e">The EventArgs</param>\r
private void DropDecombSelectedIndexChanged(object sender, EventArgs e)\r
{\r
text_customDC.Visible = drop_decomb.Text == "Custom";\r
this.FilterSettingsChanged(this, new EventArgs());\r
}\r
\r
- /// <summary>\r
- /// DeInterlace Selected Index Changed\r
- /// </summary>\r
- /// <param name="sender">The Sender</param>\r
- /// <param name="e">The EventArgs</param>\r
private void DropDeinterlaceSelectedIndexChanged(object sender, EventArgs e)\r
{\r
text_customDI.Visible = drop_deinterlace.Text == "Custom";\r
this.FilterSettingsChanged(this, new EventArgs());\r
}\r
\r
- /// <summary>\r
- /// DeNoise Selected Index Changed\r
- /// </summary>\r
- /// <param name="sender">The Sender</param>\r
- /// <param name="e">The EventArgs</param>\r
private void DropDenoiseSelectedIndexChanged(object sender, EventArgs e)\r
{\r
text_customDN.Visible = drop_denoise.Text == "Custom";\r
this.FilterSettingsChanged(this, new EventArgs());\r
}\r
\r
- /// <summary>\r
- /// Deblock Changed\r
- /// </summary>\r
- /// <param name="sender">The Sender</param>\r
- /// <param name="e">The EventArgs</param>\r
private void SliderDeblockScroll(object sender, EventArgs e)\r
{\r
lbl_deblockVal.Text = slider_deblock.Value == 4 ? "Off" : slider_deblock.Value.ToString();\r
{\r
using System;\r
using System.Drawing;\r
+ using System.Globalization;\r
using System.Windows.Forms;\r
\r
using HandBrake.ApplicationServices.Parsing;\r
/// </summary>\r
public partial class PictureSettings : UserControl\r
{\r
+ private readonly CultureInfo culture = new CultureInfo("en-US", false);\r
private bool preventChangingWidth;\r
private bool preventChangingHeight;\r
private bool preventChangingCustom;\r
// Picture Controls\r
private void TextWidthValueChanged(object sender, EventArgs e)\r
{\r
+ if (Properties.Settings.Default.disableResCalc)\r
+ return;\r
+\r
if (preventChangingWidth)\r
return;\r
\r
\r
private void TextHeightValueChanged(object sender, EventArgs e)\r
{\r
+ if (Properties.Settings.Default.disableResCalc)\r
+ return;\r
+\r
if (preventChangingHeight)\r
return;\r
\r
\r
private void CheckKeepArCheckedChanged(object sender, EventArgs e)\r
{\r
+ if (Properties.Settings.Default.disableResCalc)\r
+ return;\r
+\r
// Force TextWidth to recalc height\r
if (check_KeepAR.Checked)\r
TextWidthValueChanged(this, new EventArgs());\r
\r
private void UpdownDisplayWidthValueChanged(object sender, EventArgs e)\r
{\r
+ if (Properties.Settings.Default.disableResCalc)\r
+ return;\r
+\r
if (preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Unchecked)\r
{\r
preventChangingCustom = true;\r
\r
// Update value\r
preventChangingHeight = true;\r
- text_height.Value = modulusHeight;\r
+ text_height.Value = (decimal)modulusHeight;\r
updownParWidth.Value = updownDisplayWidth.Value;\r
updownParHeight.Value = text_width.Value;\r
preventChangingHeight = false;\r
srtFile = drp_subtitleTracks.SelectedItem.ToString();\r
srtLangVal = srt_lang.SelectedItem.ToString();\r
srtCode = srt_charcode.SelectedItem.ToString();\r
- srtOffsetMs = (int)srt_offset.Value;\r
+ srtOffsetMs = (int) srt_offset.Value;\r
if (defaultSub == "Yes") SetNoSrtDefault();\r
}\r
else\r
\r
SubtitleInfo track = new SubtitleInfo\r
{\r
- Track = trackName,\r
- Forced = forcedVal,\r
- Burned = burnedVal,\r
- Default = defaultSub,\r
- SrtLang = srtLangVal,\r
- SrtCharCode = srtCode,\r
- SrtOffset = srtOffsetMs,\r
- SrtPath = srtPath,\r
+ Track = trackName, \r
+ Forced = forcedVal, \r
+ Burned = burnedVal, \r
+ Default = defaultSub, \r
+ SrtLang = srtLangVal, \r
+ SrtCharCode = srtCode, \r
+ SrtOffset = srtOffsetMs, \r
+ SrtPath = srtPath, \r
SrtFileName = srtFile\r
};\r
\r
\r
int c = 0;\r
if (lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text.ToLower().Contains(".srt"))\r
- // We have an SRT\r
+ // We have an SRT\r
{\r
foreach (var item in drp_subtitleTracks.Items)\r
{\r
lv_subList.Select();\r
\r
subList[lv_subList.SelectedIndices[0]].Forced = check_forced.Checked ? "Yes" : "No";\r
- // Update SubList List<SubtitleInfo> \r
+ // Update SubList List<SubtitleInfo> \r
}\r
\r
/// <summary>\r
lv_subList.Select();\r
\r
subList[lv_subList.SelectedIndices[0]].Burned = check_burned.Checked ? "Yes" : "No";\r
- // Update SubList List<SubtitleInfo> \r
+ // Update SubList List<SubtitleInfo> \r
}\r
\r
/// <summary>\r
lv_subList.Select();\r
\r
subList[lv_subList.SelectedIndices[0]].Default = check_default.Checked ? "Yes" : "No";\r
- // Update SubList List<SubtitleInfo>\r
+ // Update SubList List<SubtitleInfo>\r
}\r
\r
/// <summary>\r
lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[6].Text = srt_offset.Value.ToString();\r
lv_subList.Select();\r
\r
- subList[lv_subList.SelectedIndices[0]].SrtOffset = (int)srt_offset.Value;\r
+ subList[lv_subList.SelectedIndices[0]].SrtOffset = (int) srt_offset.Value;\r
+ // Update SubList List<SubtitleInfo>\r
}\r
\r
/// <summary>\r
lv_subList.Select();\r
\r
subList[lv_subList.SelectedIndices[0]].SrtCharCode = srt_charcode.SelectedItem.ToString();\r
- // Update SubList List<SubtitleInfo>\r
+ // Update SubList List<SubtitleInfo>\r
}\r
\r
/// <summary>\r
lv_subList.Select();\r
\r
subList[lv_subList.SelectedIndices[0]].SrtLang = srt_lang.SelectedItem.ToString();\r
- // Update SubList List<SubtitleInfo>\r
+ // Update SubList List<SubtitleInfo>\r
}\r
\r
/* Right Click Menu */\r
using System;\r
using System.Windows.Forms;\r
\r
- /// <summary>\r
- /// The Advanced Panel\r
- /// </summary>\r
public partial class x264Panel : UserControl\r
{\r
/* \r
{\r
return rtf_x264Query.Text;\r
}\r
- set\r
- {\r
- rtf_x264Query.Text = value;\r
- }\r
+ set { rtf_x264Query.Text = value; }\r
}\r
\r
/// <summary>\r
\r
private void widgetControlChanged(object sender, EventArgs e)\r
{\r
- Control changedControlName = (Control)sender;\r
+ Control changedControlName = (Control) sender;\r
string controlName = string.Empty;\r
\r
switch (changedControlName.Name.Trim())\r
Match verShort = Regex.Match(result, @"sparkle:shortVersionString=""(([svn]*)([0-9.\s]*))\""");\r
\r
this.Build = ver.ToString().Replace("sparkle:version=", string.Empty).Replace("\"", string.Empty);\r
- this.Version = verShort.ToString().Replace("sparkle:shortVersionString=", string.Empty).Replace("\"", string.Empty);\r
+ this.Version = verShort.ToString().Replace("sparkle:shortVersionString=", string.Empty).Replace("\"", \r
+ string.\r
+ Empty);\r
this.DownloadFile = nodeItem["windows"].InnerText;\r
this.DescriptionUrl = new Uri(nodeItem["sparkle:releaseNotesLink"].InnerText);\r
}\r
/// <summary>\r
/// Recover a queue from file.\r
/// </summary>\r
- /// <param name="encodeQueue"> The IQueue Object</param>\r
public static void RecoverQueue(IQueue encodeQueue)\r
{\r
DialogResult result = DialogResult.None;\r
}\r
\r
/// <summary>\r
- /// Gets a value indicating whether this this application is running in multi instance mode.\r
+ /// Checks if this HandBrake is running multiple instances\r
/// </summary>\r
/// <returns>True if the UI has another instance running</returns>\r
public static bool IsMultiInstance\r
/// <param name="name">\r
/// Name of the preset\r
/// </param>\r
+ /// <param name="pictureSettings">\r
+ /// Save picture settings in the preset\r
+ /// </param>\r
public static void LoadPreset(frmMain mainWindow, QueryParser presetQuery, string name)\r
{\r
#region Source\r
[DllImport("user32.dll")]\r
public static extern int ExitWindowsEx(int uFlags, int dwReason);\r
\r
+ /// <summary>\r
+ /// System Memory Status\r
+ /// </summary>\r
+ public struct MEMORYSTATUS // Unused var's are required here.\r
+ {\r
+ /// <summary>\r
+ /// Unknown\r
+ /// </summary>\r
+ public UInt32 dwLength;\r
+\r
+ /// <summary>\r
+ /// Memory Load\r
+ /// </summary>\r
+ public UInt32 dwMemoryLoad;\r
+\r
+ /// <summary>\r
+ /// Total Physical Memory\r
+ /// </summary>\r
+ public UInt32 dwTotalPhys; // Used\r
+\r
+ /// <summary>\r
+ /// Available Physical Memory\r
+ /// </summary>\r
+ public UInt32 dwAvailPhys;\r
+\r
+ /// <summary>\r
+ /// Total Page File\r
+ /// </summary>\r
+ public UInt32 dwTotalPageFile;\r
+\r
+ /// <summary>\r
+ /// Available Page File\r
+ /// </summary>\r
+ public UInt32 dwAvailPageFile;\r
+\r
+ /// <summary>\r
+ /// Total Virtual Memory\r
+ /// </summary>\r
+ public UInt32 dwTotalVirtual;\r
+\r
+ /// <summary>\r
+ /// Available Virtual Memory\r
+ /// </summary>\r
+ public UInt32 dwAvailVirtual;\r
+ }\r
+\r
/// <summary>\r
/// Global Memory Status\r
/// </summary>\r
/// The lp buffer.\r
/// </param>\r
[DllImport("kernel32.dll")]\r
- public static extern void GlobalMemoryStatus(ref MEMORYSTATUS lpBuffer);\r
+ public static extern void GlobalMemoryStatus\r
+ (\r
+ ref MEMORYSTATUS lpBuffer\r
+ );\r
\r
/// <summary>\r
/// Generate a Console Ctrl Event\r
}\r
\r
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]\r
- public static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);\r
+ static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);\r
\r
[FlagsAttribute]\r
public enum EXECUTION_STATE : uint\r
{\r
SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS);\r
}\r
-\r
- /// <summary>\r
- /// System Memory Status\r
- /// </summary>\r
- public struct MEMORYSTATUS // Unused var's are required here.\r
- {\r
- /// <summary>\r
- /// Unknown\r
- /// </summary>\r
- public UInt32 dwLength;\r
-\r
- /// <summary>\r
- /// Memory Load\r
- /// </summary>\r
- public UInt32 dwMemoryLoad;\r
-\r
- /// <summary>\r
- /// Total Physical Memory\r
- /// </summary>\r
- public UInt32 dwTotalPhys; // Used\r
-\r
- /// <summary>\r
- /// Available Physical Memory\r
- /// </summary>\r
- public UInt32 dwAvailPhys;\r
-\r
- /// <summary>\r
- /// Total Page File\r
- /// </summary>\r
- public UInt32 dwTotalPageFile;\r
-\r
- /// <summary>\r
- /// Available Page File\r
- /// </summary>\r
- public UInt32 dwAvailPageFile;\r
-\r
- /// <summary>\r
- /// Total Virtual Memory\r
- /// </summary>\r
- public UInt32 dwTotalVirtual;\r
-\r
- /// <summary>\r
- /// Available Virtual Memory\r
- /// </summary>\r
- public UInt32 dwAvailVirtual;\r
- }\r
}\r
}\r
--- /dev/null
+<Configuration>\r
+ <CodeStyleSettings>\r
+ <ExternalPath IsNull="False">\r
+ </ExternalPath>\r
+ <Sharing>SOLUTION</Sharing>\r
+ <CSharp>\r
+ <FormatSettings>\r
+ <ALIGN_MULTILINE_ARGUMENT>False</ALIGN_MULTILINE_ARGUMENT>\r
+ <BLANK_LINES_AROUND_SINGLE_LINE_FIELD>1</BLANK_LINES_AROUND_SINGLE_LINE_FIELD>\r
+ <BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>1</BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>\r
+ <BLANK_LINES_BETWEEN_USING_GROUPS>1</BLANK_LINES_BETWEEN_USING_GROUPS>\r
+ <FORCE_ATTRIBUTE_STYLE>SEPARATE</FORCE_ATTRIBUTE_STYLE>\r
+ <FORCE_FOR_BRACES_STYLE>ALWAYS_ADD</FORCE_FOR_BRACES_STYLE>\r
+ <FORCE_FOREACH_BRACES_STYLE>ALWAYS_ADD</FORCE_FOREACH_BRACES_STYLE>\r
+ <FORCE_IFELSE_BRACES_STYLE>ALWAYS_ADD</FORCE_IFELSE_BRACES_STYLE>\r
+ <FORCE_WHILE_BRACES_STYLE>ALWAYS_ADD</FORCE_WHILE_BRACES_STYLE>\r
+ <INDENT_ANONYMOUS_METHOD_BLOCK>False</INDENT_ANONYMOUS_METHOD_BLOCK>\r
+ <INDENT_EMBRACED_INITIALIZER_BLOCK>False</INDENT_EMBRACED_INITIALIZER_BLOCK>\r
+ <KEEP_BLANK_LINES_IN_CODE>1</KEEP_BLANK_LINES_IN_CODE>\r
+ <KEEP_BLANK_LINES_IN_DECLARATIONS>1</KEEP_BLANK_LINES_IN_DECLARATIONS>\r
+ <KEEP_USER_LINEBREAKS>False</KEEP_USER_LINEBREAKS>\r
+ <MODIFIERS_ORDER IsNull="False">\r
+ <Item>public</Item>\r
+ <Item>protected</Item>\r
+ <Item>internal</Item>\r
+ <Item>private</Item>\r
+ <Item>new</Item>\r
+ <Item>abstract</Item>\r
+ <Item>virtual</Item>\r
+ <Item>override</Item>\r
+ <Item>sealed</Item>\r
+ <Item>static</Item>\r
+ <Item>readonly</Item>\r
+ <Item>extern</Item>\r
+ <Item>unsafe</Item>\r
+ <Item>volatile</Item>\r
+ </MODIFIERS_ORDER>\r
+ <PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>False</PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>\r
+ <PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>False</PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>\r
+ <PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>False</PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>\r
+ <PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>False</PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>\r
+ <PLACE_WHILE_ON_NEW_LINE>True</PLACE_WHILE_ON_NEW_LINE>\r
+ <REDUNDANT_THIS_QUALIFIER_STYLE>ALWAYS_USE</REDUNDANT_THIS_QUALIFIER_STYLE>\r
+ <SIMPLE_EMBEDDED_STATEMENT_STYLE>ON_SINGLE_LINE</SIMPLE_EMBEDDED_STATEMENT_STYLE>\r
+ <SPACE_AFTER_TYPECAST_PARENTHESES>False</SPACE_AFTER_TYPECAST_PARENTHESES>\r
+ <SPACE_AROUND_MULTIPLICATIVE_OP>True</SPACE_AROUND_MULTIPLICATIVE_OP>\r
+ <SPACE_BEFORE_SIZEOF_PARENTHESES>False</SPACE_BEFORE_SIZEOF_PARENTHESES>\r
+ <SPACE_BEFORE_TYPEOF_PARENTHESES>False</SPACE_BEFORE_TYPEOF_PARENTHESES>\r
+ <SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>True</SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>\r
+ <STICK_COMMENT>False</STICK_COMMENT>\r
+ <WRAP_AFTER_DECLARATION_LPAR>True</WRAP_AFTER_DECLARATION_LPAR>\r
+ <WRAP_AFTER_INVOCATION_LPAR>True</WRAP_AFTER_INVOCATION_LPAR>\r
+ <WRAP_ARGUMENTS_STYLE>CHOP_IF_LONG</WRAP_ARGUMENTS_STYLE>\r
+ <WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>True</WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>\r
+ <WRAP_EXTENDS_LIST_STYLE>CHOP_IF_LONG</WRAP_EXTENDS_LIST_STYLE>\r
+ <WRAP_PARAMETERS_STYLE>CHOP_IF_LONG</WRAP_PARAMETERS_STYLE>\r
+ </FormatSettings>\r
+ <UsingsSettings>\r
+ <AddImportsToDeepestScope>True</AddImportsToDeepestScope>\r
+ <QualifiedUsingAtNestedScope>True</QualifiedUsingAtNestedScope>\r
+ </UsingsSettings>\r
+ <Naming2>\r
+ <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>\r
+ <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>\r
+ <ExceptionName IsNull="False">\r
+ </ExceptionName>\r
+ <OverrideDefaultSettings>True</OverrideDefaultSettings>\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />\r
+ <PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />\r
+ <PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />\r
+ </Naming2>\r
+ <CustomMemberReorderingPatterns><![CDATA[<?xml version="1.0" encoding="utf-8"?>\r
+<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">\r
+\r
+ <!-- Do not reorder COM interfaces -->\r
+ <Pattern>\r
+ <Match>\r
+ <And Weight="2000">\r
+ <Kind Is="interface"/>\r
+ <HasAttribute CLRName="System.Runtime.InteropServices.InterfaceTypeAttribute"\r
+ Inherit="true"/>\r
+ </And>\r
+ </Match>\r
+ </Pattern>\r
+\r
+ <!-- Do not reorder P/Invoke structs -->\r
+ <Pattern>\r
+ <Match>\r
+ <And Weight="2000">\r
+ <Or>\r
+ <Kind Is="struct"/>\r
+ <Kind Is="class"/>\r
+ </Or>\r
+ <HasAttribute CLRName="System.Runtime.InteropServices.StructLayoutAttribute"\r
+ Inherit="true"/>\r
+ </And>\r
+ </Match>\r
+ </Pattern>\r
+\r
+ <!-- Do not reorder P/Invoke classes (called xxxNativeMethods) -->\r
+ <Pattern>\r
+ <Match>\r
+ <And Weight="2000">\r
+ <Kind Is="class"/>\r
+ <Name Is=".*NativeMethods" />\r
+ </And>\r
+ </Match>\r
+ </Pattern>\r
+\r
+ <!-- StyleCop pattern -->\r
+ <Pattern RemoveAllRegions="true">\r
+ <Match>\r
+ <Or Weight="1000" >\r
+ <Kind Is="class" />\r
+ <Kind Is="struct" />\r
+ <Kind Is="interface"/>\r
+ </Or>\r
+ </Match>\r
+\r
+ <!-- constants and fields -->\r
+ <Entry>\r
+ <Match>\r
+ <Or>\r
+ <Kind Is="constant"/>\r
+ <Kind Is="field"/>\r
+ </Or>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ <Kind Order="constant field"/>\r
+ <Readonly/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Constants and Fields"/>\r
+ </Entry>\r
+\r
+ <!-- constructors -->\r
+ <Entry>\r
+ <Match>\r
+ <Or Weight="200">\r
+ <Kind Is="constructor"/>\r
+ <Kind Is="destructor"/>\r
+ </Or>\r
+ </Match>\r
+ <Sort>\r
+ <Static/>\r
+ <Kind Order="constructor destructor"/>\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ </Sort>\r
+ <Group Region="Constructors and Destructors"/>\r
+ </Entry>\r
+\r
+ <!-- delegates -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="delegate"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Static />\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Delegates"/>\r
+ </Entry>\r
+\r
+ <!-- events -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="event"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Static />\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Events"/>\r
+ </Entry>\r
+\r
+ <!-- enum -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="enum"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Enums"/>\r
+ </Entry>\r
+\r
+ <!-- interfaces -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="interface" />\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Interfaces"/>\r
+ </Entry>\r
+\r
+ <!-- properties -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="property"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Properties"/>\r
+ </Entry>\r
+\r
+ <!-- indexers -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="indexer"\r
+ Weight="300" />\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Indexers"/>\r
+ </Entry>\r
+\r
+ <!-- operator -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="operator"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Operators"/>\r
+ </Entry>\r
+\r
+ <!-- public methods -->\r
+ <Entry>\r
+ <Match>\r
+ <And>\r
+ <Kind Is="method"/>\r
+ <Access Is="public"/>\r
+ </And>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public"/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Public Methods"/>\r
+ </Entry>\r
+\r
+ <!-- Implemented Interfaces -->\r
+ <Entry>\r
+ <Match>\r
+ <And Weight="500">\r
+ <Kind Is="method"/>\r
+ <ImplementsInterface CLRName=".*"/>\r
+ </And>\r
+ </Match>\r
+ <Sort>\r
+ <ImplementsInterface />\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Implemented Interfaces">\r
+ <ImplementsInterface Region="${ImplementsInterface}" />\r
+ </Group>\r
+ </Entry>\r
+\r
+ <!-- other methods -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="method"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Methods"/>\r
+ </Entry>\r
+\r
+ <!-- Nested structs -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="struct"\r
+ Weight="600" />\r
+ </Match>\r
+ <Sort>\r
+ <Static />\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Name/>\r
+ </Sort>\r
+ </Entry>\r
+\r
+ <!-- Nested classes -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="class"\r
+ Weight="700" />\r
+ </Match>\r
+ <Sort>\r
+ <Static />\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Name/>\r
+ </Sort>\r
+ </Entry>\r
+\r
+ <!-- all other members -->\r
+ <Entry/>\r
+\r
+ </Pattern>\r
+</Patterns>\r
+]]></CustomMemberReorderingPatterns>\r
+ </CSharp>\r
+ <VB>\r
+ <FormatSettings />\r
+ <ImportsSettings />\r
+ <Naming2>\r
+ <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>\r
+ <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>\r
+ </Naming2>\r
+ </VB>\r
+ <Web>\r
+ <Naming2 />\r
+ </Web>\r
+ <Xaml>\r
+ <Naming2 />\r
+ </Xaml>\r
+ <XML>\r
+ <FormatSettings />\r
+ </XML>\r
+ <GenerateMemberBody />\r
+ <Naming2>\r
+ <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>\r
+ <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>\r
+ <ExceptionName IsNull="False">\r
+ </ExceptionName>\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />\r
+ <PredefinedRule Inspect="False" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />\r
+ <PredefinedRule Inspect="False" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />\r
+ <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />\r
+ <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />\r
+ </Naming2>\r
+ </CodeStyleSettings>\r
+</Configuration>
\ No newline at end of file
/// <param name="encJob">\r
/// The Encode Job Object\r
/// </param>\r
- /// <returns>String with the log header</returns>\r
public static string CreateCliLogHeader(Job encJob)\r
{\r
StringBuilder logHeader = new StringBuilder();\r
[DllImport("user32.dll")]\r
public static extern int ExitWindowsEx(int uFlags, int dwReason);\r
\r
+ /// <summary>\r
+ /// System Memory Status\r
+ /// </summary>\r
+ public struct MEMORYSTATUS // Unused var's are required here.\r
+ {\r
+ /// <summary>\r
+ /// Unknown\r
+ /// </summary>\r
+ public UInt32 dwLength;\r
+\r
+ /// <summary>\r
+ /// Memory Load\r
+ /// </summary>\r
+ public UInt32 dwMemoryLoad;\r
+\r
+ /// <summary>\r
+ /// Total Physical Memory\r
+ /// </summary>\r
+ public UInt32 dwTotalPhys; // Used\r
+\r
+ /// <summary>\r
+ /// Available Physical Memory\r
+ /// </summary>\r
+ public UInt32 dwAvailPhys;\r
+\r
+ /// <summary>\r
+ /// Total Page File\r
+ /// </summary>\r
+ public UInt32 dwTotalPageFile;\r
+\r
+ /// <summary>\r
+ /// Available Page File\r
+ /// </summary>\r
+ public UInt32 dwAvailPageFile;\r
+\r
+ /// <summary>\r
+ /// Total Virtual Memory\r
+ /// </summary>\r
+ public UInt32 dwTotalVirtual;\r
+\r
+ /// <summary>\r
+ /// Available Virtual Memory\r
+ /// </summary>\r
+ public UInt32 dwAvailVirtual;\r
+ }\r
+\r
/// <summary>\r
/// Global Memory Status\r
/// </summary>\r
/// The lp buffer.\r
/// </param>\r
[DllImport("kernel32.dll")]\r
- public static extern void GlobalMemoryStatus(ref MEMORYSTATUS lpBuffer);\r
+ public static extern void GlobalMemoryStatus\r
+ (\r
+ ref MEMORYSTATUS lpBuffer\r
+ );\r
\r
/// <summary>\r
/// Generate a Console Ctrl Event\r
}\r
\r
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]\r
- public static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);\r
+ static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);\r
\r
[FlagsAttribute]\r
public enum EXECUTION_STATE : uint\r
{\r
SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS);\r
}\r
-\r
- /// <summary>\r
- /// System Memory Status\r
- /// </summary>\r
- public struct MEMORYSTATUS // Unused var's are required here.\r
- {\r
- /// <summary>\r
- /// Unknown\r
- /// </summary>\r
- public UInt32 dwLength;\r
-\r
- /// <summary>\r
- /// Memory Load\r
- /// </summary>\r
- public UInt32 dwMemoryLoad;\r
-\r
- /// <summary>\r
- /// Total Physical Memory\r
- /// </summary>\r
- public UInt32 dwTotalPhys; // Used\r
-\r
- /// <summary>\r
- /// Available Physical Memory\r
- /// </summary>\r
- public UInt32 dwAvailPhys;\r
-\r
- /// <summary>\r
- /// Total Page File\r
- /// </summary>\r
- public UInt32 dwTotalPageFile;\r
-\r
- /// <summary>\r
- /// Available Page File\r
- /// </summary>\r
- public UInt32 dwAvailPageFile;\r
-\r
- /// <summary>\r
- /// Total Virtual Memory\r
- /// </summary>\r
- public UInt32 dwTotalVirtual;\r
-\r
- /// <summary>\r
- /// Available Virtual Memory\r
- /// </summary>\r
- public UInt32 dwAvailVirtual;\r
- }\r
}\r
}\r
<Reference Include="System.Xml" />\r
</ItemGroup>\r
<ItemGroup>\r
- <Compile Include="ScanProgressEventArgs.cs" />\r
<Compile Include="EncodeProgressEventArgs.cs" />\r
<Compile Include="frmExceptionWindow.cs">\r
<SubType>Form</SubType>\r
<EmbeddedResource Include="Resources\copy.png" />\r
</ItemGroup>\r
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
- <Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.4\Microsoft.StyleCop.targets" />\r
+ <Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.3\Microsoft.StyleCop.targets" />\r
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
Other similar extension points exist, see Microsoft.Common.targets.\r
<Target Name="BeforeBuild">\r
/// </summary>\r
public class Init\r
{\r
+ /// <summary>\r
+ /// Setup the Settings used by the applicaiton with this library\r
+ /// </summary>\r
+ /// <param name="versionString">\r
+ /// The version / name of the application that's using this DLL.\r
+ /// </param>\r
+ /// <param name="instanceId">\r
+ /// The Instance ID\r
+ /// </param>\r
+ /// <param name="completionOption">\r
+ /// The completion option.\r
+ /// </param>\r
+ /// <param name="disableDvdNav">\r
+ /// The disable dvd nav.\r
+ /// </param>\r
+ /// <param name="growlEncode">\r
+ /// The growl encode.\r
+ /// </param>\r
+ /// <param name="growlQueue">\r
+ /// The growl queue.\r
+ /// </param>\r
+ /// <param name="processPriority">\r
+ /// The process priority.\r
+ /// </param>\r
+ /// <param name="saveLogPath">\r
+ /// The save log path.\r
+ /// </param>\r
+ /// <param name="saveLogToSpecifiedPath">\r
+ /// The save log to specified path.\r
+ /// </param>\r
+ /// <param name="saveLogWithVideo">\r
+ /// The save log with video.\r
+ /// </param>\r
+ /// <param name="showCliForInGuiEncodeStatus">\r
+ /// The show cli for in gui encode status.\r
+ /// </param>\r
+ /// <param name="preventSleep">\r
+ /// Prevent the system from sleeping\r
+ /// </param>\r
+ public static void SetupSettings(string versionString, int instanceId, string completionOption, bool disableDvdNav,\r
+ bool growlEncode, bool growlQueue, string processPriority, string saveLogPath, bool saveLogToSpecifiedPath,\r
+ bool saveLogWithVideo, bool showCliForInGuiEncodeStatus, bool preventSleep)\r
+ {\r
+ InstanceId = instanceId;\r
+ HandBrakeGuiVersionString = versionString;\r
+ CompletionOption = completionOption;\r
+ DisableDvdNav = disableDvdNav;\r
+ GrowlEncode = growlEncode;\r
+ GrowlQueue = growlQueue;\r
+ ProcessPriority = processPriority;\r
+ SaveLogPath = saveLogPath;\r
+ SaveLogToSpecifiedPath = saveLogToSpecifiedPath;\r
+ SaveLogWithVideo = saveLogWithVideo;\r
+ ShowCliForInGuiEncodeStatus = showCliForInGuiEncodeStatus;\r
+ PreventSleep = preventSleep;\r
+ }\r
+\r
/// <summary>\r
/// Gets the Assembly version.\r
/// </summary>\r
/// </summary>\r
public static bool PreventSleep;\r
\r
- /// <summary>\r
- /// Setup the Settings used by the applicaiton with this library\r
- /// </summary>\r
- /// <param name="versionString">\r
- /// The version / name of the application that's using this DLL.\r
- /// </param>\r
- /// <param name="instanceId">\r
- /// The Instance ID\r
- /// </param>\r
- /// <param name="completionOption">\r
- /// The completion option.\r
- /// </param>\r
- /// <param name="disableDvdNav">\r
- /// The disable dvd nav.\r
- /// </param>\r
- /// <param name="growlEncode">\r
- /// The growl encode.\r
- /// </param>\r
- /// <param name="growlQueue">\r
- /// The growl queue.\r
- /// </param>\r
- /// <param name="processPriority">\r
- /// The process priority.\r
- /// </param>\r
- /// <param name="saveLogPath">\r
- /// The save log path.\r
- /// </param>\r
- /// <param name="saveLogToSpecifiedPath">\r
- /// The save log to specified path.\r
- /// </param>\r
- /// <param name="saveLogWithVideo">\r
- /// The save log with video.\r
- /// </param>\r
- /// <param name="showCliForInGuiEncodeStatus">\r
- /// The show cli for in gui encode status.\r
- /// </param>\r
- /// <param name="preventSleep">\r
- /// Prevent the system from sleeping\r
- /// </param>\r
- public static void SetupSettings(string versionString, int instanceId, string completionOption, bool disableDvdNav,\r
- bool growlEncode, bool growlQueue, string processPriority, string saveLogPath, bool saveLogToSpecifiedPath,\r
- bool saveLogWithVideo, bool showCliForInGuiEncodeStatus, bool preventSleep)\r
- {\r
- InstanceId = instanceId;\r
- HandBrakeGuiVersionString = versionString;\r
- CompletionOption = completionOption;\r
- DisableDvdNav = disableDvdNav;\r
- GrowlEncode = growlEncode;\r
- GrowlQueue = growlQueue;\r
- ProcessPriority = processPriority;\r
- SaveLogPath = saveLogPath;\r
- SaveLogToSpecifiedPath = saveLogToSpecifiedPath;\r
- SaveLogWithVideo = saveLogWithVideo;\r
- ShowCliForInGuiEncodeStatus = showCliForInGuiEncodeStatus;\r
- PreventSleep = preventSleep;\r
- }\r
}\r
}\r
public static AudioTrack Parse(StringReader output)\r
{\r
string audioTrack = output.ReadLine();\r
-\r
- if (audioTrack == null)\r
- return null;\r
-\r
Match m = Regex.Match(audioTrack, @"^ \+ ([0-9]*), ([A-Za-z0-9,\s]*) \((.*)\) \((.*)\)");\r
Match track = Regex.Match(audioTrack, @"^ \+ ([0-9]*), ([A-Za-z0-9,\s]*) \((.*)\)"); // ID and Language\r
Match iso639_2 = Regex.Match(audioTrack, @"iso639-2: ([a-zA-Z]*)\)");\r
/// </returns>\r
public static Chapter Parse(StringReader output)\r
{\r
- Match m = Regex.Match(output.ReadLine(),\r
+ Match m = Regex.Match(\r
+ output.ReadLine(),\r
@"^ \+ ([0-9]*): cells ([0-9]*)->([0-9]*), ([0-9]*) blocks, duration ([0-9]{2}:[0-9]{2}:[0-9]{2})");\r
if (m.Success)\r
{\r
\r
while (!output.EndOfStream)\r
{\r
- if ((char)output.Peek() == '+')\r
+ if ((char) output.Peek() == '+')\r
thisDVD.Titles.AddRange(Title.ParseList(output.ReadToEnd()));\r
else\r
output.ReadLine();\r
public static IEnumerable<Subtitle> ParseList(StringReader output)\r
{\r
var subtitles = new List<Subtitle>();\r
- while ((char)output.Peek() != '+')\r
+ while ((char) output.Peek() != '+')\r
{\r
Subtitle thisSubtitle = Parse(output);\r
\r
+++ /dev/null
-/* AssemblyInfo.cs $\r
- This file is part of the HandBrake source code.\r
- Homepage: <http://handbrake.fr>.\r
- It may be used under the terms of the GNU General Public License. */\r
-\r
-using System.Reflection;\r
-using System.Resources;\r
-using System.Runtime.CompilerServices;\r
-using System.Runtime.InteropServices;\r
-\r
-// General Information about an assembly is controlled through the following \r
-// set of attributes. Change these attribute values to modify the information\r
-// associated with an assembly.\r
-[assembly: AssemblyTitle("HandBrake")]\r
-[assembly: AssemblyDescription("HandBrake is a GPL-licensed, multiplatform, multithreaded video transcoder.")]\r
-[assembly: AssemblyConfiguration("")]\r
-[assembly: AssemblyCompany("HandBrake Team")]\r
-[assembly: AssemblyProduct("HandBrake")]\r
-[assembly: AssemblyCopyright("Copyright © 2010")]\r
-[assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")]\r
-\r
-// Setting ComVisible to false makes the types in this assembly not visible \r
-// to COM components. If you need to access a type in this assembly from \r
-// COM, set the ComVisible attribute to true on that type.\r
-[assembly: ComVisible(false)]\r
-\r
-// The following GUID is for the ID of the typelib if this project is exposed to COM\r
-[assembly: Guid("5e4e3f97-5252-41f6-aae9-3846f62cbc66")]\r
-\r
-// Version information for an assembly consists of the following four values:\r
-//\r
-// Major Version\r
-// Minor Version \r
-// Build Number\r
-// Revision\r
-//\r
-// You can specify all the values or you can default the Build and Revision Numbers \r
-// by using the '*' as shown below:\r
-// [assembly: AssemblyVersion("1.0.*")]\r
-[assembly: AssemblyVersion("0.9.4.3447")]\r
-[assembly: NeutralResourcesLanguage("")]\r
+++ /dev/null
-/* ScanProgressEventArgs.cs $\r
- This file is part of the HandBrake source code.\r
- Homepage: <http://handbrake.fr>.\r
- It may be used under the terms of the GNU General Public License. */\r
-\r
-namespace HandBrake.ApplicationServices\r
-{\r
- using System;\r
-\r
- /// <summary>\r
- /// Scan Progress Event Args\r
- /// </summary>\r
- public class ScanProgressEventArgs : EventArgs\r
- {\r
- /// <summary>\r
- /// Gets or sets TotalTitles.\r
- /// </summary>\r
- public int TotalTitles { get; set; }\r
-\r
- /// <summary>\r
- /// Gets or sets CurrentTitle.\r
- /// </summary>\r
- public int CurrentTitle { get; set; }\r
- }\r
-}\r
using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Parsing;\r
+ using HandBrake.ApplicationServices.Properties;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
\r
/// <summary>\r
SendKeys.Send("^C");\r
SendKeys.Flush();\r
\r
- /*//if (HbProcess != null)\r
+ //if (HbProcess != null)\r
//{\r
// HbProcess.StandardInput.AutoFlush = true;\r
// HbProcess.StandardInput.WriteLine("^c^z");\r
- //}*/\r
+ //}\r
}\r
\r
/* Helpers */\r
-\r
/// <summary>\r
/// Save a copy of the log to the users desired location or a default location\r
/// if this feature is enabled in options.\r
{\r
IsEncoding = false;\r
\r
+ // ReadFile(null);\r
+\r
if (this.EncodeEnded != null)\r
this.EncodeEnded(this, new EventArgs());\r
\r
/// <summary>\r
/// Read the log file\r
/// </summary>\r
+ /// <param name="n">\r
+ /// The object.\r
+ /// </param>\r
private void ReadFile()\r
{\r
logBuffer = new StringBuilder();\r
/// <summary>\r
/// Setup the logging.\r
/// </summary>\r
- /// <param name="encodeJob">The Encode Job Object</param>\r
private void SetupLogging(Job encodeJob)\r
{\r
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
/// </summary>\r
int Count { get; }\r
\r
+ /// <summary>\r
+ /// Gets a value indicating whether IsEncoding.\r
+ /// </summary>\r
+ bool IsEncoding { get; }\r
+\r
+ /// <summary>\r
+ /// Gets ActivityLog.\r
+ /// </summary>\r
+ string ActivityLog { get; }\r
+\r
/// <summary>\r
/// Adds an item to the queue.\r
/// </summary>\r
/// Writes the current state of the queue in the form of a batch (.bat) file.\r
/// </summary>\r
/// <param name="file">The location of the file to write the batch file to.</param>\r
- /// <returns>True if sucessful</returns>\r
bool WriteBatchScriptToFile(string file);\r
\r
/// <summary>\r
/// <summary>\r
/// Scan process has changed to a new title\r
/// </summary>\r
- event ScanService.ScanProgessStatus ScanStatusChanged;\r
+ event EventHandler ScanStatusChanged;\r
\r
/// <summary>\r
/// Gets a value indicating whether IsScanning.\r
/// </summary>\r
bool IsScanning { get; }\r
\r
+ /// <summary>\r
+ /// Gets the Scan Status.\r
+ /// </summary>\r
+ string ScanStatus { get; }\r
+\r
/// <summary>\r
/// Gets the Souce Data.\r
/// </summary>\r
\r
using HandBrake.ApplicationServices.Functions;\r
using HandBrake.ApplicationServices.Model;\r
+ using HandBrake.ApplicationServices.Properties;\r
using HandBrake.ApplicationServices.Services.Interfaces;\r
\r
/// <summary>\r
/// Writes the current state of the queue in the form of a batch (.bat) file.\r
/// </summary>\r
/// <param name="file">The location of the file to write the batch file to.</param>\r
- /// <returns>True if successful</returns>\r
public bool WriteBatchScriptToFile(string file)\r
{\r
string queries = string.Empty;\r
/// </summary>\r
public event EventHandler ScanCompleted;\r
\r
- /// <summary>\r
- /// Scan Progess Status\r
- /// </summary>\r
- /// <param name="sender">\r
- /// The sender.\r
- /// </param>\r
- /// <param name="e">\r
- /// The ScanProgressEventArgs.\r
- /// </param>\r
- public delegate void ScanProgessStatus(object sender, ScanProgressEventArgs e);\r
-\r
/// <summary>\r
/// Scan process has changed to a new title\r
/// </summary>\r
- public event ScanProgessStatus ScanStatusChanged;\r
+ public event EventHandler ScanStatusChanged;\r
\r
/* Properties */\r
\r
/// </summary>\r
public bool IsScanning { get; private set; }\r
\r
+ /// <summary>\r
+ /// Gets the Scan Status.\r
+ /// </summary>\r
+ public string ScanStatus { get; private set; }\r
+\r
/// <summary>\r
/// Gets the Souce Data.\r
/// </summary>\r
this.hbProc.Start();\r
\r
this.readData = new Parser(this.hbProc.StandardError.BaseStream);\r
- this.readData.OnScanProgress += this.OnScanProgress;\r
+ this.readData.OnScanProgress += new ScanProgressEventHandler(this.OnScanProgress);\r
this.SouceData = DVD.Parse(this.readData);\r
\r
// Write the Buffer out to file.\r
/// <param name="titleCount">the total number of titles</param>\r
private void OnScanProgress(object sender, int currentTitle, int titleCount)\r
{\r
- ScanProgressEventArgs scanProgressEventArgs = new ScanProgressEventArgs\r
- {\r
- TotalTitles = titleCount,\r
- CurrentTitle = currentTitle\r
- };\r
-\r
+ this.ScanStatus = string.Format("Processing Title: {0} of {1}", currentTitle, titleCount);\r
if (this.ScanStatusChanged != null)\r
- this.ScanStatusChanged(this, scanProgressEventArgs);\r
+ this.ScanStatusChanged(this, new EventArgs());\r
}\r
}\r
}
\ No newline at end of file
-<StyleCopSettings Version="4.3">\r
- <Analyzers>\r
- <Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.MaintainabilityRules">\r
- <Rules>\r
- <Rule Name="FieldsMustBePrivate">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
- </Rules>\r
- <AnalyzerSettings />\r
- </Analyzer>\r
- </Analyzers>\r
-</StyleCopSettings>
\ No newline at end of file
+<StyleCopSettings Version="4.3" />
\ No newline at end of file
--- /dev/null
+<Configuration>\r
+ <CodeStyleSettings>\r
+ <ExternalPath IsNull="False">\r
+ </ExternalPath>\r
+ <Sharing>SOLUTION</Sharing>\r
+ <CSharp>\r
+ <FormatSettings>\r
+ <ALIGN_MULTILINE_ARGUMENT>False</ALIGN_MULTILINE_ARGUMENT>\r
+ <BLANK_LINES_AROUND_SINGLE_LINE_FIELD>1</BLANK_LINES_AROUND_SINGLE_LINE_FIELD>\r
+ <BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>1</BLANK_LINES_AROUND_SINGLE_LINE_INVOCABLE>\r
+ <BLANK_LINES_BETWEEN_USING_GROUPS>1</BLANK_LINES_BETWEEN_USING_GROUPS>\r
+ <FORCE_ATTRIBUTE_STYLE>SEPARATE</FORCE_ATTRIBUTE_STYLE>\r
+ <FORCE_FOR_BRACES_STYLE>ALWAYS_ADD</FORCE_FOR_BRACES_STYLE>\r
+ <FORCE_FOREACH_BRACES_STYLE>ALWAYS_ADD</FORCE_FOREACH_BRACES_STYLE>\r
+ <FORCE_IFELSE_BRACES_STYLE>ALWAYS_ADD</FORCE_IFELSE_BRACES_STYLE>\r
+ <FORCE_WHILE_BRACES_STYLE>ALWAYS_ADD</FORCE_WHILE_BRACES_STYLE>\r
+ <INDENT_ANONYMOUS_METHOD_BLOCK>False</INDENT_ANONYMOUS_METHOD_BLOCK>\r
+ <INDENT_EMBRACED_INITIALIZER_BLOCK>False</INDENT_EMBRACED_INITIALIZER_BLOCK>\r
+ <KEEP_BLANK_LINES_IN_CODE>1</KEEP_BLANK_LINES_IN_CODE>\r
+ <KEEP_BLANK_LINES_IN_DECLARATIONS>1</KEEP_BLANK_LINES_IN_DECLARATIONS>\r
+ <KEEP_USER_LINEBREAKS>False</KEEP_USER_LINEBREAKS>\r
+ <MODIFIERS_ORDER IsNull="False">\r
+ <Item>public</Item>\r
+ <Item>protected</Item>\r
+ <Item>internal</Item>\r
+ <Item>private</Item>\r
+ <Item>new</Item>\r
+ <Item>abstract</Item>\r
+ <Item>virtual</Item>\r
+ <Item>override</Item>\r
+ <Item>sealed</Item>\r
+ <Item>static</Item>\r
+ <Item>readonly</Item>\r
+ <Item>extern</Item>\r
+ <Item>unsafe</Item>\r
+ <Item>volatile</Item>\r
+ </MODIFIERS_ORDER>\r
+ <PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>False</PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE>\r
+ <PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>False</PLACE_FIELD_ATTRIBUTE_ON_SAME_LINE>\r
+ <PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>False</PLACE_SIMPLE_ACCESSOR_ON_SINGLE_LINE>\r
+ <PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>False</PLACE_TYPE_CONSTRAINTS_ON_SAME_LINE>\r
+ <PLACE_WHILE_ON_NEW_LINE>True</PLACE_WHILE_ON_NEW_LINE>\r
+ <REDUNDANT_THIS_QUALIFIER_STYLE>ALWAYS_USE</REDUNDANT_THIS_QUALIFIER_STYLE>\r
+ <SIMPLE_EMBEDDED_STATEMENT_STYLE>ON_SINGLE_LINE</SIMPLE_EMBEDDED_STATEMENT_STYLE>\r
+ <SPACE_AFTER_TYPECAST_PARENTHESES>False</SPACE_AFTER_TYPECAST_PARENTHESES>\r
+ <SPACE_AROUND_MULTIPLICATIVE_OP>True</SPACE_AROUND_MULTIPLICATIVE_OP>\r
+ <SPACE_BEFORE_SIZEOF_PARENTHESES>False</SPACE_BEFORE_SIZEOF_PARENTHESES>\r
+ <SPACE_BEFORE_TYPEOF_PARENTHESES>False</SPACE_BEFORE_TYPEOF_PARENTHESES>\r
+ <SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>True</SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES>\r
+ <STICK_COMMENT>False</STICK_COMMENT>\r
+ <WRAP_AFTER_DECLARATION_LPAR>True</WRAP_AFTER_DECLARATION_LPAR>\r
+ <WRAP_AFTER_INVOCATION_LPAR>True</WRAP_AFTER_INVOCATION_LPAR>\r
+ <WRAP_ARGUMENTS_STYLE>CHOP_IF_LONG</WRAP_ARGUMENTS_STYLE>\r
+ <WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>True</WRAP_BEFORE_FIRST_TYPE_PARAMETER_CONSTRAINT>\r
+ <WRAP_EXTENDS_LIST_STYLE>CHOP_IF_LONG</WRAP_EXTENDS_LIST_STYLE>\r
+ <WRAP_PARAMETERS_STYLE>CHOP_IF_LONG</WRAP_PARAMETERS_STYLE>\r
+ </FormatSettings>\r
+ <UsingsSettings>\r
+ <AddImportsToDeepestScope>True</AddImportsToDeepestScope>\r
+ <QualifiedUsingAtNestedScope>True</QualifiedUsingAtNestedScope>\r
+ </UsingsSettings>\r
+ <Naming2>\r
+ <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>\r
+ <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>\r
+ <ExceptionName IsNull="False">\r
+ </ExceptionName>\r
+ <OverrideDefaultSettings>True</OverrideDefaultSettings>\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />\r
+ <PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />\r
+ <PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />\r
+ </Naming2>\r
+ <CustomMemberReorderingPatterns><![CDATA[<?xml version="1.0" encoding="utf-8"?>\r
+<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns">\r
+\r
+ <!-- Do not reorder COM interfaces -->\r
+ <Pattern>\r
+ <Match>\r
+ <And Weight="2000">\r
+ <Kind Is="interface"/>\r
+ <HasAttribute CLRName="System.Runtime.InteropServices.InterfaceTypeAttribute"\r
+ Inherit="true"/>\r
+ </And>\r
+ </Match>\r
+ </Pattern>\r
+\r
+ <!-- Do not reorder P/Invoke structs -->\r
+ <Pattern>\r
+ <Match>\r
+ <And Weight="2000">\r
+ <Or>\r
+ <Kind Is="struct"/>\r
+ <Kind Is="class"/>\r
+ </Or>\r
+ <HasAttribute CLRName="System.Runtime.InteropServices.StructLayoutAttribute"\r
+ Inherit="true"/>\r
+ </And>\r
+ </Match>\r
+ </Pattern>\r
+\r
+ <!-- Do not reorder P/Invoke classes (called xxxNativeMethods) -->\r
+ <Pattern>\r
+ <Match>\r
+ <And Weight="2000">\r
+ <Kind Is="class"/>\r
+ <Name Is=".*NativeMethods" />\r
+ </And>\r
+ </Match>\r
+ </Pattern>\r
+\r
+ <!-- StyleCop pattern -->\r
+ <Pattern RemoveAllRegions="true">\r
+ <Match>\r
+ <Or Weight="1000" >\r
+ <Kind Is="class" />\r
+ <Kind Is="struct" />\r
+ <Kind Is="interface"/>\r
+ </Or>\r
+ </Match>\r
+\r
+ <!-- constants and fields -->\r
+ <Entry>\r
+ <Match>\r
+ <Or>\r
+ <Kind Is="constant"/>\r
+ <Kind Is="field"/>\r
+ </Or>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ <Kind Order="constant field"/>\r
+ <Readonly/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Constants and Fields"/>\r
+ </Entry>\r
+\r
+ <!-- constructors -->\r
+ <Entry>\r
+ <Match>\r
+ <Or Weight="200">\r
+ <Kind Is="constructor"/>\r
+ <Kind Is="destructor"/>\r
+ </Or>\r
+ </Match>\r
+ <Sort>\r
+ <Static/>\r
+ <Kind Order="constructor destructor"/>\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ </Sort>\r
+ <Group Region="Constructors and Destructors"/>\r
+ </Entry>\r
+\r
+ <!-- delegates -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="delegate"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Static />\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Delegates"/>\r
+ </Entry>\r
+\r
+ <!-- events -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="event"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Static />\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Events"/>\r
+ </Entry>\r
+\r
+ <!-- enum -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="enum"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Enums"/>\r
+ </Entry>\r
+\r
+ <!-- interfaces -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="interface" />\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Interfaces"/>\r
+ </Entry>\r
+\r
+ <!-- properties -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="property"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Properties"/>\r
+ </Entry>\r
+\r
+ <!-- indexers -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="indexer"\r
+ Weight="300" />\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Indexers"/>\r
+ </Entry>\r
+\r
+ <!-- operator -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="operator"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Operators"/>\r
+ </Entry>\r
+\r
+ <!-- public methods -->\r
+ <Entry>\r
+ <Match>\r
+ <And>\r
+ <Kind Is="method"/>\r
+ <Access Is="public"/>\r
+ </And>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public"/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Public Methods"/>\r
+ </Entry>\r
+\r
+ <!-- Implemented Interfaces -->\r
+ <Entry>\r
+ <Match>\r
+ <And Weight="500">\r
+ <Kind Is="method"/>\r
+ <ImplementsInterface CLRName=".*"/>\r
+ </And>\r
+ </Match>\r
+ <Sort>\r
+ <ImplementsInterface />\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Implemented Interfaces">\r
+ <ImplementsInterface Region="${ImplementsInterface}" />\r
+ </Group>\r
+ </Entry>\r
+\r
+ <!-- other methods -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="method"/>\r
+ </Match>\r
+ <Sort>\r
+ <Access Order="public internal protected-internal protected private"/>\r
+ <Static/>\r
+ <Name/>\r
+ </Sort>\r
+ <Group Region="Methods"/>\r
+ </Entry>\r
+\r
+ <!-- Nested structs -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="struct"\r
+ Weight="600" />\r
+ </Match>\r
+ <Sort>\r
+ <Static />\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Name/>\r
+ </Sort>\r
+ </Entry>\r
+\r
+ <!-- Nested classes -->\r
+ <Entry>\r
+ <Match>\r
+ <Kind Is="class"\r
+ Weight="700" />\r
+ </Match>\r
+ <Sort>\r
+ <Static />\r
+ <Access Order="public internal protected-internal protected private" />\r
+ <Name/>\r
+ </Sort>\r
+ </Entry>\r
+\r
+ <!-- all other members -->\r
+ <Entry/>\r
+\r
+ </Pattern>\r
+</Patterns>\r
+]]></CustomMemberReorderingPatterns>\r
+ </CSharp>\r
+ <VB>\r
+ <FormatSettings />\r
+ <ImportsSettings />\r
+ <Naming2>\r
+ <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>\r
+ <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>\r
+ </Naming2>\r
+ </VB>\r
+ <Web>\r
+ <Naming2 />\r
+ </Web>\r
+ <Xaml>\r
+ <Naming2 />\r
+ </Xaml>\r
+ <XML>\r
+ <FormatSettings />\r
+ </XML>\r
+ <FileHeader><![CDATA[/* file.cs$\r
+ This file is part of the HandBrake source code.\r
+ Homepage: <http://handbrake.fr/>\r
+ It may be used under the terms of the GNU General Public License. */]]></FileHeader>\r
+ <GenerateMemberBody />\r
+ <Naming2>\r
+ <EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>\r
+ <EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>\r
+ <ExceptionName IsNull="False">\r
+ </ExceptionName>\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />\r
+ <PredefinedRule Inspect="False" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />\r
+ <PredefinedRule Inspect="False" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />\r
+ <PredefinedRule Inspect="False" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />\r
+ <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />\r
+ <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />\r
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />\r
+ <Abbreviation Text="CLI" />\r
+ <Abbreviation Text="DRC" />\r
+ <Abbreviation Text="ID" />\r
+ <Abbreviation Text="MP" />\r
+ <Abbreviation Text="DVD" />\r
+ </Naming2>\r
+ </CodeStyleSettings>\r
+</Configuration>
\ No newline at end of file
<Target Name="AfterBuild">\r
</Target>\r
-->\r
- <Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.4\Microsoft.StyleCop.targets" />\r
+ <Import Project="$(ProgramFiles)\MSBuild\Microsoft\StyleCop\v4.3\Microsoft.StyleCop.targets" />\r
<PropertyGroup Condition=" '$(Configuration)' == 'Install' ">\r
<PostBuildEvent>\r
cd ../../\r
--- /dev/null
+<Configuration>\r
+ <Localizable>No</Localizable>\r
+</Configuration>
\ No newline at end of file
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual Studio 2010\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrakeCS", "HandBrakeCS.csproj", "{A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Debug|x86 = Debug|x86\r
+ Install|Any CPU = Install|Any CPU\r
+ Install|x86 = Install|x86\r
+ NightlyBuild|Any CPU = NightlyBuild|Any CPU\r
+ NightlyBuild|x86 = NightlyBuild|x86\r
+ Release|Any CPU = Release|Any CPU\r
+ Release|x86 = Release|x86\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|x86.ActiveCfg = Release|x86\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|x86.Build.0 = Release|x86\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Install|Any CPU.ActiveCfg = Install|Any CPU\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Install|Any CPU.Build.0 = Install|Any CPU\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Install|x86.ActiveCfg = Install|x86\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Install|x86.Build.0 = Install|x86\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.NightlyBuild|Any CPU.ActiveCfg = NightlyBuild|Any CPU\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.NightlyBuild|Any CPU.Build.0 = NightlyBuild|Any CPU\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.NightlyBuild|x86.ActiveCfg = NightlyBuild|x86\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.NightlyBuild|x86.Build.0 = NightlyBuild|x86\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|x86.ActiveCfg = Release|x86\r
+ {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|x86.Build.0 = Release|x86\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+EndGlobal\r
private List<Preset> userPresets = new List<Preset>();\r
\r
/// <summary>\r
- /// Gets or sets the Last preset added\r
+ /// Last preset added\r
/// </summary>\r
public Preset LastPresetAdded { get; set; }\r
\r
using System.IO;\r
using System.Windows.Forms;\r
\r
- using Handbrake.Presets;\r
-\r
using HandBrake.ApplicationServices;\r
\r
using Handbrake.Properties;\r
\r
+ using Presets;\r
+\r
/// <summary>\r
/// HandBrake Starts Here\r
/// </summary>\r
/// <summary>\r
/// The main entry point for the application.\r
/// </summary>\r
- /// <param name="args">Arguments passed in from the shortcut/executable</param>\r
[STAThread]\r
public static void Main(string[] args)\r
{\r
InstanceId = Process.GetProcessesByName("HandBrake").Length;\r
\r
// Handle any unhandled exceptions\r
- AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;\r
+ AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);\r
\r
// Attempt to upgrade / keep the users settings between versions\r
if (Settings.Default.UpdateRequired)\r
}\r
}\r
\r
- public static int InstanceId;\r
+\r
+ public static int InstanceId = 0;\r
+\r
+\r
}\r
}
\ No newline at end of file
//------------------------------------------------------------------------------\r
// <auto-generated>\r
// This code was generated by a tool.\r
-// Runtime Version:2.0.50727.4927\r
+// Runtime Version:4.0.30319.1\r
//\r
// Changes to this file may cause incorrect behavior and will be lost if\r
// the code is regenerated.\r
\r
\r
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\r
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]\r
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]\r
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\r
\r
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\r
}\r
}\r
\r
+ [global::System.Configuration.UserScopedSettingAttribute()]\r
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool disableResCalc {\r
+ get {\r
+ return ((bool)(this["disableResCalc"]));\r
+ }\r
+ set {\r
+ this["disableResCalc"] = value;\r
+ }\r
+ }\r
+ \r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
[global::System.Configuration.DefaultSettingValueAttribute("False")]\r
<Setting Name="hb_platform" Type="System.String" Scope="User">\r
<Value Profile="(Default)" />\r
</Setting>\r
+ <Setting Name="disableResCalc" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
+ </Setting>\r
<Setting Name="growlQueue" Type="System.Boolean" Scope="User">\r
<Value Profile="(Default)">False</Value>\r
</Setting>\r
<BooleanProperty Name="Enabled">False</BooleanProperty>\r
</RuleSettings>\r
</Rule>\r
- <Rule Name="ElementsMustBeDocumented">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
</Rules>\r
<AnalyzerSettings>\r
<StringProperty Name="CompanyName">HandBrake Project (http://handbrake.fr)</StringProperty>\r
<BooleanProperty Name="Enabled">False</BooleanProperty>\r
</RuleSettings>\r
</Rule>\r
- <Rule Name="FieldsMustBePrivate">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
- <Rule Name="ArithmeticExpressionsMustDeclarePrecedence">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
</Rules>\r
<AnalyzerSettings />\r
</Analyzer>\r
<BooleanProperty Name="Enabled">False</BooleanProperty>\r
</RuleSettings>\r
</Rule>\r
- <Rule Name="CommentsMustContainText">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
</Rules>\r
<AnalyzerSettings />\r
</Analyzer>\r
<BooleanProperty Name="Enabled">False</BooleanProperty>\r
</RuleSettings>\r
</Rule>\r
- <Rule Name="ElementMustBeginWithUpperCaseLetter">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
- <Rule Name="AccessibleFieldsMustBeginWithUpperCaseLetter">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
- <Rule Name="FieldNamesMustBeginWithLowerCaseLetter">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
</Rules>\r
<AnalyzerSettings />\r
</Analyzer>\r
<BooleanProperty Name="Enabled">False</BooleanProperty>\r
</RuleSettings>\r
</Rule>\r
- <Rule Name="ElementsMustAppearInTheCorrectOrder">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
- <Rule Name="StaticElementsMustAppearBeforeInstanceElements">\r
- <RuleSettings>\r
- <BooleanProperty Name="Enabled">False</BooleanProperty>\r
- </RuleSettings>\r
- </Rule>\r
</Rules>\r
<AnalyzerSettings />\r
</Analyzer>\r
<setting name="hb_platform" serializeAs="String">\r
<value />\r
</setting>\r
+ <setting name="disableResCalc" serializeAs="String">\r
+ <value>False</value>\r
+ </setting>\r
<setting name="growlQueue" serializeAs="String">\r
<value>False</value>\r
</setting>\r
this.mode = setMode;\r
\r
Array values = Enum.GetValues(typeof(ActivityLogMode));\r
- Properties.Settings.Default.ActivityWindowLastMode = (int)values.GetValue(Convert.ToInt32(setMode));\r
+ Properties.Settings.Default.ActivityWindowLastMode = (int) values.GetValue(Convert.ToInt32(setMode));\r
Properties.Settings.Default.Save();\r
\r
this.Text = mode == ActivityLogMode.Scan\r
/// </param>\r
private void NewActivityWindow_Load(object sender, EventArgs e)\r
{\r
- ActivityLogMode activitLogMode = (ActivityLogMode)Enum.ToObject(typeof(ActivityLogMode), Properties.Settings.Default.ActivityWindowLastMode);\r
+ ActivityLogMode activitLogMode = (ActivityLogMode) Enum.ToObject(typeof(ActivityLogMode), Properties.Settings.Default.ActivityWindowLastMode);\r
SetMode(activitLogMode); \r
}\r
\r
/// <summary>\r
/// Initializes a new instance of the <see cref="frmAddPreset"/> class.\r
/// </summary>\r
- /// <param name="mainWindow">The Main Window</param>\r
+ /// <param name="mainWindow"></param>\r
/// <param name="presetHandler">\r
/// The preset handler.\r
/// </param>\r
case 1:\r
pictureSettingsMode = QueryPictureSettingsMode.SourceMaximum;\r
break;\r
-\r
default:\r
pictureSettingsMode = QueryPictureSettingsMode.None;\r
break;\r
using System.Threading;\r
using System.Windows.Forms;\r
\r
- /// <summary>\r
- /// The Update Download Screen\r
- /// </summary>\r
public partial class frmDownload : Form\r
{\r
- private readonly Thread downloadThread;\r
- private Stream responceStream;\r
- private Stream loacalStream;\r
- private HttpWebRequest webRequest;\r
- private HttpWebResponse webResponse;\r
- private static int progress;\r
- private bool killThread;\r
+ private readonly Thread _downloadThread;\r
+ private Stream _responceStream;\r
+ private Stream _loacalStream;\r
+ private HttpWebRequest _webRequest;\r
+ private HttpWebResponse _webResponse;\r
+ private static int _progress;\r
+ private bool _killThread;\r
\r
private delegate void UpdateProgessCallback(long bytesRead, long totalBytes);\r
\r
{\r
InitializeComponent();\r
\r
- downloadThread = new Thread(Download);\r
- downloadThread.Start(filename);\r
+ _downloadThread = new Thread(Download);\r
+ _downloadThread.Start(filename);\r
}\r
\r
private void Download(object file)\r
{\r
string tempPath = Path.Combine(Path.GetTempPath(), "handbrake-setup.exe");\r
- string hbUpdate = (string)file;\r
+ string hbUpdate = (string) file;\r
WebClient wcDownload = new WebClient();\r
\r
try\r
if (File.Exists(tempPath))\r
File.Delete(tempPath);\r
\r
- webRequest = (HttpWebRequest)WebRequest.Create(hbUpdate);\r
- webRequest.Credentials = CredentialCache.DefaultCredentials;\r
- webResponse = (HttpWebResponse)webRequest.GetResponse();\r
- long fileSize = webResponse.ContentLength;\r
+ _webRequest = (HttpWebRequest) WebRequest.Create(hbUpdate);\r
+ _webRequest.Credentials = CredentialCache.DefaultCredentials;\r
+ _webResponse = (HttpWebResponse) _webRequest.GetResponse();\r
+ long fileSize = _webResponse.ContentLength;\r
\r
- responceStream = wcDownload.OpenRead(hbUpdate);\r
- loacalStream = new FileStream(tempPath, FileMode.Create, FileAccess.Write, FileShare.None);\r
+ _responceStream = wcDownload.OpenRead(hbUpdate);\r
+ _loacalStream = new FileStream(tempPath, FileMode.Create, FileAccess.Write, FileShare.None);\r
\r
int bytesSize;\r
byte[] downBuffer = new byte[2048];\r
\r
long flength = 0;\r
- while ((bytesSize = responceStream.Read(downBuffer, 0, downBuffer.Length)) > 0)\r
+ while ((bytesSize = _responceStream.Read(downBuffer, 0, downBuffer.Length)) > 0)\r
{\r
- if (killThread)\r
+ if (_killThread)\r
return;\r
- loacalStream.Write(downBuffer, 0, bytesSize);\r
- flength = loacalStream.Length;\r
- Invoke(new UpdateProgessCallback(this.UpdateProgress), new object[] {loacalStream.Length, fileSize});\r
+ _loacalStream.Write(downBuffer, 0, bytesSize);\r
+ flength = _loacalStream.Length;\r
+ Invoke(new UpdateProgessCallback(this.UpdateProgress), new object[] {_loacalStream.Length, fileSize});\r
}\r
\r
- responceStream.Close();\r
- loacalStream.Close();\r
+ _responceStream.Close();\r
+ _loacalStream.Close();\r
\r
if (flength != fileSize)\r
Invoke(new DownloadFailedCallback(this.DownloadFailed));\r
private void UpdateProgress(long bytesRead, long totalBytes)\r
{\r
long p = (bytesRead * 100) / totalBytes;\r
- int.TryParse(p.ToString(), out progress);\r
- progress_download.Value = progress;\r
+ int.TryParse(p.ToString(), out _progress);\r
+ progress_download.Value = _progress;\r
lblProgress.Text = (bytesRead / 1024) + "k of " + (totalBytes / 1024) + "k ";\r
}\r
\r
\r
private void btn_cancel_Click(object sender, EventArgs e)\r
{\r
- killThread = true;\r
+ _killThread = true;\r
lblProgress.Text = "Cancelling ...";\r
- if (webResponse != null) webResponse.Close();\r
- if (responceStream != null) responceStream.Close();\r
- if (loacalStream != null) loacalStream.Close();\r
+ if (_webResponse != null) _webResponse.Close();\r
+ if (_responceStream != null) _responceStream.Close();\r
+ if (_loacalStream != null) _loacalStream.Close();\r
this.Close();\r
}\r
}\r
using Presets;\r
using Properties;\r
\r
- /// <summary>\r
- /// The Main Window\r
- /// </summary>\r
public partial class frmMain : Form\r
{\r
// Objects which may be used by one or more other objects *************\r
\r
if (treeView_presets.SelectedNode != null)\r
{\r
+\r
if (savefiledialog.ShowDialog() == DialogResult.OK)\r
{\r
Preset preset = presetHandler.GetPreset(treeView_presets.SelectedNode.Text);\r
lbl_encode.Text = encodeQueue.Count + " encode(s) pending in the queue";\r
\r
queueWindow.Show();\r
+\r
}\r
\r
/// <summary>\r
int id;\r
if (int.TryParse(driveId, out id))\r
{\r
+\r
this.dvdDrivePath = drives[id].RootDirectory;\r
this.dvdDriveLabel = drives[id].VolumeLabel;\r
\r
\r
// Populate the Angles dropdown\r
drop_angle.Items.Clear();\r
- if (!Settings.Default.noDvdNav)\r
+ if (!Properties.Settings.Default.noDvdNav)\r
{\r
drop_angle.Visible = true;\r
lbl_angle.Visible = true;\r
labelSource.Text = labelSource.Text = Path.GetFileName(selectedTitle.SourceName);\r
\r
// Run the AutoName & ChapterNaming functions\r
- if (Settings.Default.autoNaming)\r
+ if (Properties.Settings.Default.autoNaming)\r
{\r
string autoPath = Main.AutoName(this);\r
if (autoPath != null)\r
// Add more rows to the Chapter menu if needed.\r
if (Check_ChapterMarkers.Checked)\r
{\r
- int i = data_chpt.Rows.Count, finish;\r
+ int i = data_chpt.Rows.Count, finish = 0;\r
int.TryParse(drop_chapterFinish.Text, out finish);\r
\r
while (i < finish)\r
.ToString();\r
\r
// Run the Autonaming function\r
- if (Settings.Default.autoNaming)\r
+ if (Properties.Settings.Default.autoNaming)\r
text_destination.Text = Main.AutoName(this);\r
\r
// Disable chapter markers if only 1 chapter is selected.\r
private void drop_mode_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
// Reset\r
- this.drop_chapterFinish.TextChanged -= this.SecondsOrFramesChanged;\r
- this.drop_chapterStart.TextChanged -= this.SecondsOrFramesChanged;\r
+ this.drop_chapterFinish.TextChanged -= new EventHandler(this.SecondsOrFramesChanged);\r
+ this.drop_chapterStart.TextChanged -= new EventHandler(this.SecondsOrFramesChanged);\r
\r
// Do Work\r
switch (drop_mode.SelectedIndex)\r
lbl_duration.Text = "--:--:--";\r
return;\r
case 1:\r
- this.drop_chapterStart.TextChanged += this.SecondsOrFramesChanged;\r
- this.drop_chapterFinish.TextChanged += this.SecondsOrFramesChanged;\r
+ this.drop_chapterStart.TextChanged += new EventHandler(this.SecondsOrFramesChanged);\r
+ this.drop_chapterFinish.TextChanged += new EventHandler(this.SecondsOrFramesChanged);\r
drop_chapterStart.DropDownStyle = ComboBoxStyle.Simple;\r
drop_chapterFinish.DropDownStyle = ComboBoxStyle.Simple;\r
if (selectedTitle != null)\r
}\r
return;\r
case 2:\r
- this.drop_chapterStart.TextChanged += this.SecondsOrFramesChanged;\r
- this.drop_chapterFinish.TextChanged += this.SecondsOrFramesChanged;\r
+ this.drop_chapterStart.TextChanged += new EventHandler(this.SecondsOrFramesChanged);\r
+ this.drop_chapterFinish.TextChanged += new EventHandler(this.SecondsOrFramesChanged);\r
drop_chapterStart.DropDownStyle = ComboBoxStyle.Simple;\r
drop_chapterFinish.DropDownStyle = ComboBoxStyle.Simple;\r
if (selectedTitle != null)\r
else if (drop_format.SelectedIndex.Equals(1))\r
DVD_Save.FilterIndex = 2;\r
\r
- if (DVD_Save.ShowDialog() == DialogResult.OK && !string.IsNullOrEmpty(DVD_Save.FileName))\r
+ if (DVD_Save.ShowDialog() == DialogResult.OK)\r
{\r
// Add a file extension manually, as FileDialog.AddExtension has issues with dots in filenames\r
switch (DVD_Save.FilterIndex)\r
{\r
case 1:\r
- if (!Path.GetExtension(DVD_Save.FileName).Equals(".mp4", StringComparison.InvariantCultureIgnoreCase))\r
- DVD_Save.FileName = Settings.Default.useM4v ? DVD_Save.FileName.Replace(".mp4", ".m4v").Replace(".mkv", ".m4v") : DVD_Save.FileName.Replace(".m4v", ".mp4").Replace(".mkv", ".mp4");\r
+ if (\r
+ !Path.GetExtension(DVD_Save.FileName).Equals(".mp4",\r
+ StringComparison.InvariantCultureIgnoreCase))\r
+ if (Properties.Settings.Default.useM4v)\r
+ DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".m4v").Replace(".mkv", ".m4v");\r
+ else\r
+ DVD_Save.FileName = DVD_Save.FileName.Replace(".m4v", ".mp4").Replace(".mkv", ".mp4");\r
break;\r
case 2:\r
- if (!Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))\r
+ if (\r
+ !Path.GetExtension(DVD_Save.FileName).Equals(".mkv", StringComparison.InvariantCultureIgnoreCase))\r
DVD_Save.FileName = DVD_Save.FileName.Replace(".mp4", ".mkv").Replace(".m4v", ".mkv");\r
break;\r
default:\r
switch (drop_format.SelectedIndex)\r
{\r
case 0:\r
- if (Settings.Default.useM4v || Check_ChapterMarkers.Checked ||\r
+ if (Properties.Settings.Default.useM4v || Check_ChapterMarkers.Checked ||\r
AudioSettings.RequiresM4V() || Subtitles.RequiresM4V())\r
SetExtension(".m4v");\r
else\r
public void SetExtension(string newExtension)\r
{\r
if (newExtension == ".mp4" || newExtension == ".m4v")\r
- if (Settings.Default.useM4v || Check_ChapterMarkers.Checked || AudioSettings.RequiresM4V() ||\r
+ if (Properties.Settings.Default.useM4v || Check_ChapterMarkers.Checked || AudioSettings.RequiresM4V() ||\r
Subtitles.RequiresM4V())\r
newExtension = ".m4v";\r
else\r
slider_videoQuality.Minimum = 0;\r
slider_videoQuality.TickFrequency = 1;\r
\r
- double cqStep = Settings.Default.x264cqstep;\r
+ CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");\r
+ double cqStep = Properties.Settings.Default.x264cqstep;\r
double multiplier = 1.0 / cqStep;\r
double value = slider_videoQuality.Value * multiplier;\r
\r
- slider_videoQuality.Maximum = (int)(51 / Settings.Default.x264cqstep);\r
+ slider_videoQuality.Maximum = (int)(51 / Properties.Settings.Default.x264cqstep);\r
\r
if (value < slider_videoQuality.Maximum)\r
slider_videoQuality.Value = slider_videoQuality.Maximum - (int)value;\r
}\r
}\r
\r
- private double cachedCqStep = Settings.Default.x264cqstep;\r
+ private double _cachedCqStep = Properties.Settings.Default.x264cqstep;\r
\r
/// <summary>\r
/// Update the CQ slider for x264 for a new CQ step. This is set from option\r
public void setQualityFromSlider()\r
{\r
// Work out the current RF value.\r
- double cqStep = cachedCqStep;\r
+ double cqStep = _cachedCqStep;\r
double rfValue = 51.0 - slider_videoQuality.Value * cqStep;\r
\r
// Change the maximum value for the slider\r
- slider_videoQuality.Maximum = (int)(51 / Settings.Default.x264cqstep);\r
+ slider_videoQuality.Maximum = (int)(51 / Properties.Settings.Default.x264cqstep);\r
\r
// Reset the CQ slider to RF0\r
slider_videoQuality.Value = slider_videoQuality.Maximum;\r
\r
// Reset the CQ slider back to the previous value as close as possible\r
- double cqStepNew = Settings.Default.x264cqstep;\r
+ double cqStepNew = Properties.Settings.Default.x264cqstep;\r
double rfValueCurrent = 51.0 - slider_videoQuality.Value * cqStepNew;\r
while (rfValueCurrent < rfValue)\r
{\r
}\r
\r
// Cache the CQ step for the next calculation\r
- cachedCqStep = Settings.Default.x264cqstep;\r
+ _cachedCqStep = Properties.Settings.Default.x264cqstep;\r
}\r
\r
private void slider_videoQuality_Scroll(object sender, EventArgs e)\r
{\r
- double cqStep = Settings.Default.x264cqstep;\r
+ double cqStep = Properties.Settings.Default.x264cqstep;\r
switch (drp_videoEncoder.Text)\r
{\r
case "MPEG-4 (FFmpeg)":\r
}\r
else\r
{\r
- if (drop_format.SelectedIndex != 1 && !Settings.Default.useM4v)\r
+ if (drop_format.SelectedIndex != 1 && !Properties.Settings.Default.useM4v)\r
SetExtension(".mp4");\r
data_chpt.Enabled = false;\r
btn_importChapters.Enabled = false;\r
\r
private void btn_export_Click(object sender, EventArgs e)\r
{\r
- SaveFileDialog saveFileDialog = new SaveFileDialog { Filter = "Csv File|*.csv", DefaultExt = "csv" };\r
+ SaveFileDialog saveFileDialog = new SaveFileDialog();\r
+ saveFileDialog.Filter = "Csv File|*.csv";\r
+ saveFileDialog.DefaultExt = "csv";\r
if (saveFileDialog.ShowDialog() == DialogResult.OK)\r
{\r
string filename = saveFileDialog.FileName;\r
try\r
{\r
SourceScan.Scan(sourcePath, title);\r
- SourceScan.ScanStatusChanged += SourceScan_ScanStatusChanged;\r
- SourceScan.ScanCompleted += SourceScan_ScanCompleted;\r
+ SourceScan.ScanStatusChanged += new EventHandler(SourceScan_ScanStatusChanged);\r
+ SourceScan.ScanCompleted += new EventHandler(SourceScan_ScanCompleted);\r
}\r
catch (Exception exc)\r
{\r
/// <param name="e">\r
/// The e.\r
/// </param>\r
- private void SourceScan_ScanStatusChanged(object sender, HandBrake.ApplicationServices.ScanProgressEventArgs e)\r
+ private void SourceScan_ScanStatusChanged(object sender, EventArgs e)\r
{\r
- UpdateScanStatusLabel(sender, e);\r
+ UpdateScanStatusLabel();\r
}\r
\r
/// <summary>\r
/// <summary>\r
/// Update the Scan Status Label\r
/// </summary>\r
- /// <param name="sender"> The Sender </param>\r
- /// <param name="e">Scan Progress Event Args</param>\r
- private void UpdateScanStatusLabel(object sender, HandBrake.ApplicationServices.ScanProgressEventArgs e)\r
+ private void UpdateScanStatusLabel()\r
{\r
if (InvokeRequired)\r
{\r
- BeginInvoke(new ScanService.ScanProgessStatus(UpdateScanStatusLabel), new[] { e });\r
+ BeginInvoke(new UpdateWindowHandler(UpdateScanStatusLabel));\r
return;\r
}\r
-\r
- lbl_encode.Text = "Scanning Title" + e.CurrentTitle + " of " + e.TotalTitles;\r
+ lbl_encode.Text = SourceScan.ScanStatus;\r
}\r
\r
/// <summary>\r
/// </summary>\r
private void KillScan()\r
{\r
- SourceScan.ScanCompleted -= SourceScan_ScanCompleted;\r
+ SourceScan.ScanCompleted -= new EventHandler(SourceScan_ScanCompleted);\r
EnableGUI();\r
ResetGUI();\r
\r
ProgressBarStatus.Visible = false;\r
btn_start.Text = "Start";\r
btn_start.ToolTipText = "Start the encoding process";\r
- btn_start.Image = Resources.Play;\r
+ btn_start.Image = Properties.Resources.Play;\r
\r
// If the window is minimized, display the notification in a popup.\r
- if (Settings.Default.trayIconAlerts)\r
+ if (Properties.Settings.Default.trayIconAlerts)\r
if (FormWindowState.Minimized == this.WindowState)\r
{\r
notifyIcon.BalloonTipText = lbl_encode.Text;\r
lbl_encode.Text = "Encoding with " + encodeQueue.Count + " encode(s) pending";\r
btn_start.Text = "Stop";\r
btn_start.ToolTipText = "Stop the encoding process.";\r
- btn_start.Image = Resources.stop;\r
+ btn_start.Image = Properties.Resources.stop;\r
}\r
catch (Exception exc)\r
{\r
Text = drive.RootDirectory + " (" + drive.VolumeLabel + ")",\r
Image = Resources.disc_small\r
};\r
- menuItem.Click += mnu_dvd_drive_Click;\r
+ menuItem.Click += new EventHandler(mnu_dvd_drive_Click);\r
menuItems.Add(menuItem);\r
}\r
\r
\r
if (SourceScan.IsScanning)\r
{\r
- SourceScan.ScanCompleted -= SourceScan_ScanCompleted;\r
+ SourceScan.ScanCompleted -= new EventHandler(SourceScan_ScanCompleted);\r
SourceScan.Stop();\r
}\r
}\r
this.label30 = new System.Windows.Forms.Label();\r
this.check_disablePresetNotification = new System.Windows.Forms.CheckBox();\r
this.label28 = new System.Windows.Forms.Label();\r
+ this.tab_debug = new System.Windows.Forms.TabPage();\r
+ this.check_disableResCalc = new System.Windows.Forms.CheckBox();\r
this.label8 = new System.Windows.Forms.Label();\r
this.pictureBox2 = new System.Windows.Forms.PictureBox();\r
this.pathFinder = new System.Windows.Forms.FolderBrowserDialog();\r
this.tab_audio_sub.SuspendLayout();\r
this.tab_cli.SuspendLayout();\r
this.tab_advanced.SuspendLayout();\r
+ this.tab_debug.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();\r
this.tableLayoutPanel5.SuspendLayout();\r
this.SuspendLayout();\r
this.tab_options.Controls.Add(this.tab_audio_sub);\r
this.tab_options.Controls.Add(this.tab_cli);\r
this.tab_options.Controls.Add(this.tab_advanced);\r
+ this.tab_options.Controls.Add(this.tab_debug);\r
this.tab_options.Dock = System.Windows.Forms.DockStyle.Fill;\r
this.tab_options.Location = new System.Drawing.Point(3, 38);\r
this.tab_options.Name = "tab_options";\r
this.label28.TabIndex = 85;\r
this.label28.Text = "x264:";\r
// \r
+ // tab_debug\r
+ // \r
+ this.tab_debug.Controls.Add(this.check_disableResCalc);\r
+ this.tab_debug.Location = new System.Drawing.Point(4, 22);\r
+ this.tab_debug.Name = "tab_debug";\r
+ this.tab_debug.Padding = new System.Windows.Forms.Padding(3);\r
+ this.tab_debug.Size = new System.Drawing.Size(580, 334);\r
+ this.tab_debug.TabIndex = 7;\r
+ this.tab_debug.Text = "Debug";\r
+ this.tab_debug.UseVisualStyleBackColor = true;\r
+ // \r
+ // check_disableResCalc\r
+ // \r
+ this.check_disableResCalc.AutoSize = true;\r
+ this.check_disableResCalc.Location = new System.Drawing.Point(13, 15);\r
+ this.check_disableResCalc.Name = "check_disableResCalc";\r
+ this.check_disableResCalc.Size = new System.Drawing.Size(327, 17);\r
+ this.check_disableResCalc.TabIndex = 0;\r
+ this.check_disableResCalc.Text = "Disable Resolution Calculation for \"None\" and \"Custom\" modes.";\r
+ this.ToolTip.SetToolTip(this.check_disableResCalc, resources.GetString("check_disableResCalc.ToolTip"));\r
+ this.check_disableResCalc.UseVisualStyleBackColor = true;\r
+ this.check_disableResCalc.CheckedChanged += new System.EventHandler(this.check_disableResCalc_CheckedChanged);\r
+ // \r
// label8\r
// \r
this.label8.Anchor = System.Windows.Forms.AnchorStyles.Left;\r
this.tab_cli.PerformLayout();\r
this.tab_advanced.ResumeLayout(false);\r
this.tab_advanced.PerformLayout();\r
+ this.tab_debug.ResumeLayout(false);\r
+ this.tab_debug.PerformLayout();\r
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();\r
this.tableLayoutPanel5.ResumeLayout(false);\r
this.tableLayoutPanel5.PerformLayout();\r
private System.Windows.Forms.RadioButton radio_dub;\r
private System.Windows.Forms.Label label15;\r
internal System.Windows.Forms.Button btn_browse;\r
+ private System.Windows.Forms.TabPage tab_debug;\r
+ private System.Windows.Forms.CheckBox check_disableResCalc;\r
internal System.Windows.Forms.CheckBox check_growlEncode;\r
internal System.Windows.Forms.CheckBox check_GrowlQueue;\r
internal System.Windows.Forms.ComboBox drop_previewScanCount;\r
\r
using HandBrake.ApplicationServices;\r
\r
- using Properties;\r
+ using Handbrake.Properties;\r
\r
- /// <summary>\r
- /// The Options Screen\r
- /// </summary>\r
public partial class frmOptions : Form\r
{\r
private frmMain mainWindow;\r
// #############################\r
\r
// Enable Tooltips.\r
- if (Settings.Default.tooltipEnable)\r
+ if (Properties.Settings.Default.tooltipEnable)\r
{\r
check_tooltip.CheckState = CheckState.Checked;\r
ToolTip.Active = true;\r
}\r
\r
// Update Check\r
- if (Settings.Default.updateStatus)\r
+ if (Properties.Settings.Default.updateStatus)\r
check_updateCheck.CheckState = CheckState.Checked;\r
\r
// Days between update checks\r
- switch (Settings.Default.daysBetweenUpdateCheck)\r
+ switch (Properties.Settings.Default.daysBetweenUpdateCheck)\r
{\r
case 1:\r
drop_updateCheckDays.SelectedIndex = 0;\r
}\r
\r
// On Encode Completeion Action\r
- drp_completeOption.Text = Settings.Default.CompletionOption;\r
+ drp_completeOption.Text = Properties.Settings.Default.CompletionOption;\r
\r
// Growl.\r
- if (Settings.Default.growlEncode)\r
+ if (Properties.Settings.Default.growlEncode)\r
check_growlEncode.CheckState = CheckState.Checked;\r
\r
- if (Settings.Default.growlQueue)\r
+ if (Properties.Settings.Default.growlQueue)\r
check_GrowlQueue.CheckState = CheckState.Checked;\r
\r
// Enable auto naming feature.\r
- if (Settings.Default.autoNaming)\r
+ if (Properties.Settings.Default.autoNaming)\r
check_autoNaming.CheckState = CheckState.Checked;\r
\r
// Store the auto name path\r
- text_an_path.Text = Settings.Default.autoNamePath;\r
+ text_an_path.Text = Properties.Settings.Default.autoNamePath;\r
if (text_an_path.Text == string.Empty)\r
text_an_path.Text = "Click 'Browse' to set the default location";\r
\r
// Store auto name format\r
- txt_autoNameFormat.Text = Settings.Default.autoNameFormat;\r
+ txt_autoNameFormat.Text = Properties.Settings.Default.autoNameFormat;\r
\r
// Use iPod/iTunes friendly .m4v extension for MP4 files.\r
- if (Settings.Default.useM4v)\r
+ if (Properties.Settings.Default.useM4v)\r
check_m4v.CheckState = CheckState.Checked;\r
\r
// Remove Underscores\r
- check_removeUnderscores.Checked = Settings.Default.AutoNameRemoveUnderscore;\r
+ check_removeUnderscores.Checked = Properties.Settings.Default.AutoNameRemoveUnderscore;\r
\r
// Title case\r
- check_TitleCase.Checked = Settings.Default.AutoNameTitleCase;\r
+ check_TitleCase.Checked = Properties.Settings.Default.AutoNameTitleCase;\r
\r
// #############################\r
// Picture Tab\r
// #############################\r
\r
// VLC Path\r
- txt_vlcPath.Text = Settings.Default.VLC_Path;\r
+ txt_vlcPath.Text = Properties.Settings.Default.VLC_Path;\r
\r
// #############################\r
// Audio and Subtitles Tab\r
// #############################\r
\r
- drop_preferredLang.SelectedItem = Settings.Default.NativeLanguage;\r
+ drop_preferredLang.SelectedItem = Properties.Settings.Default.NativeLanguage;\r
\r
- if (Settings.Default.DubAudio)\r
+ if (Properties.Settings.Default.DubAudio)\r
radio_dub.Checked = true;\r
else\r
radio_foreignAndSubs.Checked = true;\r
// #############################\r
\r
// Priority level for encodes\r
- drp_Priority.Text = Settings.Default.processPriority;\r
+ drp_Priority.Text = Properties.Settings.Default.processPriority;\r
\r
- check_preventSleep.Checked = Settings.Default.preventSleep; \r
+ check_preventSleep.Checked = Properties.Settings.Default.preventSleep; \r
\r
// Log Verbosity Level\r
- cb_logVerboseLvl.SelectedIndex = Settings.Default.verboseLevel;\r
+ cb_logVerboseLvl.SelectedIndex = Properties.Settings.Default.verboseLevel;\r
\r
// Save logs in the same directory as encoded files\r
- if (Settings.Default.saveLogWithVideo)\r
+ if (Properties.Settings.Default.saveLogWithVideo)\r
check_saveLogWithVideo.CheckState = CheckState.Checked;\r
\r
// Save Logs in a specified path\r
- if (Settings.Default.saveLogToSpecifiedPath)\r
+ if (Properties.Settings.Default.saveLogToSpecifiedPath)\r
check_logsInSpecifiedLocation.CheckState = CheckState.Checked;\r
\r
// The saved log path\r
- text_logPath.Text = Settings.Default.saveLogPath;\r
+ text_logPath.Text = Properties.Settings.Default.saveLogPath;\r
\r
- check_clearOldLogs.Checked = Settings.Default.clearOldLogs;\r
+ check_clearOldLogs.Checked = Properties.Settings.Default.clearOldLogs;\r
\r
// #############################\r
// Advanced\r
// #############################\r
\r
// Minimise to Tray\r
- if (Settings.Default.trayIconAlerts)\r
+ if (Properties.Settings.Default.trayIconAlerts)\r
check_trayStatusAlerts.CheckState = CheckState.Checked;\r
\r
// Tray Balloon popups\r
- if (Settings.Default.MainWindowMinimize)\r
+ if (Properties.Settings.Default.MainWindowMinimize)\r
check_mainMinimize.CheckState = CheckState.Checked;\r
\r
// Enable / Disable Query editor tab\r
- if (Settings.Default.QueryEditorTab)\r
+ if (Properties.Settings.Default.QueryEditorTab)\r
check_queryEditorTab.CheckState = CheckState.Checked;\r
check_promptOnUnmatchingQueries.Enabled = check_queryEditorTab.Checked;\r
\r
// Prompt on inconsistant queries\r
- check_promptOnUnmatchingQueries.Checked = Settings.Default.PromptOnUnmatchingQueries;\r
+ check_promptOnUnmatchingQueries.Checked = Properties.Settings.Default.PromptOnUnmatchingQueries;\r
\r
// Preset update notification\r
- if (Settings.Default.presetNotification)\r
+ if (Properties.Settings.Default.presetNotification)\r
check_disablePresetNotification.CheckState = CheckState.Checked;\r
\r
// Show CLI Window\r
- check_showCliForInGUIEncode.Checked = Settings.Default.showCliForInGuiEncodeStatus;\r
+ check_showCliForInGUIEncode.Checked = Properties.Settings.Default.showCliForInGuiEncodeStatus;\r
\r
// Set the preview count\r
- drop_previewScanCount.SelectedItem = Settings.Default.previewScanCount.ToString();\r
+ drop_previewScanCount.SelectedItem = Properties.Settings.Default.previewScanCount.ToString();\r
\r
// x264 step\r
- string step = Settings.Default.x264cqstep.ToString(new CultureInfo("en-US"));\r
+ string step = Properties.Settings.Default.x264cqstep.ToString(new CultureInfo("en-US"));\r
switch (step)\r
{\r
case "1":\r
}\r
\r
// Use Experimental dvdnav\r
- if (Settings.Default.noDvdNav)\r
+ if (Properties.Settings.Default.noDvdNav)\r
check_dvdnav.CheckState = CheckState.Checked;\r
+\r
+ // #############################\r
+ // Debug\r
+ // #############################\r
+ if (Properties.Settings.Default.disableResCalc)\r
+ check_disableResCalc.Checked = true;\r
}\r
\r
#region General\r
\r
private void check_updateCheck_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.updateStatus = check_updateCheck.Checked;\r
+ Properties.Settings.Default.updateStatus = check_updateCheck.Checked;\r
}\r
\r
private void drop_updateCheckDays_SelectedIndexChanged(object sender, EventArgs e)\r
switch (drop_updateCheckDays.SelectedIndex)\r
{\r
case 0:\r
- Settings.Default.daysBetweenUpdateCheck = 1;\r
+ Properties.Settings.Default.daysBetweenUpdateCheck = 1;\r
break;\r
case 1:\r
- Settings.Default.daysBetweenUpdateCheck = 7;\r
+ Properties.Settings.Default.daysBetweenUpdateCheck = 7;\r
break;\r
case 2:\r
- Settings.Default.daysBetweenUpdateCheck = 30;\r
+ Properties.Settings.Default.daysBetweenUpdateCheck = 30;\r
break;\r
}\r
}\r
\r
private void check_tooltip_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.tooltipEnable = check_tooltip.Checked;\r
+ Properties.Settings.Default.tooltipEnable = check_tooltip.Checked;\r
}\r
\r
private void drp_completeOption_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.CompletionOption = drp_completeOption.Text;\r
+ Properties.Settings.Default.CompletionOption = drp_completeOption.Text;\r
}\r
\r
private void check_GrowlQueue_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.growlQueue = check_GrowlQueue.Checked;\r
+ Properties.Settings.Default.growlQueue = check_GrowlQueue.Checked;\r
}\r
\r
private void check_growlEncode_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.growlEncode = check_growlEncode.Checked;\r
+ Properties.Settings.Default.growlEncode = check_growlEncode.Checked;\r
}\r
\r
private void check_autoNaming_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.autoNaming = check_autoNaming.Checked;\r
+ Properties.Settings.Default.autoNaming = check_autoNaming.Checked;\r
}\r
\r
private void txt_autoNameFormat_TextChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.autoNameFormat = txt_autoNameFormat.Text;\r
+ Properties.Settings.Default.autoNameFormat = txt_autoNameFormat.Text;\r
}\r
\r
private void btn_browse_Click(object sender, EventArgs e)\r
{\r
if (text_an_path.Text == string.Empty)\r
{\r
- Settings.Default.autoNamePath = string.Empty;\r
+ Properties.Settings.Default.autoNamePath = string.Empty;\r
text_an_path.Text = "Click 'Browse' to set the default location";\r
}\r
else\r
- Settings.Default.autoNamePath = text_an_path.Text;\r
+ Properties.Settings.Default.autoNamePath = text_an_path.Text;\r
}\r
\r
private void check_m4v_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.useM4v = check_m4v.Checked;\r
+ Properties.Settings.Default.useM4v = check_m4v.Checked;\r
}\r
\r
private void check_removeUnderscores_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.AutoNameRemoveUnderscore = check_removeUnderscores.Checked;\r
+ Properties.Settings.Default.AutoNameRemoveUnderscore = check_removeUnderscores.Checked;\r
}\r
\r
private void check_TitleCase_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.AutoNameTitleCase = check_TitleCase.Checked;\r
+ Properties.Settings.Default.AutoNameTitleCase = check_TitleCase.Checked;\r
}\r
\r
#endregion\r
\r
private void txt_vlcPath_TextChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.VLC_Path = txt_vlcPath.Text;\r
+ Properties.Settings.Default.VLC_Path = txt_vlcPath.Text;\r
}\r
\r
#endregion\r
\r
private void drop_preferredLang_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.NativeLanguage = drop_preferredLang.SelectedItem.ToString();\r
+ Properties.Settings.Default.NativeLanguage = drop_preferredLang.SelectedItem.ToString();\r
}\r
\r
private void radio_dub_CheckedChanged(object sender, EventArgs e)\r
{\r
if (radio_dub.Checked)\r
- Settings.Default.DubAudio = true;\r
+ Properties.Settings.Default.DubAudio = true;\r
}\r
\r
private void radio_foreignAndSubs_CheckedChanged(object sender, EventArgs e)\r
{\r
if (radio_foreignAndSubs.Checked)\r
- Settings.Default.DubAudio = false;\r
+ Properties.Settings.Default.DubAudio = false;\r
}\r
\r
#endregion\r
\r
private void drp_Priority_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.processPriority = drp_Priority.Text;\r
+ Properties.Settings.Default.processPriority = drp_Priority.Text;\r
}\r
\r
private void check_preventSleep_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.preventSleep = check_preventSleep.Checked;\r
+ Properties.Settings.Default.preventSleep = check_preventSleep.Checked;\r
}\r
\r
private void cb_logVerboseLvl_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.verboseLevel = cb_logVerboseLvl.SelectedIndex;\r
+ Properties.Settings.Default.verboseLevel = cb_logVerboseLvl.SelectedIndex;\r
}\r
\r
private void check_saveLogWithVideo_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.saveLogWithVideo = check_saveLogWithVideo.Checked;\r
+ Properties.Settings.Default.saveLogWithVideo = check_saveLogWithVideo.Checked;\r
}\r
\r
private void check_logsInSpecifiedLocation_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.saveLogToSpecifiedPath = check_logsInSpecifiedLocation.Checked;\r
+ Properties.Settings.Default.saveLogToSpecifiedPath = check_logsInSpecifiedLocation.Checked;\r
}\r
\r
private void btn_saveLog_Click(object sender, EventArgs e)\r
\r
private void text_logPath_TextChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.saveLogPath = text_logPath.Text;\r
+ Properties.Settings.Default.saveLogPath = text_logPath.Text;\r
}\r
\r
private void btn_viewLogs_Click(object sender, EventArgs e)\r
{\r
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
string windir = Environment.GetEnvironmentVariable("WINDIR");\r
- Process prc = new Process\r
- {\r
- StartInfo = {FileName = windir + @"\explorer.exe", Arguments = logDir}\r
- };\r
+ Process prc = new Process();\r
+ prc.StartInfo.FileName = windir + @"\explorer.exe";\r
+ prc.StartInfo.Arguments = logDir;\r
prc.Start();\r
}\r
\r
\r
private void check_clearOldLogs_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.clearOldLogs = check_clearOldLogs.Checked;\r
+ Properties.Settings.Default.clearOldLogs = check_clearOldLogs.Checked;\r
}\r
\r
#endregion\r
\r
private void check_mainMinimize_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.MainWindowMinimize = check_mainMinimize.Checked;\r
+ Properties.Settings.Default.MainWindowMinimize = check_mainMinimize.Checked;\r
check_trayStatusAlerts.Enabled = check_mainMinimize.Checked;\r
}\r
\r
private void check_trayStatusAlerts_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.trayIconAlerts = check_trayStatusAlerts.Checked;\r
+ Properties.Settings.Default.trayIconAlerts = check_trayStatusAlerts.Checked;\r
}\r
\r
private void check_queryEditorTab_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.QueryEditorTab = check_queryEditorTab.Checked;\r
+ Properties.Settings.Default.QueryEditorTab = check_queryEditorTab.Checked;\r
check_promptOnUnmatchingQueries.Enabled = check_queryEditorTab.Checked;\r
}\r
\r
private void check_promptOnUnmatchingQueries_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.PromptOnUnmatchingQueries = check_promptOnUnmatchingQueries.Checked;\r
+ Properties.Settings.Default.PromptOnUnmatchingQueries = check_promptOnUnmatchingQueries.Checked;\r
}\r
\r
private void check_disablePresetNotification_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.presetNotification = check_disablePresetNotification.Checked;\r
+ Properties.Settings.Default.presetNotification = check_disablePresetNotification.Checked;\r
}\r
\r
private void check_showCliForInGUIEncode_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.showCliForInGuiEncodeStatus = check_showCliForInGUIEncode.Checked;\r
+ Properties.Settings.Default.showCliForInGuiEncodeStatus = check_showCliForInGUIEncode.Checked;\r
}\r
\r
private void drop_previewScanCount_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.previewScanCount = int.Parse(drop_previewScanCount.SelectedItem.ToString());\r
+ Properties.Settings.Default.previewScanCount = int.Parse(drop_previewScanCount.SelectedItem.ToString());\r
}\r
\r
private void x264step_SelectedIndexChanged(object sender, EventArgs e)\r
switch (drop_x264step.SelectedIndex)\r
{\r
case 0:\r
- Settings.Default.x264cqstep = 1.0;\r
+ Properties.Settings.Default.x264cqstep = 1.0;\r
break;\r
case 1:\r
- Settings.Default.x264cqstep = 0.50;\r
+ Properties.Settings.Default.x264cqstep = 0.50;\r
break;\r
case 2:\r
- Settings.Default.x264cqstep = 0.25;\r
+ Properties.Settings.Default.x264cqstep = 0.25;\r
break;\r
case 3:\r
- Settings.Default.x264cqstep = 0.20;\r
+ Properties.Settings.Default.x264cqstep = 0.20;\r
break;\r
}\r
mainWindow.setQualityFromSlider();\r
\r
private void check_dvdnav_CheckedChanged(object sender, EventArgs e)\r
{\r
- Settings.Default.noDvdNav = check_dvdnav.Checked;\r
+ Properties.Settings.Default.noDvdNav = check_dvdnav.Checked;\r
+ }\r
+\r
+ #endregion\r
+\r
+ #region Debug\r
+\r
+ private void check_disableResCalc_CheckedChanged(object sender, EventArgs e)\r
+ {\r
+ Properties.Settings.Default.disableResCalc = check_disableResCalc.Checked;\r
}\r
\r
#endregion\r
\r
private void btn_close_Click(object sender, EventArgs e)\r
{\r
- Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this\r
+ Properties.Settings.Default.Save(); // Small hack for Vista. Seems to work fine on XP without this\r
UpdateApplicationServicesSettings();\r
\r
this.Close();\r
<metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>132, 18</value>\r
</metadata>\r
+ <data name="check_showCliForInGUIEncode.ToolTip" xml:space="preserve">\r
+ <value>Shows the CLI window when encoding.\r
+You may wish to enable this as you'll be able to cleanly exit the CLI using ctrl-c\r
+meaing you'll have playable files if you choose to end the encode early. \r
+\r
+When disabled, Presseting "Stop" on the main winow will render the encode unplayable.</value>\r
+ </data>\r
+ <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>132, 18</value>\r
+ </metadata>\r
+ <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
+ <value>132, 18</value>\r
+ </metadata>\r
<data name="check_m4v.ToolTip" xml:space="preserve">\r
<value>Use .m4v instead of .mp4 for MP4 files\r
\r
When this option is disabled, Chapter Markers, AC3 audio and SRT subtitiles will still automatically change the file extension to m4v.\r
</value>\r
</data>\r
- <data name="check_showCliForInGUIEncode.ToolTip" xml:space="preserve">\r
- <value>Shows the CLI window when encoding.\r
-You may wish to enable this as you'll be able to cleanly exit the CLI using ctrl-c\r
-meaing you'll have playable files if you choose to end the encode early. \r
-\r
-When disabled, Presseting "Stop" on the main winow will render the encode unplayable.</value>\r
+ <data name="check_disableResCalc.ToolTip" xml:space="preserve">\r
+ <value>If the new Picture Settings panel is causing you problems, enable this option.\r
+It disables some of the resolution calcuation code for None and Custom modes.\r
+When enabled, the values in the text boxes will simply be passed through to the CLI so it is up to you to get the values correct.</value>\r
</data>\r
<metadata name="pathFinder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">\r
<value>17, 17</value>\r
using System.Collections.Generic;\r
using System.Collections.ObjectModel;\r
using System.ComponentModel;\r
+ using System.IO;\r
using System.Windows.Forms;\r
using Functions;\r
\r
}\r
\r
/* Right Click Menu */\r
-\r
/// <summary>\r
/// Handle the Move Up Menu Item\r
/// </summary>\r