]> granicus.if.org Git - handbrake/commitdiff
Reverting 3452
authorsr55 <sr55.hb@outlook.com>
Thu, 22 Jul 2010 18:20:19 +0000 (18:20 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 22 Jul 2010 18:20:19 +0000 (18:20 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3454 b64f7644-9d1e-0410-96f1-a4d463321fa5

44 files changed:
macosx/Controller.m
win/C#/Controls/Filters.cs
win/C#/Controls/PictureSettings.cs
win/C#/Controls/Subtitles.cs
win/C#/Controls/x264Panel.cs
win/C#/Functions/AppcastReader.cs
win/C#/Functions/Main.cs
win/C#/Functions/PresetLoader.cs
win/C#/Functions/Win32.cs
win/C#/HandBrake.5.0.ReSharper [new file with mode: 0644]
win/C#/HandBrake.ApplicationServices/Functions/Logging.cs
win/C#/HandBrake.ApplicationServices/Functions/Win32.cs
win/C#/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
win/C#/HandBrake.ApplicationServices/Init.cs
win/C#/HandBrake.ApplicationServices/Parsing/AudioTrack.cs
win/C#/HandBrake.ApplicationServices/Parsing/Chapter.cs
win/C#/HandBrake.ApplicationServices/Parsing/DVD.cs
win/C#/HandBrake.ApplicationServices/Parsing/Subtitle.cs
win/C#/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs [deleted file]
win/C#/HandBrake.ApplicationServices/ScanProgressEventArgs.cs [deleted file]
win/C#/HandBrake.ApplicationServices/Services/Encode.cs
win/C#/HandBrake.ApplicationServices/Services/Interfaces/IQueue.cs
win/C#/HandBrake.ApplicationServices/Services/Interfaces/IScan.cs
win/C#/HandBrake.ApplicationServices/Services/Queue.cs
win/C#/HandBrake.ApplicationServices/Services/Scan.cs
win/C#/HandBrake.ApplicationServices/Settings.StyleCop
win/C#/HandBrakeCS.5.0.ReSharper [new file with mode: 0644]
win/C#/HandBrakeCS.csproj
win/C#/HandBrakeCS.csproj.ReSharper [new file with mode: 0644]
win/C#/HandBrakeCS.sln [new file with mode: 0644]
win/C#/Presets/PresetsHandler.cs
win/C#/Program.cs
win/C#/Properties/Settings.Designer.cs
win/C#/Properties/Settings.settings
win/C#/Settings.StyleCop
win/C#/app.config
win/C#/frmActivityWindow.cs
win/C#/frmAddPreset.cs
win/C#/frmDownload.cs
win/C#/frmMain.cs
win/C#/frmOptions.Designer.cs
win/C#/frmOptions.cs
win/C#/frmOptions.resx
win/C#/frmQueue.cs

index 47303dfc984d5bf101f1d53ad0cb3317d359d44e..d9122b58724c21c12cd5324ad4a1df0bdc1b0304 100644 (file)
@@ -182,9 +182,9 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
          */
         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,
@@ -195,48 +195,29 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
         }
         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
     {
@@ -274,6 +255,7 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
        {
         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"];
@@ -290,8 +272,7 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
                 /* Tell fQueueController what our pidNum is */
                 [fQueueController setPidNum:pidNum];
             }
-            hbInstances++;
-        }
+               }
        }
     return hbInstances;
 }
@@ -300,11 +281,8 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
 
 - (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 */
@@ -320,10 +298,8 @@ static NSString *        ChooseSourceIdentifier             = @"Choose Source It
     }
     else
     {
-        [self writeToActivityLog: "didDimissReloadQueue First Button Chosen"];
-        if (hbInstanceNum == 1)
+        if ([self hbInstances] == 1)
         {
-            
             [self setQueueEncodingItemsAsPending];
         }
         [self showQueueWindow:NULL];
@@ -2105,19 +2081,15 @@ fWorkingCount = 0;
     /* 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];
index 1ee72d6c92fc9465cb8be03628e5e5b69b2c3671..9f75f69d3b469ec88f586ac6ced468aef45a6610 100644 (file)
@@ -8,11 +8,13 @@ namespace Handbrake.Controls
     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
@@ -26,11 +28,6 @@ namespace Handbrake.Controls
             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
@@ -263,12 +260,6 @@ namespace Handbrake.Controls
         }\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
@@ -277,11 +268,6 @@ namespace Handbrake.Controls
                 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
@@ -293,11 +279,6 @@ namespace Handbrake.Controls
                 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
@@ -309,11 +290,6 @@ namespace Handbrake.Controls
                 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
@@ -323,11 +299,6 @@ namespace Handbrake.Controls
                 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
index 534cc0fd560aded828f2e27eeeb1f5917bac2935..e0319a6908c849bb3ce40c00e7b0a8aaba70e0d6 100644 (file)
@@ -7,6 +7,7 @@ namespace Handbrake.Controls
 {\r
     using System;\r
     using System.Drawing;\r
+    using System.Globalization;\r
     using System.Windows.Forms;\r
 \r
     using HandBrake.ApplicationServices.Parsing;\r
@@ -18,6 +19,7 @@ namespace Handbrake.Controls
     /// </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
@@ -150,6 +152,9 @@ namespace Handbrake.Controls
         // 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
@@ -209,6 +214,9 @@ namespace Handbrake.Controls
 \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
@@ -269,6 +277,9 @@ namespace Handbrake.Controls
 \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
@@ -287,6 +298,9 @@ namespace Handbrake.Controls
 \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
@@ -312,7 +326,7 @@ namespace Handbrake.Controls
 \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
index 8baf18eae0322416e2dad5dde393e76fbfbe6351..e923598e709b7e78ed7e884a195cbfb3a49cc60b 100644 (file)
@@ -195,7 +195,7 @@ namespace Handbrake.Controls
                 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
@@ -210,14 +210,14 @@ namespace Handbrake.Controls
 \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
@@ -286,7 +286,7 @@ namespace Handbrake.Controls
 \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
@@ -388,7 +388,7 @@ namespace Handbrake.Controls
             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
@@ -411,7 +411,7 @@ namespace Handbrake.Controls
             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
@@ -437,7 +437,7 @@ namespace Handbrake.Controls
             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
@@ -458,7 +458,8 @@ namespace Handbrake.Controls
             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
@@ -478,7 +479,7 @@ namespace Handbrake.Controls
             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
@@ -498,7 +499,7 @@ namespace Handbrake.Controls
             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
index f63214b2314fd11178cd58ea93596da11db0c7ed..8d223f6ab658a8151bd73fa385db5639fd1ef52c 100644 (file)
@@ -8,9 +8,6 @@ namespace Handbrake.Controls
     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
@@ -41,10 +38,7 @@ namespace Handbrake.Controls
             {\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
@@ -1005,7 +999,7 @@ namespace Handbrake.Controls
 \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
index 7248ffa786c3f967b4e4d0fafff57f2b3fc5a504..e6bd64b084b41ccdb125764d8d2415fe53dab0d1 100644 (file)
@@ -54,7 +54,9 @@ namespace Handbrake.Functions
                 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
index ace2d685391e76d783b6db553713c79c0141b5b9..148f8f3153ed3062494b7b4de8e796394b8eae97 100644 (file)
@@ -411,7 +411,6 @@ namespace Handbrake.Functions
         /// <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
@@ -450,7 +449,7 @@ namespace Handbrake.Functions
         }\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
index 790d51163d126cc84142f2e57522ed9aa4e1730a..6498049144b8caa7d45938c42e8e633c8042fd91 100644 (file)
@@ -26,6 +26,9 @@ namespace Handbrake.Functions
         /// <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
index c2e785075c421f90ef8449864b27222c7eb5640c..a5010268897e34732a88a62bd9849a92eacf6998 100644 (file)
@@ -46,6 +46,52 @@ namespace Handbrake.Functions
         [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
@@ -53,7 +99,10 @@ namespace Handbrake.Functions
         /// 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
@@ -92,7 +141,7 @@ namespace Handbrake.Functions
         }\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
@@ -117,51 +166,5 @@ namespace Handbrake.Functions
         {\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
diff --git a/win/C#/HandBrake.5.0.ReSharper b/win/C#/HandBrake.5.0.ReSharper
new file mode 100644 (file)
index 0000000..22ca799
--- /dev/null
@@ -0,0 +1,379 @@
+<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
index 2efab7d97c9c7d4ea729b335fc011355b57a447d..aba92dbbe5b1b9fbd1f28ad21dc0edf58eac2165 100644 (file)
@@ -23,7 +23,6 @@ namespace HandBrake.ApplicationServices.Functions
         /// <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
index d061449810305bd1a0c8cd2c9915c5c38e4bf287..a45d7441a0776657dc01a8839d5db95dcc29668f 100644 (file)
@@ -46,6 +46,52 @@ namespace HandBrake.ApplicationServices.Functions
         [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
@@ -53,7 +99,10 @@ namespace HandBrake.ApplicationServices.Functions
         /// 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
@@ -92,7 +141,7 @@ namespace HandBrake.ApplicationServices.Functions
         }\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
@@ -117,51 +166,5 @@ namespace HandBrake.ApplicationServices.Functions
         {\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
index e102010beca28c8d5c10a79b466ceb49a8a8ace6..17effbc6420e729c9543f3e333aca2d086208297 100644 (file)
@@ -75,7 +75,6 @@
     <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
index b1321bc4db9d160d7b8066be22a59bbfb9b8a895..e8f2e18af4299a691f2ef1f784a43d4bac88859f 100644 (file)
@@ -13,6 +13,63 @@ namespace HandBrake.ApplicationServices
     /// </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
@@ -84,61 +141,5 @@ namespace HandBrake.ApplicationServices
         /// </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
index 4eba0b4c182e8d4ef57d39458e8ffab46fb10f38..55cf524a5553f75aedf6fe05af6cadbda7dc3843 100644 (file)
@@ -61,10 +61,6 @@ namespace HandBrake.ApplicationServices.Parsing
         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
index 258dcff16c48f4d87c5b1ad92b044a96e2b47993..0545dd1d5bd4783342bab4ff998e34699727d685 100644 (file)
@@ -36,7 +36,8 @@ namespace HandBrake.ApplicationServices.Parsing
         /// </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
index d9f7e5e693315f3197873333792e0dd95bce170c..c7e5a27bb9bb831a9e06c45306a196c58f419432 100644 (file)
@@ -41,7 +41,7 @@ namespace HandBrake.ApplicationServices.Parsing
 \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
index 913ab5fa1caf5b9bde62dcb4c0dd75682b27b434..f4cd657685c11eff129acc8c1dff1fd57a1b120b 100644 (file)
@@ -87,7 +87,7 @@ namespace HandBrake.ApplicationServices.Parsing
         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
diff --git a/win/C#/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs b/win/C#/HandBrake.ApplicationServices/Properties/AssemblyInfo.cs
deleted file mode 100644 (file)
index c6ad9ae..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*  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
diff --git a/win/C#/HandBrake.ApplicationServices/ScanProgressEventArgs.cs b/win/C#/HandBrake.ApplicationServices/ScanProgressEventArgs.cs
deleted file mode 100644 (file)
index b7e1ccd..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*  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
index ca3f898df66b4c7f0e5b6eebf855dc549349f7a2..87b0e002764c3cafbe8e2ad3b2553f7c7485d603 100644 (file)
@@ -15,6 +15,7 @@ namespace HandBrake.ApplicationServices.Services
     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
@@ -251,15 +252,14 @@ namespace HandBrake.ApplicationServices.Services
             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
@@ -315,6 +315,8 @@ namespace HandBrake.ApplicationServices.Services
         {\r
             IsEncoding = false;\r
 \r
+            //   ReadFile(null);\r
+\r
             if (this.EncodeEnded != null)\r
                 this.EncodeEnded(this, new EventArgs());\r
 \r
@@ -342,6 +344,9 @@ namespace HandBrake.ApplicationServices.Services
         /// <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
@@ -393,7 +398,6 @@ namespace HandBrake.ApplicationServices.Services
         /// <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
index d82cfbb0242551d24b0ebbd314191170d163e880..981f3c19e3125a161225f1af76e2eb4ad041ae07 100644 (file)
@@ -57,6 +57,16 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
         /// </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
@@ -112,7 +122,6 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
         /// 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
index 63d3aee64ffbe8ebba001e09ea67078063725b33..b02b8b06ff818e50f42f6f63f95ae057ea6090ae 100644 (file)
@@ -27,13 +27,18 @@ namespace HandBrake.ApplicationServices.Services.Interfaces
         /// <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
index 3bcbcb7e8cad0ee26fe89e7d899a85dcf5a5ecc4..59c084f1c13271ee2c57816f43b96b905ffac598 100644 (file)
@@ -17,6 +17,7 @@ namespace HandBrake.ApplicationServices.Services
 \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
@@ -252,7 +253,6 @@ namespace HandBrake.ApplicationServices.Services
         /// 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
index 76ecbf2b9bc2d1d358cebcd17491ddfe4c9f59f6..da8d34f7cd34fa635a1a975f0e37e18707d85bc2 100644 (file)
@@ -60,21 +60,10 @@ namespace HandBrake.ApplicationServices.Services
         /// </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
@@ -83,6 +72,11 @@ namespace HandBrake.ApplicationServices.Services
         /// </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
@@ -192,7 +186,7 @@ namespace HandBrake.ApplicationServices.Services
                 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
@@ -286,14 +280,9 @@ namespace HandBrake.ApplicationServices.Services
         /// <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
index 1ca772fffe32db65eedf2ed9cd1259459a0b08bb..7f55ce6c690defa9a5168f5f32fe29bd4d184233 100644 (file)
@@ -1,14 +1 @@
-<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
diff --git a/win/C#/HandBrakeCS.5.0.ReSharper b/win/C#/HandBrakeCS.5.0.ReSharper
new file mode 100644 (file)
index 0000000..59f6819
--- /dev/null
@@ -0,0 +1,388 @@
+<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
index 203886d13f2abae2f3a52d9fec70238902db2826..20cb57342bd873cb0d6334a0b42b4f97b3dbb5cb 100644 (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
diff --git a/win/C#/HandBrakeCS.csproj.ReSharper b/win/C#/HandBrakeCS.csproj.ReSharper
new file mode 100644 (file)
index 0000000..9b05078
--- /dev/null
@@ -0,0 +1,3 @@
+<Configuration>\r
+  <Localizable>No</Localizable>\r
+</Configuration>
\ No newline at end of file
diff --git a/win/C#/HandBrakeCS.sln b/win/C#/HandBrakeCS.sln
new file mode 100644 (file)
index 0000000..bde8c13
--- /dev/null
@@ -0,0 +1,38 @@
+\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
index 43659b07abb39f7a7c6587007467feaf631595b0..971a478590d8341fc479e362c917c59495a67118 100644 (file)
@@ -46,7 +46,7 @@ namespace Handbrake.Presets
         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
index 42d9d9b87fba54e331d15afaa559033f7abcfdb5..1c428c874bc4ae89dde0c7ee5549f7735d8c5a4f 100644 (file)
@@ -10,12 +10,12 @@ namespace Handbrake
     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
@@ -24,14 +24,13 @@ namespace Handbrake
         /// <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
@@ -122,6 +121,9 @@ namespace Handbrake
             }\r
         }\r
 \r
-        public static int InstanceId;\r
+\r
+        public static int InstanceId = 0;\r
+\r
+\r
     }\r
 }
\ No newline at end of file
index 585e2f550cfa89bcc9883ec2f7b440aca9391ff5..b2f489294d44b270a8647e3c4bc043d9bb6152c0 100644 (file)
@@ -1,7 +1,7 @@
 ï»¿//------------------------------------------------------------------------------\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
@@ -12,7 +12,7 @@ namespace Handbrake.Properties {
     \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
@@ -394,6 +394,18 @@ namespace Handbrake.Properties {
             }\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
index af1a7f563298b11c92078a3b5b1279c5a860f5fd..c7e001d5ecafe03e163b07155e2b9e7e6579c911 100644 (file)
@@ -95,6 +95,9 @@
     <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
index 73638a716403b74a31c31ed5472ff8350b7eeb9d..139f00afee754d4b1a0b506fbeb53d082ad3f726 100644 (file)
             <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
index c1ee5fefa2e1b13fddd060213dd3b4f495d2a6aa..a51c09d8c3a4fa0899d42ae1d35be6a1878551f5 100644 (file)
       <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
index ffc02fa8f6f2f6f1540c2d46d2018911899fba8b..62799e926a42a2f7f7bd53f0e122c4aec2b153bd 100644 (file)
@@ -120,7 +120,7 @@ namespace Handbrake
                     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
@@ -155,7 +155,7 @@ namespace Handbrake
         /// </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
index ecb952911c289e83aa0fd02f9de2b73d32db857e..22ba835d7140ae72213ae2c1b156f1b0c2a60290 100644 (file)
@@ -28,7 +28,7 @@ namespace Handbrake
         /// <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
@@ -69,7 +69,6 @@ namespace Handbrake
                 case 1:\r
                     pictureSettingsMode = QueryPictureSettingsMode.SourceMaximum;\r
                     break;\r
-\r
                 default:\r
                     pictureSettingsMode = QueryPictureSettingsMode.None;\r
                     break;\r
index f3ae682c189ff34bff7a9a1fbb318ea8da375683..a3067e17dac07577583e2c90c66fc3faa06186b1 100644 (file)
@@ -12,18 +12,15 @@ namespace Handbrake
     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
@@ -35,14 +32,14 @@ namespace Handbrake
         {\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
@@ -50,29 +47,29 @@ namespace Handbrake
                 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
@@ -88,8 +85,8 @@ namespace Handbrake
         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
@@ -111,11 +108,11 @@ namespace Handbrake
 \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
index 71ccef43b1437d9ca11fd9194cf50fac41971d1c..83135c6c001b80b54d8d156dba06766f56e5abbd 100644 (file)
@@ -26,9 +26,6 @@ namespace Handbrake
     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
@@ -918,6 +915,7 @@ namespace Handbrake
 \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
@@ -1128,6 +1126,7 @@ namespace Handbrake
             lbl_encode.Text = encodeQueue.Count + " encode(s) pending in the queue";\r
 \r
             queueWindow.Show();\r
+\r
         }\r
 \r
         /// <summary>\r
@@ -1289,6 +1288,7 @@ namespace Handbrake
                 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
@@ -1341,7 +1341,7 @@ namespace Handbrake
 \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
@@ -1382,7 +1382,7 @@ namespace Handbrake
                     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
@@ -1444,7 +1444,7 @@ namespace Handbrake
                     // 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
@@ -1466,7 +1466,7 @@ namespace Handbrake
                     .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
@@ -1515,8 +1515,8 @@ namespace Handbrake
         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
@@ -1533,8 +1533,8 @@ namespace Handbrake
                         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
@@ -1544,8 +1544,8 @@ namespace Handbrake
                     }\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
@@ -1573,17 +1573,23 @@ namespace Handbrake
             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
@@ -1613,7 +1619,7 @@ namespace Handbrake
             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
@@ -1641,7 +1647,7 @@ namespace Handbrake
         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
@@ -1691,11 +1697,12 @@ namespace Handbrake
                     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
@@ -1754,7 +1761,7 @@ namespace Handbrake
             }\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
@@ -1762,17 +1769,17 @@ namespace Handbrake
         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
@@ -1781,12 +1788,12 @@ namespace Handbrake
             }\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
@@ -1857,7 +1864,7 @@ namespace Handbrake
             }\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
@@ -1877,7 +1884,9 @@ namespace Handbrake
 \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
@@ -1933,8 +1942,8 @@ namespace Handbrake
             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
@@ -1951,9 +1960,9 @@ namespace Handbrake
         /// <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
@@ -1973,17 +1982,14 @@ namespace Handbrake
         /// <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
@@ -2104,7 +2110,7 @@ namespace Handbrake
         /// </summary>\r
         private void KillScan()\r
         {\r
-            SourceScan.ScanCompleted -= SourceScan_ScanCompleted;\r
+            SourceScan.ScanCompleted -= new EventHandler(SourceScan_ScanCompleted);\r
             EnableGUI();\r
             ResetGUI();\r
 \r
@@ -2194,10 +2200,10 @@ namespace Handbrake
                 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
@@ -2228,7 +2234,7 @@ namespace Handbrake
                 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
@@ -2289,7 +2295,7 @@ namespace Handbrake
                             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
@@ -2430,7 +2436,7 @@ namespace Handbrake
 \r
                 if (SourceScan.IsScanning)\r
                 {\r
-                    SourceScan.ScanCompleted -= SourceScan_ScanCompleted;\r
+                    SourceScan.ScanCompleted -= new EventHandler(SourceScan_ScanCompleted);\r
                     SourceScan.Stop();\r
                 }\r
             }\r
index f7aa3963181e07128cea58e15e7c97fc0871cee5..2541defc33de84e43c34efa217d6829f9aba7135 100644 (file)
@@ -100,6 +100,8 @@ namespace Handbrake
             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
@@ -141,6 +143,7 @@ namespace Handbrake
             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
@@ -188,6 +191,7 @@ namespace Handbrake
             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
@@ -1045,6 +1049,29 @@ namespace Handbrake
             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
@@ -1457,6 +1484,8 @@ namespace Handbrake
             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
@@ -1556,6 +1585,8 @@ namespace Handbrake
         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
index 607c8ff0c9b8ddbad0bbce50d22f09fd143f9d42..4475d9071d7e97a59f08ed1b7616a05b9819ec21 100644 (file)
@@ -14,11 +14,8 @@ namespace Handbrake
 \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
@@ -37,18 +34,18 @@ namespace Handbrake
             // #############################\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
@@ -62,51 +59,51 @@ namespace Handbrake
             }\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
@@ -116,58 +113,58 @@ namespace Handbrake
             // #############################\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
@@ -185,15 +182,21 @@ namespace Handbrake
             }\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
@@ -201,45 +204,45 @@ namespace Handbrake
             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
@@ -252,26 +255,26 @@ namespace Handbrake
         {\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
@@ -287,7 +290,7 @@ namespace Handbrake
 \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
@@ -296,19 +299,19 @@ namespace Handbrake
 \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
@@ -317,27 +320,27 @@ namespace Handbrake
 \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
@@ -350,17 +353,16 @@ namespace Handbrake
 \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
@@ -378,7 +380,7 @@ namespace Handbrake
 \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
@@ -387,39 +389,39 @@ namespace Handbrake
 \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
@@ -427,16 +429,16 @@ namespace Handbrake
             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
@@ -444,14 +446,23 @@ namespace Handbrake
 \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
index 8a1811c837b47337faa8b0217c40b19fff2a067d..df466a44b9eb0595cc82ecbba9fc9ae198f84324 100644 (file)
   <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
@@ -127,12 +140,10 @@ Chapter Markers, AC3 Audio and SRT Subtitles will require the m4v extension if y
 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
index 85ffde8e6930a11d3d416d17ca614a8fd5217338..7d52ddef50d51785e039f14ea2ed913378b67104 100644 (file)
@@ -9,6 +9,7 @@ namespace Handbrake
     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
@@ -424,7 +425,6 @@ namespace Handbrake
         }\r
 \r
         /* Right Click Menu */\r
-\r
         /// <summary>\r
         /// Handle the Move Up Menu Item\r
         /// </summary>\r