summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/Converters/Queue/PictureSettingsDescConveter.cs98
-rw-r--r--win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs2
-rw-r--r--win/CS/HandBrakeWPF/Exceptions/GeneralApplicationException.cs6
-rw-r--r--win/CS/HandBrakeWPF/HandBrakeWPF.csproj2
-rw-r--r--win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs2
-rw-r--r--win/CS/HandBrakeWPF/Helpers/MP4Helper.cs49
-rw-r--r--win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs23
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs54
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx18
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs91
-rw-r--r--win/CS/HandBrakeWPF/Services/Interfaces/IUserSettingService.cs11
-rw-r--r--win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueProcessor.cs3
-rw-r--r--win/CS/HandBrakeWPF/Services/UserSettingService.cs24
-rw-r--r--win/CS/HandBrakeWPF/Utilities/Interfaces/INotifyPropertyChangedEx.cs2
-rw-r--r--win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs13
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml4
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml4
20 files changed, 286 insertions, 130 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/Queue/PictureSettingsDescConveter.cs b/win/CS/HandBrakeWPF/Converters/Queue/PictureSettingsDescConveter.cs
new file mode 100644
index 000000000..34afc9784
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Converters/Queue/PictureSettingsDescConveter.cs
@@ -0,0 +1,98 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="PictureSettingsDescConveter.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>
+// Defines the PictureSettingsDescConveter type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Converters.Queue
+{
+ using System.Globalization;
+ using System.Windows.Data;
+ using System;
+
+ using HandBrake.ApplicationServices.Interop.Model.Encoding;
+
+ using HandBrakeWPF.Services.Encode.Model;
+
+ /// <summary>
+ /// The picture settings desc conveter.
+ /// </summary>
+ public class PictureSettingsDescConveter : IValueConverter
+ {
+ /// <summary>
+ /// Provides a textual description of the picture settings of an encode task.
+ /// </summary>
+ /// <param name="value">
+ /// The value.
+ /// </param>
+ /// <param name="targetType">
+ /// The target type.
+ /// </param>
+ /// <param name="parameter">
+ /// The parameter.
+ /// </param>
+ /// <param name="culture">
+ /// The culture.
+ /// </param>
+ /// <returns>
+ /// The <see cref="object"/>.
+ /// </returns>
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ EncodeTask task = value as EncodeTask;
+ if (task != null)
+ {
+ string resolution = string.Empty;
+ switch (task.Anamorphic)
+ {
+ case Anamorphic.Strict:
+ resolution = "Anamorphic: Strict";
+ break;
+ case Anamorphic.Loose:
+ resolution = "Anamorphic: Loose, Width: " + task.Width;
+ break;
+ case Anamorphic.Custom:
+ resolution = "Anamorphic: Custom, Resolution: " + task.Width + "x" + task.Height;
+ break;
+ case Anamorphic.None:
+ resolution = "Resolution: " + task.Width + "x" + task.Height;
+ break;
+ }
+
+ return resolution + Environment.NewLine + "Crop Top: " + task.Cropping.Top + ", Botton: " + task.Cropping.Bottom + ", Left: "
+ + task.Cropping.Left + ", Right: " + task.Cropping.Right;
+ }
+
+ return string.Empty;
+ }
+
+ /// <summary>
+ /// The convert back.
+ /// </summary>
+ /// <param name="value">
+ /// The value.
+ /// </param>
+ /// <param name="targetType">
+ /// The target type.
+ /// </param>
+ /// <param name="parameter">
+ /// The parameter.
+ /// </param>
+ /// <param name="culture">
+ /// The culture.
+ /// </param>
+ /// <returns>
+ /// The <see cref="object"/>.
+ /// </returns>
+ /// <exception cref="NotImplementedException">
+ /// Not Used
+ /// </exception>
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs b/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs
index 4392c162b..f882728e7 100644
--- a/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/QueueStatusToVisibilityConverter.cs
@@ -14,8 +14,6 @@ namespace HandBrakeWPF.Converters
using System.Windows.Data;
using System;
- using HandBrake.ApplicationServices.Model;
-
using HandBrakeWPF.Services.Queue.Model;
/// <summary>
diff --git a/win/CS/HandBrakeWPF/Exceptions/GeneralApplicationException.cs b/win/CS/HandBrakeWPF/Exceptions/GeneralApplicationException.cs
index cbbcd4058..e54732517 100644
--- a/win/CS/HandBrakeWPF/Exceptions/GeneralApplicationException.cs
+++ b/win/CS/HandBrakeWPF/Exceptions/GeneralApplicationException.cs
@@ -44,8 +44,10 @@ namespace HandBrakeWPF.Exceptions
/// <param name="solution">
/// The solution.
/// </param>
- public GeneralApplicationException(string error, string solution) : this(error, solution, null)
- {}
+ public GeneralApplicationException(string error, string solution)
+ : this(error, solution, null)
+ {
+ }
/// <summary>
/// Gets or sets FailureReason.
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
index 16c16d777..7504dfe21 100644
--- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
+++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
@@ -144,6 +144,7 @@
<Compile Include="Converters\Audio\AudioBehaviourConverter.cs" />
<Compile Include="Converters\EnumToDescConverter.cs" />
<Compile Include="Converters\Filters\DenoisePresetConverter.cs" />
+ <Compile Include="Converters\Queue\PictureSettingsDescConveter.cs" />
<Compile Include="Converters\Subtitles\SubtitleBurnInBehaviourConverter.cs" />
<Compile Include="Converters\Subtitles\SubtitleBehaviourConverter.cs" />
<Compile Include="Converters\Video\VideoOptionsTooltipConverter.cs" />
@@ -153,6 +154,7 @@
<Compile Include="EventArgs\SettingChangedEventArgs.cs" />
<Compile Include="Exceptions\GeneralApplicationException.cs" />
<Compile Include="Extensions\StringExtensions.cs" />
+ <Compile Include="Helpers\MP4Helper.cs" />
<Compile Include="Helpers\TimeSpanHelper.cs" />
<Compile Include="Helpers\Validate.cs" />
<Compile Include="Model\Audio\AudioTrackDefaultsMode.cs" />
diff --git a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
index 18f4a6392..a0fdbb0dc 100644
--- a/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/AutoNameHelper.cs
@@ -116,7 +116,7 @@ namespace HandBrakeWPF.Helpers
switch (userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v))
{
case 0: // Automatic
- destinationFilename += task.IncludeChapterMarkers || task.RequiresM4v ? ".m4v" : ".mp4";
+ destinationFilename += task.IncludeChapterMarkers || MP4Helper.RequiresM4v(task) ? ".m4v" : ".mp4";
break;
case 1: // Always MP4
destinationFilename += ".mp4";
diff --git a/win/CS/HandBrakeWPF/Helpers/MP4Helper.cs b/win/CS/HandBrakeWPF/Helpers/MP4Helper.cs
new file mode 100644
index 000000000..78e3b5ee2
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Helpers/MP4Helper.cs
@@ -0,0 +1,49 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="MP4Helper.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>
+// Defines the MP4Helper type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Helpers
+{
+ using System.Linq;
+
+ using HandBrakeWPF.Services.Encode.Model;
+ using HandBrakeWPF.Services.Encode.Model.Models;
+
+ /// <summary>
+ /// The MP4 Format helper class
+ /// </summary>
+ public class MP4Helper
+ {
+ /// <summary>
+ /// Gets a value indicating whether M4v extension is required.
+ /// </summary>
+ /// <param name="task">
+ /// The task.
+ /// </param>
+ /// <returns>
+ /// The <see cref="bool"/> to indicate if this task requires m4v extension
+ /// </returns>
+ public static bool RequiresM4v(EncodeTask task)
+ {
+ if (task.OutputFormat == OutputFormat.Mp4)
+ {
+ bool audio =
+ task.AudioTracks.Any(
+ item =>
+ item.Encoder == AudioEncoder.Ac3Passthrough || item.Encoder == AudioEncoder.Ac3
+ || item.Encoder == AudioEncoder.DtsPassthrough || item.Encoder == AudioEncoder.Passthrough);
+
+ bool subtitles = task.SubtitleTracks.Any(track => track.SubtitleType != SubtitleType.VobSub);
+
+ return audio || subtitles;
+ }
+
+ return false;
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs b/win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs
index 94d7629b9..816b9ca82 100644
--- a/win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/TimeSpanHelper.cs
@@ -1,12 +1,16 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="TimeSpanHelper.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>
+// Helper functions for handling <see cref="TimeSpan" /> structures
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Helpers
{
using System.Globalization;
+ using System;
/// <summary>
/// Helper functions for handling <see cref="TimeSpan"/> structures
@@ -16,10 +20,15 @@ namespace HandBrakeWPF.Helpers
/// <summary>
/// Parses chapter time start value from a chapter marker input file.
/// </summary>
- /// <param name="chapterStartRaw">The raw string value parsed from the input file</param>
+ /// <param name="chapterStartRaw">
+ /// The raw string value parsed from the input file
+ /// </param>
+ /// <returns>
+ /// The <see cref="TimeSpan"/>.
+ /// </returns>
internal static TimeSpan ParseChapterTimeStart(string chapterStartRaw)
{
- //Format: 02:35:05 and 02:35:05.2957333
+ // Format: 02:35:05 and 02:35:05.2957333
return TimeSpan.ParseExact(chapterStartRaw,
new[]
{
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index c0b0c61d8..69399b597 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -1534,6 +1534,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Any settings you changed may need to be reset the next time HandBrake launches..
+ /// </summary>
+ public static string SettingService_SaveErrorReset {
+ get {
+ return ResourceManager.GetString("SettingService_SaveErrorReset", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to An Encode is currently running. Exiting HandBrake will stop this encode.
///Are you sure you wish to exit HandBrake?.
/// </summary>
@@ -1674,6 +1683,51 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to A problem occured when trying to save your preferences..
+ /// </summary>
+ public static string UserSettings_AnErrorOccured {
+ get {
+ return ResourceManager.GetString("UserSettings_AnErrorOccured", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Unable to load user settings file: {0}.
+ /// </summary>
+ public static string UserSettings_UnableToLoad {
+ get {
+ return ResourceManager.GetString("UserSettings_UnableToLoad", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Your user settings file appears to be inaccessible or corrupted. You may have to delete the file and let HandBrake generate a new one..
+ /// </summary>
+ public static string UserSettings_UnableToLoadSolution {
+ get {
+ return ResourceManager.GetString("UserSettings_UnableToLoadSolution", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Your user settings file was corrupted or inaccessible. Settings have been reset to defaults..
+ /// </summary>
+ public static string UserSettings_YourSettingsAreCorrupt {
+ get {
+ return ResourceManager.GetString("UserSettings_YourSettingsAreCorrupt", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Warning, your settings have been reset!.
+ /// </summary>
+ public static string UserSettings_YourSettingsHaveBeenReset {
+ get {
+ return ResourceManager.GetString("UserSettings_YourSettingsHaveBeenReset", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Accelerates H.264, MPEG-4, VC1 and WMV3 and can provide a small speed improvement on lower end hardware..
/// </summary>
public static string Video_DxvaDecode {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index a63772ad6..6c2d61212 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -793,4 +793,22 @@ Are you sure you want to import the chapter names?</value>
<value>HandBrake is unable to upgrade your presets file to a new version format.
Your preset file will be archived and new one created. You will need to re-create your own presets.</value>
</data>
+ <data name="SettingService_SaveErrorReset" xml:space="preserve">
+ <value>Any settings you changed may need to be reset the next time HandBrake launches.</value>
+ </data>
+ <data name="UserSettings_AnErrorOccured" xml:space="preserve">
+ <value>A problem occured when trying to save your preferences.</value>
+ </data>
+ <data name="UserSettings_YourSettingsHaveBeenReset" xml:space="preserve">
+ <value>Warning, your settings have been reset!</value>
+ </data>
+ <data name="UserSettings_YourSettingsAreCorrupt" xml:space="preserve">
+ <value>Your user settings file was corrupted or inaccessible. Settings have been reset to defaults.</value>
+ </data>
+ <data name="UserSettings_UnableToLoad" xml:space="preserve">
+ <value>Unable to load user settings file: {0}</value>
+ </data>
+ <data name="UserSettings_UnableToLoadSolution" xml:space="preserve">
+ <value>Your user settings file appears to be inaccessible or corrupted. You may have to delete the file and let HandBrake generate a new one.</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
index 5f022f6b5..03cea74f5 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
@@ -9,10 +9,8 @@
namespace HandBrakeWPF.Services.Encode.Model
{
- using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
- using System.Linq;
using HandBrake.ApplicationServices.Interop.Model;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
@@ -20,7 +18,6 @@ namespace HandBrakeWPF.Services.Encode.Model
using HandBrakeWPF.Utilities;
using AllowedPassthru = HandBrakeWPF.Services.Encode.Model.Models.AllowedPassthru;
- using AudioEncoder = HandBrakeWPF.Services.Encode.Model.Models.AudioEncoder;
using AudioTrack = HandBrakeWPF.Services.Encode.Model.Models.AudioTrack;
using ChapterMarker = HandBrakeWPF.Services.Encode.Model.Models.ChapterMarker;
using DenoisePreset = HandBrakeWPF.Services.Encode.Model.Models.DenoisePreset;
@@ -29,7 +26,6 @@ namespace HandBrakeWPF.Services.Encode.Model
using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;
using PointToPointMode = HandBrakeWPF.Services.Encode.Model.Models.PointToPointMode;
using SubtitleTrack = HandBrakeWPF.Services.Encode.Model.Models.SubtitleTrack;
- using SubtitleType = HandBrakeWPF.Services.Encode.Model.Models.SubtitleType;
using VideoLevel = HandBrakeWPF.Services.Encode.Model.Models.Video.VideoLevel;
using VideoPreset = HandBrakeWPF.Services.Encode.Model.Models.Video.VideoPreset;
using VideoProfile = HandBrakeWPF.Services.Encode.Model.Models.Video.VideoProfile;
@@ -464,53 +460,6 @@ namespace HandBrakeWPF.Services.Encode.Model
/// </summary>
public string ExtraAdvancedArguments { get; set; }
- #endregion
-
- #region Preview
-
- /// <summary>
- /// Gets or sets a value indicating whether IsPreviewEncode.
- /// </summary>
- public bool IsPreviewEncode { get; set; }
-
- /// <summary>
- /// Gets or sets PreviewEncodeDuration.
- /// </summary>
- public int? PreviewEncodeDuration { get; set; }
-
- /// <summary>
- /// Gets or sets PreviewEncodeStartAt.
- /// </summary>
- public int? PreviewEncodeStartAt { get; set; }
-
- #endregion
-
- #region Helpers
-
- /// <summary>
- /// Gets a value indicating whether M4v extension is required.
- /// </summary>
- public bool RequiresM4v
- {
- get
- {
- if (this.OutputFormat == OutputFormat.Mp4)
- {
- bool audio =
- this.AudioTracks.Any(
- item =>
- item.Encoder == AudioEncoder.Ac3Passthrough || item.Encoder == AudioEncoder.Ac3
- || item.Encoder == AudioEncoder.DtsPassthrough || item.Encoder == AudioEncoder.Passthrough);
-
- bool subtitles = this.SubtitleTracks.Any(track => track.SubtitleType != SubtitleType.VobSub);
-
- return audio || subtitles;
- }
-
- return false;
- }
- }
-
/// <summary>
/// Gets or sets a value indicating whether advanced panel enabled.
/// </summary>
@@ -530,34 +479,24 @@ namespace HandBrakeWPF.Services.Encode.Model
}
}
+ #endregion
+
+ #region Preview
+
/// <summary>
- /// Gets the picture settings desc.
+ /// Gets or sets a value indicating whether IsPreviewEncode.
/// </summary>
- public string PictureSettingsDesc
- {
- get
- {
- string resolution = string.Empty;
- switch (this.Anamorphic)
- {
- case Anamorphic.Strict:
- resolution = "Anamorphic: Strict";
- break;
- case Anamorphic.Loose:
- resolution = "Anamorphic: Loose, Width: " + this.Width;
- break;
- case Anamorphic.Custom:
- resolution = "Anamorphic: Custom, Resolution: " + this.Width + "x" + this.Height;
- break;
- case Anamorphic.None:
- resolution = "Resolution: " + this.Width + "x" + this.Height;
- break;
- }
+ public bool IsPreviewEncode { get; set; }
- return resolution + Environment.NewLine + "Crop Top: " + this.Cropping.Top + ", Botton: " + this.Cropping.Bottom + ", Left: "
- + this.Cropping.Left + ", Right: " + this.Cropping.Right;
- }
- }
+ /// <summary>
+ /// Gets or sets PreviewEncodeDuration.
+ /// </summary>
+ public int? PreviewEncodeDuration { get; set; }
+
+ /// <summary>
+ /// Gets or sets PreviewEncodeStartAt.
+ /// </summary>
+ public int? PreviewEncodeStartAt { get; set; }
#endregion
}
diff --git a/win/CS/HandBrakeWPF/Services/Interfaces/IUserSettingService.cs b/win/CS/HandBrakeWPF/Services/Interfaces/IUserSettingService.cs
index c8b34b7cd..bcd0ab27d 100644
--- a/win/CS/HandBrakeWPF/Services/Interfaces/IUserSettingService.cs
+++ b/win/CS/HandBrakeWPF/Services/Interfaces/IUserSettingService.cs
@@ -56,16 +56,5 @@ namespace HandBrakeWPF.Services.Interfaces
/// The user setting
/// </returns>
T GetUserSetting<T>(string name);
-
- /// <summary>
- /// Get an StringCollection type user setting
- /// </summary>
- /// <param name="name">
- /// The setting name
- /// </param>
- /// <returns>
- /// The settings value
- /// </returns>
- System.Collections.Specialized.StringCollection GetUserSettingStringCollection(string name);
}
} \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueProcessor.cs b/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueProcessor.cs
index e148269ff..1e86d06ba 100644
--- a/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueProcessor.cs
+++ b/win/CS/HandBrakeWPF/Services/Queue/Interfaces/IQueueProcessor.cs
@@ -44,7 +44,6 @@ namespace HandBrakeWPF.Services.Queue.Interfaces
/// </summary>
event EventHandler QueuePaused;
-
/// <summary>
/// Low Diskspace has been detected.
/// Checked before each job starts.
@@ -61,7 +60,7 @@ namespace HandBrakeWPF.Services.Queue.Interfaces
int Count { get; }
/// <summary>
- /// The number of errors detected in the queue.
+ /// Gets the number of errors detected in the queue.
/// </summary>
int ErrorCount { get; }
diff --git a/win/CS/HandBrakeWPF/Services/UserSettingService.cs b/win/CS/HandBrakeWPF/Services/UserSettingService.cs
index 8f0093009..612999a3a 100644
--- a/win/CS/HandBrakeWPF/Services/UserSettingService.cs
+++ b/win/CS/HandBrakeWPF/Services/UserSettingService.cs
@@ -10,12 +10,12 @@
namespace HandBrakeWPF.Services
{
using System;
- using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Xml.Serialization;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Interfaces;
using GeneralApplicationException = HandBrakeWPF.Exceptions.GeneralApplicationException;
@@ -94,20 +94,6 @@ namespace HandBrakeWPF.Services
}
/// <summary>
- /// Get an StringCollection type user setting
- /// </summary>
- /// <param name="name">
- /// The setting name
- /// </param>
- /// <returns>
- /// The settings value
- /// </returns>
- public StringCollection GetUserSettingStringCollection(string name)
- {
- return (StringCollection)this.userSettings[name];
- }
-
- /// <summary>
/// The on setting changed.
/// </summary>
/// <param name="e">
@@ -143,8 +129,8 @@ namespace HandBrakeWPF.Services
catch (Exception exc)
{
throw new GeneralApplicationException(
- "A problem occured when trying to save your preferences.",
- "Any settings you changed may need to be reset the next time HandBrake launches.",
+ Resources.UserSettings_AnErrorOccured,
+ Resources.SettingService_SaveErrorReset,
exc);
}
}
@@ -189,11 +175,11 @@ namespace HandBrakeWPF.Services
}
this.Save();
- throw new GeneralApplicationException("Warning, your settings have been reset!", "Your user settings file was corrupted or inaccessible. Settings have been reset to defaults.", exc);
+ throw new GeneralApplicationException(Resources.UserSettings_YourSettingsHaveBeenReset, Resources.UserSettings_YourSettingsAreCorrupt, exc);
}
catch (Exception)
{
- throw new GeneralApplicationException("Unable to load user settings file: " + this.settingsFile, "Your user settings file appears to be inaccessible or corrupted. You may have to delete the file and let HandBrake generate a new one.", exc);
+ throw new GeneralApplicationException(string.Format(Resources.UserSettings_UnableToLoad, this.settingsFile), Resources.UserSettings_UnableToLoadSolution, exc);
}
}
}
diff --git a/win/CS/HandBrakeWPF/Utilities/Interfaces/INotifyPropertyChangedEx.cs b/win/CS/HandBrakeWPF/Utilities/Interfaces/INotifyPropertyChangedEx.cs
index 0030ee7b7..32015600e 100644
--- a/win/CS/HandBrakeWPF/Utilities/Interfaces/INotifyPropertyChangedEx.cs
+++ b/win/CS/HandBrakeWPF/Utilities/Interfaces/INotifyPropertyChangedEx.cs
@@ -17,7 +17,7 @@ namespace HandBrakeWPF.Utilities.Interfaces
public interface INotifyPropertyChangedEx : INotifyPropertyChanged
{
/// <summary>
- /// Enables/Disables property change notification.
+ /// Gets or sets a value indicating whether Enables/Disables property change notification.
/// </summary>
bool IsNotifying { get; set; }
diff --git a/win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs b/win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs
index 48a0bcf63..090030856 100644
--- a/win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs
+++ b/win/CS/HandBrakeWPF/Utilities/Output/CsvHelper.cs
@@ -1,8 +1,11 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="CsvHelper.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>
+// Utilitiy functions for writing CSV files
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Utilities.Output
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs
index cacfe079f..770869122 100644
--- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IQueueViewModel.cs
@@ -14,6 +14,12 @@ namespace HandBrakeWPF.ViewModels.Interfaces
/// </summary>
public interface IQueueViewModel
{
+ /// <summary>
+ /// The when done action after a queue completes.
+ /// </summary>
+ /// <param name="action">
+ /// The action.
+ /// </param>
void WhenDone(string action);
}
} \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 4e7ef3987..2f3a67ccb 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1974,7 +1974,7 @@ namespace HandBrakeWPF.ViewModels
switch (this.userSettingService.GetUserSetting<int>(UserSettingConstants.UseM4v))
{
case 0: // Auto
- newExtension = this.CurrentTask.RequiresM4v ? ".m4v" : ".mp4";
+ newExtension = MP4Helper.RequiresM4v(this.CurrentTask) ? ".m4v" : ".mp4";
break;
case 1: // MP4
newExtension = ".mp4";
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index 13621e656..77f692904 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -366,7 +366,7 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// The Video Bitrate.
+ /// Gets or sets the Video Bitrate.
/// </summary>
public int? VideoBitrate
{
diff --git a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml b/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml
index 61565b74d..6d86bd7c8 100644
--- a/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml
+++ b/win/CS/HandBrakeWPF/Views/Queue/Embedded.xaml
@@ -13,6 +13,7 @@
xmlns:commands="clr-namespace:HandBrakeWPF.Commands"
xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
+ xmlns:queue="clr-namespace:HandBrakeWPF.Converters.Queue"
MinWidth="350"
MinHeight="250"
@@ -28,6 +29,7 @@
<Subtitles:SubtitlesQueueDisplayConverter x:Key="subtitleTrackDisplayConverter" />
<video:EncoderOptionsTooltipConverter x:Key="encoderOptionsTooltipConverter" />
<video:VideoOptionsTooltipConverter x:Key="videoOptionsTooltipConverter" />
+ <queue:PictureSettingsDescConveter x:Key="pictureSettingsDescConverter" />
<Style x:Key="LongToolTipHolder" TargetType="FrameworkElement">
<Setter Property="ToolTipService.ShowDuration" Value="10000" />
@@ -107,7 +109,7 @@
<TextBlock Text="{Binding Task.Destination}" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" />
<TextBlock FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.QueueView_PictureSettings}" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" />
- <TextBlock Text="{Binding Task.PictureSettingsDesc}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" />
+ <TextBlock Text="{Binding Task, Converter={StaticResource pictureSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" />
<TextBlock FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.QueueView_Video}" Grid.Row="3" Grid.Column="0" />
<TextBlock Text="{Binding Task, Converter={StaticResource videoOptionsTooltipConverter}}" Grid.Row="3" Grid.Column="1" TextWrapping="Wrap" />
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml
index 864b89c5a..4a35cb02d 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml
@@ -14,6 +14,7 @@
xmlns:commands="clr-namespace:HandBrakeWPF.Commands"
xmlns:helpers="clr-namespace:HandBrakeWPF.Helpers"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
+ xmlns:queue="clr-namespace:HandBrakeWPF.Converters.Queue"
Title="{Binding Title}"
Width="700"
Height="500"
@@ -32,6 +33,7 @@
<Subtitles:SubtitlesQueueDisplayConverter x:Key="subtitleTrackDisplayConverter" />
<video:EncoderOptionsTooltipConverter x:Key="encoderOptionsTooltipConverter" />
<video:VideoOptionsTooltipConverter x:Key="videoOptionsTooltipConverter" />
+ <queue:PictureSettingsDescConveter x:Key="pictureSettingsDescConverter" />
<Style x:Key="LongToolTipHolder" TargetType="FrameworkElement">
<Setter Property="ToolTipService.ShowDuration" Value="10000" />
@@ -248,7 +250,7 @@
<TextBlock Text="{Binding Task.Destination}" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" />
<TextBlock FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.QueueView_PictureSettings}" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" />
- <TextBlock Text="{Binding Task.PictureSettingsDesc}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" />
+ <TextBlock Text="{Binding Task, Converter={StaticResource pictureSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" />
<TextBlock FontWeight="Bold" Text="{x:Static Properties:ResourcesUI.QueueView_Video}" Grid.Row="3" Grid.Column="0" />
<TextBlock Text="{Binding Task, Converter={StaticResource videoOptionsTooltipConverter}}" Grid.Row="3" Grid.Column="1" TextWrapping="Wrap" />