]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix a large number of stylecop warnings.
authorsr55 <sr55.hb@outlook.com>
Sun, 30 Oct 2016 20:18:45 +0000 (20:18 +0000)
committersr55 <sr55.hb@outlook.com>
Sun, 30 Oct 2016 20:18:45 +0000 (20:18 +0000)
42 files changed:
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/HBPresetTune.cs
win/CS/HandBrake.ApplicationServices/Services/Logging/LogService.cs
win/CS/HandBrakeWPF/Commands/InputBindingTrigger.cs
win/CS/HandBrakeWPF/Commands/PresetMenuSelectCommand.cs
win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs
win/CS/HandBrakeWPF/Converters/Audio/AudioMixdownListConverter.cs
win/CS/HandBrakeWPF/Converters/PresetsMenuConverter.cs
win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
win/CS/HandBrakeWPF/Helpers/LogManager.cs
win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs
win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs
win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs
win/CS/HandBrakeWPF/Services/Encode/Model/Models/MetaData.cs
win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs
win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs
win/CS/HandBrakeWPF/Services/Presets/PresetService.cs
win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
win/CS/HandBrakeWPF/Startup/StartupOptions.cs
win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs
win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs
win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs
win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterXml.cs
win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/Interfaces/IManagePresetViewModel.cs
win/CS/HandBrakeWPF/ViewModels/Interfaces/IMetaDataViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
win/CS/HandBrakeWPF/ViewModels/ManagePresetViewModel.cs
win/CS/HandBrakeWPF/ViewModels/MetaDataViewModel.cs
win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
win/CS/HandBrakeWPF/Views/MainView.xaml.cs
win/CS/HandBrakeWPF/Views/MetaDataView.xaml.cs
win/CS/Settings.StyleCop

index e5c914fb1b9cdda598845bbe80d9521c7b34381d..e3ed4c06a6f47d21facb4899749544285789eeb2 100644 (file)
@@ -15,7 +15,7 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     public class HBPresetTune
     {
         /// <summary>
-        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
+        /// Initializes a new instance of the <see cref="HBPresetTune"/> class. 
         /// </summary>
         /// <param name="name">
         /// The name.
index b0292ca318a06358aeb5424aa89ab6b1878dd296..d440f53f6b4f44a99babb5ec9db6d4da601b969c 100644 (file)
@@ -352,7 +352,9 @@ namespace HandBrake.ApplicationServices.Services.Logging
             }
         }
 
-        // Trigger the Event to notify any subscribers that the log has been reset.
+        /// <summary>
+        /// Trigger the Event to notify any subscribers that the log has been reset.
+        /// </summary>
         protected virtual void OnLogReset()
         {
             this.LogReset?.Invoke(this, System.EventArgs.Empty);
index bed67aed86cc35b47e772d19468c0434f2258a9c..9b1ed197c59ee8ac6903f50102e5012c5a5a3bf7 100644 (file)
@@ -94,7 +94,7 @@ namespace HandBrakeWPF.Commands
                 return frameworkElement as Window;\r
 \r
             var parent = frameworkElement.Parent as FrameworkElement;\r
-            Debug.Assert(parent != null);\r
+            Debug.Assert(parent != null, "Null Parent");\r
 \r
             return GetWindow(parent);\r
         }\r
index ec64c2820882a3e6ecc05c64e8b77ea611b10053..25a8e7404af5ad25715ff625db0dd6ac848d1bfa 100644 (file)
@@ -1,5 +1,5 @@
 // --------------------------------------------------------------------------------------------------------------------
-// <copyright file="PresetsMenuConverter.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="PresetMenuSelectCommand.cs" company="HandBrake Project (http://handbrake.fr)">
 //   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
 // </copyright>
 // <summary>
@@ -17,11 +17,19 @@ namespace HandBrakeWPF.Commands
     using HandBrakeWPF.Services.Presets.Model;
     using HandBrakeWPF.ViewModels.Interfaces;
 
+    /// <summary>
+    /// The preset menu select command.
+    /// </summary>
     public class PresetMenuSelectCommand : ICommand
     {
         private readonly Preset preset;
 
-        /// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary>
+        /// <summary>
+        /// Initializes a new instance of the <see cref="PresetMenuSelectCommand"/> class. 
+        /// </summary>
+        /// <param name="preset">
+        /// The preset.
+        /// </param>
         public PresetMenuSelectCommand(Preset preset)
         {
             this.preset = preset;
@@ -43,6 +51,9 @@ namespace HandBrakeWPF.Commands
             mvm.PresetSelect(this.preset);
         }
 
+        /// <summary>
+        /// The can execute changed.
+        /// </summary>
         public event EventHandler CanExecuteChanged;
     }
 }
index eb8b5df0a70d70e975ecbd887bcd1c9412b53f69..ce7a57bb94c0507d2c93fd252641e9a66cbbf57a 100644 (file)
@@ -136,7 +136,7 @@ namespace HandBrakeWPF.Controls.SplitButton
                         this.logicalChild = current;\r
                         current = LogicalTreeHelper.GetParent(current);\r
                     }\r
-                    while (null != current);\r
+                    while (current != null);\r
 \r
                     this.contextMenu.IsOpen = false;     \r
                     this.AddLogicalChild(this.logicalChild);\r
@@ -174,7 +174,7 @@ namespace HandBrakeWPF.Controls.SplitButton
         /// </param>\r
         protected override void OnKeyDown(KeyEventArgs e)\r
         {\r
-            if (null == e)\r
+            if (e == null)\r
             {\r
                 throw new ArgumentNullException("e");\r
             }\r
@@ -194,7 +194,7 @@ namespace HandBrakeWPF.Controls.SplitButton
         /// </summary>\r
         protected void OpenButtonMenu()\r
         {\r
-            if ((0 < this.ItemSource.Count) && (null != this.contextMenu))\r
+            if ((this.ItemSource.Count < 0) && (this.contextMenu != null))\r
             {\r
                 this.contextMenu.HorizontalOffset = 0;\r
                 this.contextMenu.VerticalOffset = 0;\r
index 0e538b5e3450d9816ebc159e2edb35fdafd53ef1..b40f61071139eb61e41a0c83671bb72bad3857a7 100644 (file)
@@ -56,7 +56,6 @@ namespace HandBrakeWPF.Converters.Audio
                 List<AudioEncoder> encoders = EnumHelper<AudioEncoder>.GetEnumList().ToList();\r
                 EncodeTask task = values[1] as EncodeTask;\r
 \r
-\r
                 if (!HandBrakeEncoderHelpers.AudioEncoders.Any(a => a.ShortName.Contains("fdk")))\r
                 {\r
                     encoders.Remove(AudioEncoder.fdkaac);\r
index cad01f88aaf0922d3197e60f098448f4fcbfc834..432fdaaf7fcafac1740275ebfaaf865407520d9c 100644 (file)
@@ -68,7 +68,6 @@ namespace HandBrakeWPF.Converters.Audio
         /// <param name="value">The value that is produced by the binding target.</param><param name="targetType">The type to convert to.</param><param name="parameter">The converter parameter to use.</param><param name="culture">The culture to use in the converter.</param>
         public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
         {
-
             return value;
         }
     }
index 9edce57d49ac2d8203a4cfb1ff3ca67bba9b56f9..62012be3d78d6179faee2892858b88ba8b632452 100644 (file)
@@ -20,6 +20,9 @@ namespace HandBrakeWPF.Converters
     using HandBrakeWPF.Commands;
     using HandBrakeWPF.Services.Presets.Model;
 
+    /// <summary>
+    /// The presets menu converter.
+    /// </summary>
     public class PresetsMenuConverter : IValueConverter
     {
         /// <summary>Converts a value. </summary>
@@ -32,7 +35,7 @@ namespace HandBrakeWPF.Converters
         {
             IEnumerable<Preset> presets = value as IEnumerable<Preset>;
 
-            if (presets  ==null)
+            if (presets == null)
             {
                 return null;
             }
index ec158e751afa53dac46fcf62eb703be4d1eb5031..19969cbaa045ab2b3eb2e21dc1ca0397f30a738a 100644 (file)
@@ -39,6 +39,9 @@ namespace HandBrakeWPF.Helpers
         /// <param name="sourceOrLabelName">\r
         /// The Source or Label Name\r
         /// </param>\r
+        /// <param name="presetName">\r
+        /// The preset Name.\r
+        /// </param>\r
         /// <returns>\r
         /// The Generated FileName\r
         /// </returns>\r
@@ -96,7 +99,7 @@ namespace HandBrakeWPF.Helpers
                             .Replace(Constants.Title, dvdTitle)\r
                             .Replace(Constants.Chapters, combinedChapterTag)\r
                             .Replace(Constants.Date, DateTime.Now.Date.ToShortDateString().Replace('/', '-'))\r
-                            .Replace(Constants.Time,DateTime.Now.ToString("HH:mm"))\r
+                            .Replace(Constants.Time, DateTime.Now.ToString("HH:mm"))\r
                             .Replace(Constants.Preset, sanitisedPresetName);\r
 \r
                     if (task.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality)\r
index 70347fca16ecbb79782eb6b41813ae00b106c214..f551af10eaa8b0bdfc73276fe8f644d84baf08aa 100644 (file)
@@ -43,10 +43,28 @@ namespace HandBrakeWPF.Helpers
             HandBrakeUtils.ErrorLogged += HandBrakeUtils_ErrorLogged;
         }
 
+        /// <summary>
+        /// Subscribe the ErrorLogged event.
+        /// </summary>
+        /// <param name="sender">
+        /// The sender.
+        /// </param>
+        /// <param name="e">
+        /// The e.
+        /// </param>
         private static void HandBrakeUtils_ErrorLogged(object sender, HandBrake.ApplicationServices.Interop.EventArgs.MessageLoggedEventArgs e)
         {
         }
 
+        /// <summary>
+        ///  Subscribe the MessageLogged event.
+        /// </summary>
+        /// <param name="sender">
+        /// The sender.
+        /// </param>
+        /// <param name="e">
+        /// The e.
+        /// </param>
         private static void HandBrakeUtils_MessageLogged(object sender, HandBrake.ApplicationServices.Interop.EventArgs.MessageLoggedEventArgs e)
         {
         }
index 90e3ab0ace8388b2bb28f938ea1e0f35af427809..0604de3310c6697cee681d0c53b4246048d5560c 100644 (file)
@@ -119,6 +119,9 @@ namespace HandBrakeWPF.Helpers
         /// <param name="errorService">\r
         /// The error Service.\r
         /// </param>\r
+        /// <param name="silentRecovery">\r
+        /// The silent Recovery.\r
+        /// </param>\r
         /// <returns>\r
         /// The <see cref="bool"/>.\r
         /// </returns>\r
index 816b9ca82a08a959305672a0efc5a7733ef212e3..91a4ee1d8e099bc3a889e2fc7c7a908ee420a0b6 100644 (file)
@@ -29,12 +29,9 @@ namespace HandBrakeWPF.Helpers
         internal static TimeSpan ParseChapterTimeStart(string chapterStartRaw)
         {
             // Format: 02:35:05 and 02:35:05.2957333
-            return TimeSpan.ParseExact(chapterStartRaw,
-                                        new[]
-                                        {
-                                                    @"hh\:mm\:ss",  // Handle whole seconds
-                                                    @"hh\:mm\:ss\.FFFFFFF"  // Handle fraction seconds
-                                        }, CultureInfo.InvariantCulture);
+            return TimeSpan.ParseExact(
+                chapterStartRaw,
+                new[] { @"hh\:mm\:ss", @"hh\:mm\:ss\.FFFFFFF" }, CultureInfo.InvariantCulture);  // Handle whole seconds then Handle fraction seconds
         }
     }
 }
index b775c06b7a6b850d6a4d2e3c92d4510c5805b5b2..d5350439a96a4de7ec9736b2db8f70520f99b45c 100644 (file)
@@ -1,5 +1,5 @@
 // --------------------------------------------------------------------------------------------------------------------
-// <copyright file="AudioTrack.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="AudioBehaviourTrack.cs" company="HandBrake Project (http://handbrake.fr)">
 //   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
 // </copyright>
 // <summary>
@@ -40,7 +40,7 @@ namespace HandBrakeWPF.Model.Audio
         private double? quality;
 
         /// <summary>
-        ///   Initializes a new instance of the <see cref = "AudioTrack" /> class.
+        /// Initializes a new instance of the <see cref="AudioBehaviourTrack"/> class. 
         /// </summary>
         public AudioBehaviourTrack()
         {
@@ -55,7 +55,7 @@ namespace HandBrakeWPF.Model.Audio
         }
 
         /// <summary>
-        /// Initializes a new instance of the <see cref="AudioTrack"/> class.
+        /// Initializes a new instance of the <see cref="AudioBehaviourTrack"/> class. 
         /// Copy Constructor
         /// </summary>
         /// <param name="track">
@@ -573,24 +573,24 @@ namespace HandBrakeWPF.Model.Audio
         /// </summary>
         private void GetDefaultMixdownIfNull()
         {
-            //if (this.ScannedTrack == null)
-            //{
+            // if (this.ScannedTrack == null)
+            // {
             //    return;
-            //}
+            // }
 
-            //HBAudioEncoder aencoder = HandBrakeEncoderHelpers.GetAudioEncoder(EnumHelper<AudioEncoder>.GetShortName(this.encoder));
-            //HBMixdown currentMixdown = HandBrakeEncoderHelpers.GetMixdown(this.mixDown);
-            //HBMixdown sanitisedMixdown = HandBrakeEncoderHelpers.SanitizeMixdown(currentMixdown, aencoder, (uint)this.ScannedTrack.ChannelLayout);
-            //HBMixdown defaultMixdown = HandBrakeEncoderHelpers.GetDefaultMixdown(aencoder, (uint)this.ScannedTrack.ChannelLayout);
+            // HBAudioEncoder aencoder = HandBrakeEncoderHelpers.GetAudioEncoder(EnumHelper<AudioEncoder>.GetShortName(this.encoder));
+            // HBMixdown currentMixdown = HandBrakeEncoderHelpers.GetMixdown(this.mixDown);
+            // HBMixdown sanitisedMixdown = HandBrakeEncoderHelpers.SanitizeMixdown(currentMixdown, aencoder, (uint)this.ScannedTrack.ChannelLayout);
+            // HBMixdown defaultMixdown = HandBrakeEncoderHelpers.GetDefaultMixdown(aencoder, (uint)this.ScannedTrack.ChannelLayout);
 
-            //if (this.mixDown == null || this.mixDown == "none")
-            //{
+            // if (this.mixDown == null || this.mixDown == "none")
+            // {
             //    this.MixDown = defaultMixdown.ShortName;
-            //}
-            //else if (sanitisedMixdown != null)
-            //{
+            // }
+            // else if (sanitisedMixdown != null)
+            // {
             //    this.MixDown = sanitisedMixdown.ShortName;
-            //}
+            // }
         }
 
         #endregion
index 0203b0831e7abeeff37e385d7eff20277a4d3025..9663ae66c5eb5b4b580ea4a095f6a85c07350ae6 100644 (file)
@@ -511,6 +511,9 @@ namespace HandBrakeWPF.Services.Encode.Model
 
         #region MetaData
 
+        /// <summary>
+        /// Gets or sets the meta data.
+        /// </summary>
         public MetaData MetaData { get; set; }
         #endregion
 
index 8e21820c24296369df4adc86c26e610344ee03d5..bf5ea27d48baaee4be55e725f0dca9a6324d787a 100644 (file)
@@ -96,9 +96,12 @@ namespace HandBrakeWPF.Services.Encode.Model.Models
         }
 
         /// <summary>
+        /// Initializes a new instance of the <see cref="AudioTrack"/> class. 
         /// Create a track from a behaviour track.
         /// </summary>
-        /// <param name="track">The Behavior track</param>
+        /// <param name="track">
+        /// The Behavior track
+        /// </param>
         public AudioTrack(AudioBehaviourTrack track)
         {     
             this.drc = track.DRC;
index 5cf274ee97512763050b35c198c22a1808bf0cba..e86212a39a1ecbc2bf3d8dc0009b1c7def913c67 100644 (file)
@@ -9,16 +9,26 @@
 
 namespace HandBrakeWPF.Services.Encode.Model.Models
 {
+    /// <summary>
+    /// The meta data.
+    /// </summary>
     public class MetaData
     {
         private string albumArtist;
 
-        /// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary>
+        /// <summary>
+        /// Initializes a new instance of the <see cref="MetaData"/> class. 
+        /// </summary>
         public MetaData()
         {
         }
 
-        /// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary>
+        /// <summary>
+        /// Initializes a new instance of the <see cref="MetaData"/> class. 
+        /// </summary>
+        /// <param name="metadata">
+        /// The metadata.
+        /// </param>
         public MetaData(MetaData metadata)
         {
             if (metadata != null)
index 4cc177a3d162bb46dea1160944b70583dea4f180..fb46b932ffb4867c37c10d6010c0c6a602606bdd 100644 (file)
@@ -148,6 +148,12 @@ namespace HandBrakeWPF.Services.Presets.Interfaces
         /// <summary>\r
         /// Replace an existing preset with a modified one.\r
         /// </summary>\r
+        /// <param name="existing">\r
+        /// The existing.\r
+        /// </param>\r
+        /// <param name="replacement">\r
+        /// The replacement.\r
+        /// </param>\r
         void Replace(Preset existing, Preset replacement);\r
     }\r
 }
\ No newline at end of file
index 4ecc0c5022c0fb9f63987cc5ad5e5f5439db5c6f..04e2395ea9605cd3f06851968f0512da1cb42ffb 100644 (file)
@@ -36,17 +36,18 @@ namespace HandBrakeWPF.Services.Presets.Model
         #endregion\r
 \r
         /// <summary>\r
-        /// Initializes a new instance of the <see cref="PropertyChangedBase"/> class. \r
-        /// Creates an instance of <see cref="T:HandBrakeWPF.Utilities.PropertyChangedBase"/>.\r
+        /// Initializes a new instance of the <see cref="Preset"/> class. \r
         /// </summary>\r
         public Preset()\r
         {\r
         }\r
 \r
         /// <summary>\r
-        /// Initializes a new instance of the <see cref="PropertyChangedBase"/> class. \r
-        /// Creates an instance of <see cref="T:HandBrakeWPF.Utilities.PropertyChangedBase"/>.\r
+        /// Initializes a new instance of the <see cref="Preset"/> class. \r
         /// </summary>\r
+        /// <param name="preset">\r
+        /// The preset.\r
+        /// </param>\r
         public Preset(Preset preset)\r
         {\r
             this.Category = preset.Category;\r
index 6c4a4886436461d393037c833950dcaeee0ef297..8af0b3d0372c9ce97e4a7f4cabd863840cb64d02 100644 (file)
@@ -256,6 +256,12 @@ namespace HandBrakeWPF.Services.Presets
         /// <summary>\r
         /// Replace an existing preset with a modified one.\r
         /// </summary>\r
+        /// <param name="existing">\r
+        /// The existing.\r
+        /// </param>\r
+        /// <param name="replacement">\r
+        /// The replacement.\r
+        /// </param>\r
         public void Replace(Preset existing, Preset replacement)\r
         {\r
             this.Remove(existing);\r
@@ -521,7 +527,6 @@ namespace HandBrakeWPF.Services.Presets
                 PresetTransportContainer container = null;\r
                 using (StreamReader reader = new StreamReader(this.presetFile))\r
                 {\r
-\r
                     try\r
                     {\r
                         container = JsonConvert.DeserializeObject<PresetTransportContainer>(reader.ReadToEnd());\r
index afa167b9c27916bb441734be556378612f372ee9..e9cce2b32674411bbc2bb0785e1a403ddb10b553 100644 (file)
@@ -14,14 +14,11 @@ namespace HandBrakeWPF.Services.Queue
     using System.ComponentModel;\r
     using System.IO;\r
     using System.Linq;\r
-    using System.Runtime.InteropServices.WindowsRuntime;\r
-    using System.Windows;\r
     using System.Xml.Serialization;\r
 \r
     using HandBrake.ApplicationServices.Model;\r
 \r
     using HandBrakeWPF.Factories;\r
-    using HandBrakeWPF.Properties;\r
     using HandBrakeWPF.Services.Encode.Factories;\r
     using HandBrakeWPF.Services.Encode.Model;\r
     using HandBrakeWPF.Services.Interfaces;\r
@@ -46,25 +43,12 @@ namespace HandBrakeWPF.Services.Queue
         /// A Lock object to maintain thread safety\r
         /// </summary>\r
         private static readonly object QueueLock = new object();\r
-\r
-        /// <summary>\r
-        /// The Queue of Job objects\r
-        /// </summary>\r
+        private readonly IUserSettingService userSettingService;\r
+        private readonly IErrorService errorService;\r
         private readonly BindingList<QueueTask> queue = new BindingList<QueueTask>();\r
-\r
-        /// <summary>\r
-        /// HandBrakes Queue file with a place holder for an extra string.\r
-        /// </summary>\r
         private readonly string queueFile;\r
-\r
-        /// <summary>\r
-        /// The clear completed.\r
-        /// </summary>\r
         private bool clearCompleted;\r
 \r
-        private readonly IUserSettingService userSettingService;\r
-        private readonly IErrorService errorService;\r
-\r
         #endregion\r
 \r
         #region Constructors and Destructors\r
@@ -145,6 +129,9 @@ namespace HandBrakeWPF.Services.Queue
         /// </summary>\r
         public event EventHandler QueuePaused;\r
 \r
+        /// <summary>\r
+        /// The low diskspace detected.\r
+        /// </summary>\r
         public event EventHandler LowDiskspaceDetected;\r
 \r
         #endregion\r
@@ -247,6 +234,9 @@ namespace HandBrakeWPF.Services.Queue
         /// <summary>\r
         /// Export the Queue the standardised JSON format.\r
         /// </summary>\r
+        /// <param name="exportPath">\r
+        /// The export Path.\r
+        /// </param>\r
         public void ExportJson(string exportPath)\r
         {\r
             List<QueueTask> jobs = this.queue.Where(item => item.Status != QueueItemStatus.Completed).ToList();\r
@@ -640,6 +630,9 @@ namespace HandBrakeWPF.Services.Queue
             this.IsProcessing = false;\r
         }\r
 \r
+        /// <summary>\r
+        /// The on low diskspace detected.\r
+        /// </summary>\r
         protected virtual void OnLowDiskspaceDetected()\r
         {\r
             this.LowDiskspaceDetected?.Invoke(this, EventArgs.Empty);\r
@@ -683,6 +676,5 @@ namespace HandBrakeWPF.Services.Queue
         }\r
 \r
         #endregion\r
-\r
     }\r
 }
\ No newline at end of file
index 634d2ecac7f0c52961bf1a124bb1b179de339fc7..98634634e5e2e0fa545d32f34265184c6ff1b554 100644 (file)
@@ -1,5 +1,5 @@
 // --------------------------------------------------------------------------------------------------------------------
-// <copyright file="AppBootstrapper.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="StartupOptions.cs" company="HandBrake Project (http://handbrake.fr)">
 //   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
 // </copyright>
 // <summary>
@@ -9,8 +9,14 @@
 
 namespace HandBrakeWPF.Startup
 {
+    /// <summary>
+    /// The startup options.
+    /// </summary>
     public class StartupOptions
     {
+        /// <summary>
+        /// Gets or sets a value indicating whether auto restart queue.
+        /// </summary>
         public static bool AutoRestartQueue { get; set; }
     }
 }
index 5461605d0afc4b65c88268d34356bec43e778d12..45450f4eb5e7883622a98da01945d289f2b421c6 100644 (file)
@@ -38,7 +38,6 @@ namespace HandBrakeWPF.Utilities
             }
         }
 
-
         /// <summary>
         /// Simple way of checking if a directory is writeable.
         /// </summary>
@@ -48,7 +47,9 @@ namespace HandBrakeWPF.Utilities
         {
             try
             {
-                using (File.Create(Path.Combine(dirPath, Path.GetRandomFileName()), 1, FileOptions.DeleteOnClose)) { }
+                using (File.Create(Path.Combine(dirPath, Path.GetRandomFileName()), 1, FileOptions.DeleteOnClose))
+                {
+                }
                 return true;
             }
             catch
index 8317f4c1af53025079bc75e225a5bd37d628a2a5..7cf953adcf7924f4d5e95fa4c1531af41631bcb3 100644 (file)
@@ -1,11 +1,17 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ChapterImporterCsv.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   Handles the importing of Chapter information from CSV files
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
 
 namespace HandBrakeWPF.Utilities.Input
 {
+    using System;
+    using System.Collections.Generic;
+
     using HandBrakeWPF.Exceptions;
     using HandBrakeWPF.Properties;
 
@@ -24,8 +30,12 @@ namespace HandBrakeWPF.Utilities.Input
         /// <summary>
         /// Imports all chapter information from the given <see cref="filename"/> into the <see cref="chapterMap"/> dictionary.
         /// </summary>
-        /// <param name="filename">The full path and filename of the chapter marker file to import</param>
-        /// <param name="chapterMap">The dictionary that should be populated with parsed chapter markers</param>
+        /// <param name="filename">
+        /// The full path and filename of the chapter marker file to import
+        /// </param>
+        /// <param name="importedChapters">
+        /// The imported Chapters.
+        /// </param>
         public static void Import(string filename, ref Dictionary<int, Tuple<string, TimeSpan>> importedChapters)
         {
             using (TextFieldParser csv = new TextFieldParser(filename)
index 55b24b7a1d6f620f62c27662f04d787ca30fd1fc..f9e2acee9e6a305cb3f3db9c071470452458f2aa 100644 (file)
@@ -1,11 +1,18 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ChapterImporterTxt.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   Imports chapter markers in the ChaptersDb.org TXT format
+//   More info: http://www.chapterdb.org/docs
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
 
 namespace HandBrakeWPF.Utilities.Input
 {
+    using System;
+    using System.Collections.Generic;
+    using System.Linq;
     using System.IO;
 
     using HandBrakeWPF.Helpers;
@@ -45,12 +52,12 @@ namespace HandBrakeWPF.Utilities.Input
                         break;
 
                     // Split the values on '=' and take the left side
-                    chapterName = chapterName.Split(new []{ '=' }, 2).LastOrDefault();
+                    chapterName = chapterName.Split(new[] { '=' }, 2).LastOrDefault();
                     chapterStartRaw = chapterStartRaw.Split(new[] { '=' }, 2).LastOrDefault();
 
                     // Parse the time
-                    if(!string.IsNullOrWhiteSpace(chapterStartRaw))
-                    { 
+                    if (!string.IsNullOrWhiteSpace(chapterStartRaw))
+                    {
                         var chapterStart = TimeSpanHelper.ParseChapterTimeStart(chapterStartRaw);
 
                         // If we're past the first chapter in the file then calculate the duration for the previous chapter
index 565b49e3c0b1bc4009277cf518061993000e5d5c..39c698c36684f88afa01e3b3749ae322786c338b 100644 (file)
@@ -1,12 +1,17 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ChapterImporterXml.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   Imports chapter markers in the ChaptersDb.org XML format
+//   More info: http://www.chapterdb.org/docs
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
 
 namespace HandBrakeWPF.Utilities.Input
 {
-    using System.Globalization;
+    using System;
+    using System.Collections.Generic;
     using System.IO;
     using System.Xml;
     using System.Xml.Linq;
@@ -54,16 +59,18 @@ namespace HandBrakeWPF.Utilities.Input
                 }
 
                 var chapterStartRaw = chapter.XPathSelectElement("ChapterTimeStart")?.Value;
-                if(!string.IsNullOrWhiteSpace(chapterStartRaw))
+                if (!string.IsNullOrWhiteSpace(chapterStartRaw))
                 {
-                    //Format: 02:35:05 and 02:35:05.2957333
+                    // Format: 02:35:05 and 02:35:05.2957333
                     var chapterStart = TimeSpanHelper.ParseChapterTimeStart(chapterStartRaw);
 
                     // If we're past the first chapter in the file then calculate the duration for the previous chapter
                     if (chapterMapIdx > 1)
                     {
                         var old = chapterMap[chapterMapIdx - 1];
-                        chapterMap[chapterMapIdx-1] = new Tuple<string, TimeSpan>(old.Item1, chapterStart - prevChapterStart);
+                        chapterMap[chapterMapIdx - 1] = new Tuple<string, TimeSpan>(
+                                                            old.Item1,
+                                                            chapterStart - prevChapterStart);
                     }
 
                     prevChapterStart = chapterStart;
index ec757034b319ad224a1ccd55d1029e3464434fb2..2a18d7a4bde2e4d702c1497c9eeafc4c5eda7587 100644 (file)
@@ -340,7 +340,6 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>
         public IEnumerable<HBMixdown> Mixdowns { get; set; }
 
-
         /// <summary>
         /// Gets or sets AudioBitrates.
         /// </summary>
index 232ed35673bfc391906b5a69e0406f15f8c0dea0..9f3cd760da55ad4911312ab755362d5423b65369 100644 (file)
@@ -109,7 +109,6 @@ namespace HandBrakeWPF.ViewModels
         /// </summary>\r
         public EncodeTask Task { get; set; }\r
 \r
-\r
         /// <summary>\r
         /// Gets the panel title.\r
         /// </summary>\r
index 037bacde05a7c904f17f9496ea5f2f86b0602abe..da65e2945da47ef2373bb82cf7f10363cf56b1b1 100644 (file)
@@ -208,8 +208,10 @@ namespace HandBrakeWPF.ViewModels
             string validationErrorMessage;\r
             if (!this.ValidateImportedChapters(importedChapters, out validationErrorMessage))\r
             {\r
-                if( !string.IsNullOrEmpty(validationErrorMessage))\r
-                    throw new GeneralApplicationException(Resources.ChaptersViewModel_ValidationFailedWarning, validationErrorMessage);\r
+                if (!string.IsNullOrEmpty(validationErrorMessage))\r
+                    throw new GeneralApplicationException(\r
+                              Resources.ChaptersViewModel_ValidationFailedWarning,\r
+                              validationErrorMessage);\r
 \r
                 // The user has cancelled the import, so exit\r
                 return;\r
index 7cb50ac3709633d25f5e0e958a7bc70e66a7665e..3c5e13f821cf0971e6a5f9b1d363f28a4d0c7f74 100644 (file)
@@ -15,8 +15,6 @@ namespace HandBrakeWPF.ViewModels
 \r
     using Caliburn.Micro;\r
 \r
-    using HandBrake.ApplicationServices.Interop;\r
-    using HandBrake.ApplicationServices.Interop.HbLib;\r
     using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
 \r
     using HandBrakeWPF.Services.Interfaces;\r
@@ -267,6 +265,9 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Gets or sets the selected comb detect preset.\r
+        /// </summary>\r
         public CombDetect SelectedCombDetectPreset\r
         {\r
             get\r
@@ -295,6 +296,9 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Gets or sets the custom comb detect.\r
+        /// </summary>\r
         public string CustomCombDetect\r
         {\r
             get\r
@@ -551,6 +555,9 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// The rotation options.\r
+        /// </summary>\r
         public BindingList<int> RotationOptions => new BindingList<int> { 0, 90, 180, 270 };\r
 \r
         /// <summary>\r
@@ -638,7 +645,6 @@ namespace HandBrakeWPF.ViewModels
                 this.CustomDetelecine = preset.Task.CustomDetelecine;\r
                 this.CustomDenoise = preset.Task.CustomDenoise;\r
 \r
-\r
                 this.SelectedRotation = preset.Task.Rotation;\r
                 this.FlipVideo = preset.Task.FlipVideo;\r
             }\r
@@ -685,7 +691,6 @@ namespace HandBrakeWPF.ViewModels
 \r
             this.NotifyOfPropertyChange(() => this.FlipVideo);\r
             this.NotifyOfPropertyChange(() => this.SelectedRotation);\r
-\r
         }\r
 \r
         /// <summary>\r
index 539e239a595f14bf1b55e878b13c73d2cd872e91..17f4601238d2b6cea45aa015f7de71b303410ed2 100644 (file)
@@ -25,6 +25,12 @@ namespace HandBrakeWPF.ViewModels.Interfaces
         /// </summary>\r
         Preset SelectedPreset { set; }\r
 \r
+        /// <summary>\r
+        /// The preset select.\r
+        /// </summary>\r
+        /// <param name="tag">\r
+        /// The tag.\r
+        /// </param>\r
         void PresetSelect(object tag);\r
 \r
         /// <summary>\r
index 2af41b1de17d5ffaaa51531eb6e8b7269e7b089c..29ff92929afd5ee41f72e945a7431a17c79fb3c4 100644 (file)
@@ -19,6 +19,9 @@ namespace HandBrakeWPF.ViewModels.Interfaces
         /// <summary>
         /// Prepare the Preset window 
         /// </summary>
+        /// <param name="preset">
+        /// The preset.
+        /// </param>
         void Setup(Preset preset);
 
         /// <summary>
index 1e62880c2f10b7957b98bef8ba953374e85be8f3..63f36f4fea4de096bf8cdad6270768382bcc1a93 100644 (file)
@@ -9,6 +9,9 @@
 
 namespace HandBrakeWPF.ViewModels.Interfaces
 {
+    /// <summary>
+    /// The MetaDataViewModel interface.
+    /// </summary>
     public interface IMetaDataViewModel : ITabInterface
     {
     }
index 823d95f09a006cdda5a5450da7a370d35859e232..b1e2314126d3c21713d644bf6ea2038371465355 100644 (file)
@@ -283,7 +283,7 @@ namespace HandBrakeWPF.ViewModels
         public IStaticPreviewViewModel StaticPreviewViewModel { get; set; }\r
 \r
         /// <summary>\r
-        /// The MetaData View Model\r
+        /// Gets or sets the The MetaData View Model\r
         /// </summary>\r
         public IMetaDataViewModel MetaDataViewModel { get; set; }\r
 \r
@@ -1195,6 +1195,9 @@ namespace HandBrakeWPF.ViewModels
 \r
         #region Commands \r
 \r
+        /// <summary>\r
+        /// Gets or sets the queue command.\r
+        /// </summary>\r
         public ICommand QueueCommand { get; set; }\r
 \r
         #endregion\r
@@ -1400,7 +1403,6 @@ namespace HandBrakeWPF.ViewModels
                 return false;\r
             }\r
 \r
-\r
             // Sanity check the filename\r
             if (!string.IsNullOrEmpty(this.Destination) && FileHelper.FilePathHasInvalidChars(this.Destination))\r
             {\r
@@ -1678,7 +1680,7 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// Pass on the "When Done" Action to the queue view model. \r
         /// </summary>\r
-        /// <param name="action"></param>\r
+        /// <param name="action">action</param>\r
         public void WhenDone(string action)\r
         {\r
             this.QueueViewModel?.WhenDone(action);\r
index 2f559bb65973ce3d61ec5596d0121611140fb397..7f0fed5b629895bd3f41f9110ffdfe690bcdeffc 100644 (file)
@@ -59,6 +59,9 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>
         /// Prepare the Preset window to create a Preset Object later.
         /// </summary>
+        /// <param name="presetToEdit">
+        /// The preset To Edit.
+        /// </param>
         public void Setup(Preset presetToEdit)
         {
             this.Preset = new Preset(presetToEdit); // Clone. We will not touch the existing object.
index 7e6efb3a05ac93a73847314f959ca426a9510cf8..e0bd332d1f5a431873c1c3908ce80673234588f4 100644 (file)
@@ -17,14 +17,24 @@ namespace HandBrakeWPF.ViewModels
     using HandBrakeWPF.Services.Presets.Model;
     using HandBrakeWPF.Services.Scan.Model;
     using HandBrakeWPF.ViewModels.Interfaces;
+
+    /// <summary>
+    /// The meta data view model.
+    /// </summary>
     public class MetaDataViewModel : ViewModelBase, IMetaDataViewModel
     {
         private EncodeTask task;
         private MetaData metaData;
 
         /// <summary>
-        /// Initializes a new instance of the <see cref="ViewModelBase"/> class.
+        /// Initializes a new instance of the <see cref="MetaDataViewModel"/> class. 
         /// </summary>
+        /// <param name="windowManager">
+        /// The window Manager.
+        /// </param>
+        /// <param name="userSettingService">
+        /// The user Setting Service.
+        /// </param>
         public MetaDataViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
         {
             this.Task = new EncodeTask();
@@ -52,6 +62,9 @@ namespace HandBrakeWPF.ViewModels
             }
         }
 
+        /// <summary>
+        /// Gets or sets the meta data.
+        /// </summary>
         public MetaData MetaData
         {
             get
index b1962e48b7c0e68e1ad2c870f15b7c0dcbad927b..125939054000c15e2852d472398e2eaecd4ab325 100644 (file)
@@ -109,6 +109,9 @@ namespace HandBrakeWPF.ViewModels
         /// <param name="aboutViewModel">\r
         /// The about View Model.\r
         /// </param>\r
+        /// <param name="errorService">\r
+        /// The error Service.\r
+        /// </param>\r
         public OptionsViewModel(IUserSettingService userSettingService, IUpdateService updateService, IAboutViewModel aboutViewModel, IErrorService errorService)\r
         {\r
             this.Title = "Options";\r
index 3ad23d605b13d7082220da71b41807a303694833..eed3a1a791618a27b7baf75a9dbb9417e090b19b 100644 (file)
@@ -430,7 +430,6 @@ namespace HandBrakeWPF.ViewModels
             this.queueProcessor.JobProcessingStarted -= this.QueueProcessorJobProcessingStarted;\r
             this.queueProcessor.LowDiskspaceDetected -= this.QueueProcessor_LowDiskspaceDetected;\r
 \r
-\r
             base.OnDeactivate(close);\r
         }\r
 \r
index b08122abde8328ea869dd0f868a19f26a3e2a034..fdc2886c7d9fb6370ea2b0a71ce2ac8097ee50af 100644 (file)
@@ -558,7 +558,7 @@ namespace HandBrakeWPF.ViewModels
 \r
             // Setup the encode task as a preview encode\r
             encodeTask.IsPreviewEncode = true;\r
-            encodeTask.PreviewEncodeStartAt = this.SelectedPreviewImage +1;  \r
+            encodeTask.PreviewEncodeStartAt = this.SelectedPreviewImage + 1;  \r
             encodeTask.PreviewEncodeDuration = this.Duration;\r
             QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create(), this.ScannedSource.ScanPath);\r
             ThreadPool.QueueUserWorkItem(this.CreatePreview, task);\r
@@ -591,7 +591,7 @@ namespace HandBrakeWPF.ViewModels
                             // Attempt to find VLC if it doesn't exist in the default set location.\r
                             string vlcPath;\r
 \r
-                            if (8 == IntPtr.Size || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))\r
+                            if (IntPtr.Size == 8 || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))\r
                                 vlcPath = Environment.GetEnvironmentVariable("ProgramFiles(x86)");\r
                             else\r
                                 vlcPath = Environment.GetEnvironmentVariable("ProgramFiles");\r
index 4f75359f43b78e82d77bff6891e9f1008f2d5a22..55a679ea75a7e4011d3cdd967a8ec7c8c644c927 100644 (file)
@@ -931,7 +931,6 @@ namespace HandBrakeWPF.ViewModels
 \r
             this.VideoBitrate = preset.Task.VideoEncodeRateType == VideoEncodeRateType.AverageBitrate ? preset.Task.VideoBitrate : null;\r
          \r
-\r
             this.NotifyOfPropertyChange(() => this.Task);\r
 \r
             if (preset.Task != null)\r
@@ -1336,7 +1335,6 @@ namespace HandBrakeWPF.ViewModels
                                          || this.SelectedVideoEncoder == VideoEncoder.QuickSync\r
                                          || this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265;\r
      \r
-\r
             // Refresh Display\r
             this.NotifyOfPropertyChange(() => this.Rfqp);\r
             this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);\r
index 53381b74928f225d4754a8b0dc95717d184ad271..636705b65e301970dd0a932100ad18dbc8d1f060 100644 (file)
@@ -53,6 +53,15 @@ namespace HandBrakeWPF.Views
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Add to Queue button context menu handling.\r
+        /// </summary>\r
+        /// <param name="sender">\r
+        /// The sender.\r
+        /// </param>\r
+        /// <param name="e">\r
+        /// The e.\r
+        /// </param>\r
         private void AddToQueue_PreviewMouseDown(object sender, MouseButtonEventArgs e)\r
         {\r
             // If we've clicked the dropdown part of the button, display the context menu below the button.\r
index 467f6b8a815cb551e1624da9ece3e067090cb8de..608a547cbc32917d9f084ee80a21a18bc5504a72 100644 (file)
@@ -1,28 +1,27 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="MetaDataView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   Interaction logic for MetaDataView.xaml
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
 
 namespace HandBrakeWPF.Views
 {
+    using System.Windows.Controls;
+
     /// <summary>
     /// Interaction logic for MetaDataView.xaml
     /// </summary>
     public partial class MetaDataView : UserControl
     {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="MetaDataView"/> class.
+        /// </summary>
         public MetaDataView()
         {
-            InitializeComponent();
+            this.InitializeComponent();
         }
     }
 }
index 0dc5564f917b26e901b7e01881dee15ea28ad051..ee7ed6fae71621e00d1bccf30a9a808e997a4b5c 100644 (file)
             <BooleanProperty Name="Enabled">False</BooleanProperty>\r
           </RuleSettings>\r
         </Rule>\r
+        <Rule Name="PropertySummaryDocumentationMustMatchAccessors">\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="ElementMustNotBeOnSingleLine">\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="FieldNamesMustNotContainUnderscore">\r
+          <RuleSettings>\r
+            <BooleanProperty Name="Enabled">False</BooleanProperty>\r
+          </RuleSettings>\r
+        </Rule>\r
+        <Rule Name="StaticReadonlyFieldsMustBeginWithUpperCaseLetter">\r
+          <RuleSettings>\r
+            <BooleanProperty Name="Enabled">False</BooleanProperty>\r
+          </RuleSettings>\r
+        </Rule>\r
       </Rules>\r
       <AnalyzerSettings />\r
     </Analyzer>\r