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.
}
}
- // 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);
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
// --------------------------------------------------------------------------------------------------------------------
-// <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>
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;
mvm.PresetSelect(this.preset);
}
+ /// <summary>
+ /// The can execute changed.
+ /// </summary>
public event EventHandler CanExecuteChanged;
}
}
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
/// </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
/// </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
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
/// <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;
}
}
using HandBrakeWPF.Commands;
using HandBrakeWPF.Services.Presets.Model;
+ /// <summary>
+ /// The presets menu converter.
+ /// </summary>
public class PresetsMenuConverter : IValueConverter
{
/// <summary>Converts a value. </summary>
{
IEnumerable<Preset> presets = value as IEnumerable<Preset>;
- if (presets ==null)
+ if (presets == null)
{
return null;
}
/// <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
.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
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)
{
}
/// <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
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
}
}
}
// --------------------------------------------------------------------------------------------------------------------
-// <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>
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()
{
}
/// <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">
/// </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
#region MetaData
+ /// <summary>
+ /// Gets or sets the meta data.
+ /// </summary>
public MetaData MetaData { get; set; }
#endregion
}
/// <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;
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)
/// <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
#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
/// <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
PresetTransportContainer container = null;\r
using (StreamReader reader = new StreamReader(this.presetFile))\r
{\r
-\r
try\r
{\r
container = JsonConvert.DeserializeObject<PresetTransportContainer>(reader.ReadToEnd());\r
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
/// 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
/// </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
/// <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
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
}\r
\r
#endregion\r
-\r
}\r
}
\ No newline at end of file
// --------------------------------------------------------------------------------------------------------------------
-// <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>
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; }
}
}
}
}
-
/// <summary>
/// Simple way of checking if a directory is writeable.
/// </summary>
{
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
-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;
/// <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)
-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;
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
-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;
}
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;
/// </summary>
public IEnumerable<HBMixdown> Mixdowns { get; set; }
-
/// <summary>
/// Gets or sets AudioBitrates.
/// </summary>
/// </summary>\r
public EncodeTask Task { get; set; }\r
\r
-\r
/// <summary>\r
/// Gets the panel title.\r
/// </summary>\r
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
\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
}\r
}\r
\r
+ /// <summary>\r
+ /// Gets or sets the selected comb detect preset.\r
+ /// </summary>\r
public CombDetect SelectedCombDetectPreset\r
{\r
get\r
}\r
}\r
\r
+ /// <summary>\r
+ /// Gets or sets the custom comb detect.\r
+ /// </summary>\r
public string CustomCombDetect\r
{\r
get\r
}\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
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
\r
this.NotifyOfPropertyChange(() => this.FlipVideo);\r
this.NotifyOfPropertyChange(() => this.SelectedRotation);\r
-\r
}\r
\r
/// <summary>\r
/// </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
/// <summary>
/// Prepare the Preset window
/// </summary>
+ /// <param name="preset">
+ /// The preset.
+ /// </param>
void Setup(Preset preset);
/// <summary>
namespace HandBrakeWPF.ViewModels.Interfaces
{
+ /// <summary>
+ /// The MetaDataViewModel interface.
+ /// </summary>
public interface IMetaDataViewModel : ITabInterface
{
}
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
\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
return false;\r
}\r
\r
-\r
// Sanity check the filename\r
if (!string.IsNullOrEmpty(this.Destination) && FileHelper.FilePathHasInvalidChars(this.Destination))\r
{\r
/// <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
/// <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.
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();
}
}
+ /// <summary>
+ /// Gets or sets the meta data.
+ /// </summary>
public MetaData MetaData
{
get
/// <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
this.queueProcessor.JobProcessingStarted -= this.QueueProcessorJobProcessingStarted;\r
this.queueProcessor.LowDiskspaceDetected -= this.QueueProcessor_LowDiskspaceDetected;\r
\r
-\r
base.OnDeactivate(close);\r
}\r
\r
\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
// 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
\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
|| 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
}\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
-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();
}
}
}
<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