diff options
Diffstat (limited to 'win/CS/HandBrakeWPF')
39 files changed, 245 insertions, 118 deletions
diff --git a/win/CS/HandBrakeWPF/Commands/InputBindingTrigger.cs b/win/CS/HandBrakeWPF/Commands/InputBindingTrigger.cs index bed67aed8..9b1ed197c 100644 --- a/win/CS/HandBrakeWPF/Commands/InputBindingTrigger.cs +++ b/win/CS/HandBrakeWPF/Commands/InputBindingTrigger.cs @@ -94,7 +94,7 @@ namespace HandBrakeWPF.Commands return frameworkElement as Window;
var parent = frameworkElement.Parent as FrameworkElement;
- Debug.Assert(parent != null);
+ Debug.Assert(parent != null, "Null Parent");
return GetWindow(parent);
}
diff --git a/win/CS/HandBrakeWPF/Commands/PresetMenuSelectCommand.cs b/win/CS/HandBrakeWPF/Commands/PresetMenuSelectCommand.cs index ec64c2820..25a8e7404 100644 --- a/win/CS/HandBrakeWPF/Commands/PresetMenuSelectCommand.cs +++ b/win/CS/HandBrakeWPF/Commands/PresetMenuSelectCommand.cs @@ -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; } } diff --git a/win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs b/win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs index eb8b5df0a..ce7a57bb9 100644 --- a/win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs +++ b/win/CS/HandBrakeWPF/Controls/SplitButton/SplitMenuButton.cs @@ -136,7 +136,7 @@ namespace HandBrakeWPF.Controls.SplitButton this.logicalChild = current;
current = LogicalTreeHelper.GetParent(current);
}
- while (null != current);
+ while (current != null);
this.contextMenu.IsOpen = false;
this.AddLogicalChild(this.logicalChild);
@@ -174,7 +174,7 @@ namespace HandBrakeWPF.Controls.SplitButton /// </param>
protected override void OnKeyDown(KeyEventArgs e)
{
- if (null == e)
+ if (e == null)
{
throw new ArgumentNullException("e");
}
@@ -194,7 +194,7 @@ namespace HandBrakeWPF.Controls.SplitButton /// </summary>
protected void OpenButtonMenu()
{
- if ((0 < this.ItemSource.Count) && (null != this.contextMenu))
+ if ((this.ItemSource.Count < 0) && (this.contextMenu != null))
{
this.contextMenu.HorizontalOffset = 0;
this.contextMenu.VerticalOffset = 0;
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs index 0e538b5e3..b40f61071 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioEncoderConverter.cs @@ -56,7 +56,6 @@ namespace HandBrakeWPF.Converters.Audio List<AudioEncoder> encoders = EnumHelper<AudioEncoder>.GetEnumList().ToList();
EncodeTask task = values[1] as EncodeTask;
-
if (!HandBrakeEncoderHelpers.AudioEncoders.Any(a => a.ShortName.Contains("fdk")))
{
encoders.Remove(AudioEncoder.fdkaac);
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioMixdownListConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioMixdownListConverter.cs index cad01f88a..432fdaaf7 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioMixdownListConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioMixdownListConverter.cs @@ -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; } } diff --git a/win/CS/HandBrakeWPF/Converters/PresetsMenuConverter.cs b/win/CS/HandBrakeWPF/Converters/PresetsMenuConverter.cs index 9edce57d4..62012be3d 100644 --- a/win/CS/HandBrakeWPF/Converters/PresetsMenuConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/PresetsMenuConverter.cs @@ -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; } diff --git a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs index ec158e751..19969cbaa 100644 --- a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs @@ -39,6 +39,9 @@ namespace HandBrakeWPF.Helpers /// <param name="sourceOrLabelName">
/// The Source or Label Name
/// </param>
+ /// <param name="presetName">
+ /// The preset Name.
+ /// </param>
/// <returns>
/// The Generated FileName
/// </returns>
@@ -96,7 +99,7 @@ namespace HandBrakeWPF.Helpers .Replace(Constants.Title, dvdTitle)
.Replace(Constants.Chapters, combinedChapterTag)
.Replace(Constants.Date, DateTime.Now.Date.ToShortDateString().Replace('/', '-'))
- .Replace(Constants.Time,DateTime.Now.ToString("HH:mm"))
+ .Replace(Constants.Time, DateTime.Now.ToString("HH:mm"))
.Replace(Constants.Preset, sanitisedPresetName);
if (task.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality)
diff --git a/win/CS/HandBrakeWPF/Helpers/LogManager.cs b/win/CS/HandBrakeWPF/Helpers/LogManager.cs index 70347fca1..f551af10e 100644 --- a/win/CS/HandBrakeWPF/Helpers/LogManager.cs +++ b/win/CS/HandBrakeWPF/Helpers/LogManager.cs @@ -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) { } diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs index 90e3ab0ac..0604de331 100644 --- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs @@ -119,6 +119,9 @@ namespace HandBrakeWPF.Helpers /// <param name="errorService">
/// The error Service.
/// </param>
+ /// <param name="silentRecovery">
+ /// The silent Recovery.
+ /// </param>
/// <returns>
/// The <see cref="bool"/>.
/// </returns>
diff --git a/win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs b/win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs index 816b9ca82..91a4ee1d8 100644 --- a/win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs @@ -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 } } } diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs index b775c06b7..d5350439a 100644 --- a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs +++ b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs @@ -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 diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs index 0203b0831..9663ae66c 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs @@ -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 diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs index 8e21820c2..bf5ea27d4 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/AudioTrack.cs @@ -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; diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/MetaData.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/MetaData.cs index 5cf274ee9..e86212a39 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Model/Models/MetaData.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Model/Models/MetaData.cs @@ -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) diff --git a/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs index 4cc177a3d..fb46b932f 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Interfaces/IPresetService.cs @@ -148,6 +148,12 @@ namespace HandBrakeWPF.Services.Presets.Interfaces /// <summary>
/// Replace an existing preset with a modified one.
/// </summary>
+ /// <param name="existing">
+ /// The existing.
+ /// </param>
+ /// <param name="replacement">
+ /// The replacement.
+ /// </param>
void Replace(Preset existing, Preset replacement);
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs index 4ecc0c502..04e2395ea 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Model/Preset.cs @@ -36,17 +36,18 @@ namespace HandBrakeWPF.Services.Presets.Model #endregion
/// <summary>
- /// Initializes a new instance of the <see cref="PropertyChangedBase"/> class.
- /// Creates an instance of <see cref="T:HandBrakeWPF.Utilities.PropertyChangedBase"/>.
+ /// Initializes a new instance of the <see cref="Preset"/> class.
/// </summary>
public Preset()
{
}
/// <summary>
- /// Initializes a new instance of the <see cref="PropertyChangedBase"/> class.
- /// Creates an instance of <see cref="T:HandBrakeWPF.Utilities.PropertyChangedBase"/>.
+ /// Initializes a new instance of the <see cref="Preset"/> class.
/// </summary>
+ /// <param name="preset">
+ /// The preset.
+ /// </param>
public Preset(Preset preset)
{
this.Category = preset.Category;
diff --git a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs index 6c4a48864..8af0b3d03 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/PresetService.cs @@ -256,6 +256,12 @@ namespace HandBrakeWPF.Services.Presets /// <summary>
/// Replace an existing preset with a modified one.
/// </summary>
+ /// <param name="existing">
+ /// The existing.
+ /// </param>
+ /// <param name="replacement">
+ /// The replacement.
+ /// </param>
public void Replace(Preset existing, Preset replacement)
{
this.Remove(existing);
@@ -521,7 +527,6 @@ namespace HandBrakeWPF.Services.Presets PresetTransportContainer container = null;
using (StreamReader reader = new StreamReader(this.presetFile))
{
-
try
{
container = JsonConvert.DeserializeObject<PresetTransportContainer>(reader.ReadToEnd());
diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs index afa167b9c..e9cce2b32 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs @@ -14,14 +14,11 @@ namespace HandBrakeWPF.Services.Queue using System.ComponentModel;
using System.IO;
using System.Linq;
- using System.Runtime.InteropServices.WindowsRuntime;
- using System.Windows;
using System.Xml.Serialization;
using HandBrake.ApplicationServices.Model;
using HandBrakeWPF.Factories;
- using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Encode.Factories;
using HandBrakeWPF.Services.Encode.Model;
using HandBrakeWPF.Services.Interfaces;
@@ -46,25 +43,12 @@ namespace HandBrakeWPF.Services.Queue /// A Lock object to maintain thread safety
/// </summary>
private static readonly object QueueLock = new object();
-
- /// <summary>
- /// The Queue of Job objects
- /// </summary>
+ private readonly IUserSettingService userSettingService;
+ private readonly IErrorService errorService;
private readonly BindingList<QueueTask> queue = new BindingList<QueueTask>();
-
- /// <summary>
- /// HandBrakes Queue file with a place holder for an extra string.
- /// </summary>
private readonly string queueFile;
-
- /// <summary>
- /// The clear completed.
- /// </summary>
private bool clearCompleted;
- private readonly IUserSettingService userSettingService;
- private readonly IErrorService errorService;
-
#endregion
#region Constructors and Destructors
@@ -145,6 +129,9 @@ namespace HandBrakeWPF.Services.Queue /// </summary>
public event EventHandler QueuePaused;
+ /// <summary>
+ /// The low diskspace detected.
+ /// </summary>
public event EventHandler LowDiskspaceDetected;
#endregion
@@ -247,6 +234,9 @@ namespace HandBrakeWPF.Services.Queue /// <summary>
/// Export the Queue the standardised JSON format.
/// </summary>
+ /// <param name="exportPath">
+ /// The export Path.
+ /// </param>
public void ExportJson(string exportPath)
{
List<QueueTask> jobs = this.queue.Where(item => item.Status != QueueItemStatus.Completed).ToList();
@@ -640,6 +630,9 @@ namespace HandBrakeWPF.Services.Queue this.IsProcessing = false;
}
+ /// <summary>
+ /// The on low diskspace detected.
+ /// </summary>
protected virtual void OnLowDiskspaceDetected()
{
this.LowDiskspaceDetected?.Invoke(this, EventArgs.Empty);
@@ -683,6 +676,5 @@ namespace HandBrakeWPF.Services.Queue }
#endregion
-
}
}
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Startup/StartupOptions.cs b/win/CS/HandBrakeWPF/Startup/StartupOptions.cs index 634d2ecac..98634634e 100644 --- a/win/CS/HandBrakeWPF/Startup/StartupOptions.cs +++ b/win/CS/HandBrakeWPF/Startup/StartupOptions.cs @@ -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; } } } diff --git a/win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs b/win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs index 5461605d0..45450f4eb 100644 --- a/win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs +++ b/win/CS/HandBrakeWPF/Utilities/DirectoryUtilities.cs @@ -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 diff --git a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs index 8317f4c1a..7cf953adc 100644 --- a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs +++ b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterCsv.cs @@ -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) diff --git a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs index 55b24b7a1..f9e2acee9 100644 --- a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs +++ b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterTxt.cs @@ -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 diff --git a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterXml.cs b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterXml.cs index 565b49e3c..39c698c36 100644 --- a/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterXml.cs +++ b/win/CS/HandBrakeWPF/Utilities/Input/ChapterImporterXml.cs @@ -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; diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs index ec757034b..2a18d7a4b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs @@ -340,7 +340,6 @@ namespace HandBrakeWPF.ViewModels /// </summary> public IEnumerable<HBMixdown> Mixdowns { get; set; } - /// <summary> /// Gets or sets AudioBitrates. /// </summary> diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs index 232ed3567..9f3cd760d 100644 --- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs @@ -109,7 +109,6 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public EncodeTask Task { get; set; }
-
/// <summary>
/// Gets the panel title.
/// </summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs index 037bacde0..da65e2945 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs @@ -208,8 +208,10 @@ namespace HandBrakeWPF.ViewModels string validationErrorMessage;
if (!this.ValidateImportedChapters(importedChapters, out validationErrorMessage))
{
- if( !string.IsNullOrEmpty(validationErrorMessage))
- throw new GeneralApplicationException(Resources.ChaptersViewModel_ValidationFailedWarning, validationErrorMessage);
+ if (!string.IsNullOrEmpty(validationErrorMessage))
+ throw new GeneralApplicationException(
+ Resources.ChaptersViewModel_ValidationFailedWarning,
+ validationErrorMessage);
// The user has cancelled the import, so exit
return;
diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs index 7cb50ac37..3c5e13f82 100644 --- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs @@ -15,8 +15,6 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro;
- using HandBrake.ApplicationServices.Interop;
- using HandBrake.ApplicationServices.Interop.HbLib;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
using HandBrakeWPF.Services.Interfaces;
@@ -267,6 +265,9 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets or sets the selected comb detect preset.
+ /// </summary>
public CombDetect SelectedCombDetectPreset
{
get
@@ -295,6 +296,9 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// Gets or sets the custom comb detect.
+ /// </summary>
public string CustomCombDetect
{
get
@@ -551,6 +555,9 @@ namespace HandBrakeWPF.ViewModels }
}
+ /// <summary>
+ /// The rotation options.
+ /// </summary>
public BindingList<int> RotationOptions => new BindingList<int> { 0, 90, 180, 270 };
/// <summary>
@@ -638,7 +645,6 @@ namespace HandBrakeWPF.ViewModels this.CustomDetelecine = preset.Task.CustomDetelecine;
this.CustomDenoise = preset.Task.CustomDenoise;
-
this.SelectedRotation = preset.Task.Rotation;
this.FlipVideo = preset.Task.FlipVideo;
}
@@ -685,7 +691,6 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.FlipVideo);
this.NotifyOfPropertyChange(() => this.SelectedRotation);
-
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs index 539e239a5..17f460123 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMainViewModel.cs @@ -25,6 +25,12 @@ namespace HandBrakeWPF.ViewModels.Interfaces /// </summary>
Preset SelectedPreset { set; }
+ /// <summary>
+ /// The preset select.
+ /// </summary>
+ /// <param name="tag">
+ /// The tag.
+ /// </param>
void PresetSelect(object tag);
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IManagePresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IManagePresetViewModel.cs index 2af41b1de..29ff92929 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IManagePresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IManagePresetViewModel.cs @@ -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> diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMetaDataViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMetaDataViewModel.cs index 1e62880c2..63f36f4fe 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMetaDataViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IMetaDataViewModel.cs @@ -9,6 +9,9 @@ namespace HandBrakeWPF.ViewModels.Interfaces { + /// <summary> + /// The MetaDataViewModel interface. + /// </summary> public interface IMetaDataViewModel : ITabInterface { } diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 823d95f09..b1e231412 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -283,7 +283,7 @@ namespace HandBrakeWPF.ViewModels public IStaticPreviewViewModel StaticPreviewViewModel { get; set; }
/// <summary>
- /// The MetaData View Model
+ /// Gets or sets the The MetaData View Model
/// </summary>
public IMetaDataViewModel MetaDataViewModel { get; set; }
@@ -1195,6 +1195,9 @@ namespace HandBrakeWPF.ViewModels #region Commands
+ /// <summary>
+ /// Gets or sets the queue command.
+ /// </summary>
public ICommand QueueCommand { get; set; }
#endregion
@@ -1400,7 +1403,6 @@ namespace HandBrakeWPF.ViewModels return false;
}
-
// Sanity check the filename
if (!string.IsNullOrEmpty(this.Destination) && FileHelper.FilePathHasInvalidChars(this.Destination))
{
@@ -1678,7 +1680,7 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Pass on the "When Done" Action to the queue view model.
/// </summary>
- /// <param name="action"></param>
+ /// <param name="action">action</param>
public void WhenDone(string action)
{
this.QueueViewModel?.WhenDone(action);
diff --git a/win/CS/HandBrakeWPF/ViewModels/ManagePresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ManagePresetViewModel.cs index 2f559bb65..7f0fed5b6 100644 --- a/win/CS/HandBrakeWPF/ViewModels/ManagePresetViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/ManagePresetViewModel.cs @@ -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. diff --git a/win/CS/HandBrakeWPF/ViewModels/MetaDataViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MetaDataViewModel.cs index 7e6efb3a0..e0bd332d1 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MetaDataViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MetaDataViewModel.cs @@ -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 diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index b1962e48b..125939054 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -109,6 +109,9 @@ namespace HandBrakeWPF.ViewModels /// <param name="aboutViewModel">
/// The about View Model.
/// </param>
+ /// <param name="errorService">
+ /// The error Service.
+ /// </param>
public OptionsViewModel(IUserSettingService userSettingService, IUpdateService updateService, IAboutViewModel aboutViewModel, IErrorService errorService)
{
this.Title = "Options";
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 3ad23d605..eed3a1a79 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -430,7 +430,6 @@ namespace HandBrakeWPF.ViewModels this.queueProcessor.JobProcessingStarted -= this.QueueProcessorJobProcessingStarted;
this.queueProcessor.LowDiskspaceDetected -= this.QueueProcessor_LowDiskspaceDetected;
-
base.OnDeactivate(close);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs index b08122abd..fdc2886c7 100644 --- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs @@ -558,7 +558,7 @@ namespace HandBrakeWPF.ViewModels // Setup the encode task as a preview encode
encodeTask.IsPreviewEncode = true;
- encodeTask.PreviewEncodeStartAt = this.SelectedPreviewImage +1;
+ encodeTask.PreviewEncodeStartAt = this.SelectedPreviewImage + 1;
encodeTask.PreviewEncodeDuration = this.Duration;
QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create(), this.ScannedSource.ScanPath);
ThreadPool.QueueUserWorkItem(this.CreatePreview, task);
@@ -591,7 +591,7 @@ namespace HandBrakeWPF.ViewModels // Attempt to find VLC if it doesn't exist in the default set location.
string vlcPath;
- if (8 == IntPtr.Size || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
+ if (IntPtr.Size == 8 || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
vlcPath = Environment.GetEnvironmentVariable("ProgramFiles(x86)");
else
vlcPath = Environment.GetEnvironmentVariable("ProgramFiles");
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs index 4f75359f4..55a679ea7 100644 --- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs @@ -931,7 +931,6 @@ namespace HandBrakeWPF.ViewModels this.VideoBitrate = preset.Task.VideoEncodeRateType == VideoEncodeRateType.AverageBitrate ? preset.Task.VideoBitrate : null;
-
this.NotifyOfPropertyChange(() => this.Task);
if (preset.Task != null)
@@ -1336,7 +1335,6 @@ namespace HandBrakeWPF.ViewModels || this.SelectedVideoEncoder == VideoEncoder.QuickSync
|| this.SelectedVideoEncoder == VideoEncoder.QuickSyncH265;
-
// Refresh Display
this.NotifyOfPropertyChange(() => this.Rfqp);
this.NotifyOfPropertyChange(() => this.ShowAdvancedTab);
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs index 53381b749..636705b65 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml.cs @@ -53,6 +53,15 @@ namespace HandBrakeWPF.Views }
}
+ /// <summary>
+ /// Add to Queue button context menu handling.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
private void AddToQueue_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
// If we've clicked the dropdown part of the button, display the context menu below the button.
diff --git a/win/CS/HandBrakeWPF/Views/MetaDataView.xaml.cs b/win/CS/HandBrakeWPF/Views/MetaDataView.xaml.cs index 467f6b8a8..608a547cb 100644 --- a/win/CS/HandBrakeWPF/Views/MetaDataView.xaml.cs +++ b/win/CS/HandBrakeWPF/Views/MetaDataView.xaml.cs @@ -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(); } } } |