preset.Task.MaxHeight = preset.Task.Width;\r
}\r
\r
-\r
return preset;\r
}\r
\r
this.FastDecode = task.FastDecode;\r
this.ExtraAdvancedArguments = task.ExtraAdvancedArguments;\r
\r
-\r
this.PreviewStartAt = task.PreviewStartAt;\r
this.PreviewDuration = task.PreviewDuration;\r
\r
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\r
private Audio scannedTrack;\r
\r
+ /// <summary>\r
+ /// The is default.\r
+ /// </summary>\r
private bool isDefault;\r
\r
#endregion\r
}\r
\r
/// <summary>\r
- /// Gets the task.\r
+ /// Gets or sets the task.\r
/// </summary>\r
public EncodeTask Task { get; set; }\r
\r
/// <summary>\r
- /// Gets the configuration.\r
+ /// Gets or sets the configuration.\r
/// </summary>\r
public HBConfiguration Configuration { get; set; }\r
\r
\r
return null;\r
}\r
- catch (Exception exc)\r
+ catch (Exception)\r
{\r
return null;\r
}\r
}\r
}\r
}\r
- catch (Exception exc)\r
+ catch (Exception)\r
{\r
// Do Nothing.\r
}\r
this.HbProcess.CancelOutputRead();\r
this.ShutdownFileWriter();\r
}\r
- catch (Exception exc)\r
+ catch (Exception)\r
{\r
// This exception doesn't warrent user interaction, but it should be logged (TODO)\r
}\r
HandBrakeUtils.MessageLogged += this.HandBrakeInstanceMessageLogged;\r
HandBrakeUtils.ErrorLogged += this.HandBrakeInstanceErrorLogged;\r
}\r
- catch (Exception exc)\r
+ catch (Exception)\r
{\r
// Do nothing. \r
}\r
this.scanLog.Dispose();\r
instance.Dispose();\r
}\r
- catch (Exception exc)\r
+ catch (Exception)\r
{\r
// Do Nothing\r
}\r
}\r
} \r
}\r
- catch (Exception exc)\r
+ catch (Exception)\r
{\r
RecoverFromCorruptedPresetFile(this.builtInPresetFile);\r
this.UpdateBuiltInPresets();\r
encodeService.ProcessLogs(destination, configuration);\r
}\r
\r
-\r
/// <summary>\r
/// Start the service\r
/// </summary>\r
<StyleCopSettings Version="105">\r
+ <GlobalSettings>\r
+ <BooleanProperty Name="AutoCheckForUpdate">False</BooleanProperty>\r
+ </GlobalSettings>\r
<Analyzers>\r
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">\r
<Rules>\r
{\r
return val;\r
}\r
-\r
- if (insensitiveCase && currDescription.ToLower() == description.ToLower() ||\r
- currDisplay.ToLower() == description.ToLower())\r
+ \r
+ if (insensitiveCase && currDescription.ToLower() == description.ToLower() || currDisplay.ToLower() == description.ToLower())\r
{\r
return val;\r
}\r
\r
#region Public Methods\r
\r
-\r
/// <summary>\r
/// Load a plist file.\r
/// </summary>\r
if (task.Height.HasValue && task.Height != 0) query += string.Format(" -l {0}", task.Height);\r
}\r
\r
- //if (task.HasCropping)\r
- //{\r
- query += string.Format(" --crop {0}:{1}:{2}:{3}", task.Cropping.Top, task.Cropping.Bottom, task.Cropping.Left, task.Cropping.Right);\r
- //}\r
+ query += string.Format(\r
+ " --crop {0}:{1}:{2}:{3}",\r
+ task.Cropping.Top,\r
+ task.Cropping.Bottom,\r
+ task.Cropping.Left,\r
+ task.Cropping.Right);\r
\r
switch (task.Anamorphic)\r
{\r
query += string.Format(" -b {0}", task.VideoBitrate.Value);\r
break;\r
case VideoEncodeRateType.ConstantQuality:\r
- double value;\r
switch (task.VideoEncoder)\r
{\r
case VideoEncoder.FFMpeg:\r
// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="OpenOptionsScreen.cs" company="HandBrake Project (http://handbrake.fr)">\r
+// <copyright file="OpenOptionsScreenCommand.cs" company="HandBrake Project (http://handbrake.fr)">\r
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
// </copyright>\r
// <summary>\r
/// The culture.\r
/// </param>\r
/// <returns>\r
- /// The convert.\r
+ /// The Visibility Result\r
/// </returns>\r
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r
{\r
/// The culture.\r
/// </param>\r
/// <returns>\r
- /// The convert back.\r
+ /// The Visibility Result\r
/// </returns>\r
- public object ConvertBack(\r
- object value, Type targetType, object parameter, CultureInfo culture)\r
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r
{\r
Visibility visibility = (Visibility)value;\r
bool result = visibility == Visibility.Visible;\r
return EnumHelper<VideoScaler>.GetEnumDisplayValues(typeof(VideoScaler));\r
}\r
\r
-\r
-\r
// Single Items\r
if (targetType == typeof(x264Preset) || value.GetType() == typeof(x264Preset))\r
{\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
-\r
namespace HandBrakeWPF.Converters.Options\r
{\r
using System;\r
return;\r
}\r
\r
-\r
if (this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction) == "Do nothing")\r
{\r
return;\r
this.windowManager.ShowDialog(titleSpecificView);\r
});\r
\r
-\r
if (!titleSpecificView.IsCancelled)\r
{\r
// Do something whent he encode ends.\r
return (SerializableDictionary<string, object>)this.serializer.Deserialize(stream);\r
}\r
}\r
- catch (Exception exc)\r
+ catch (Exception)\r
{\r
return new SerializableDictionary<string, object>();\r
}\r
\r
namespace HandBrakeWPF.ViewModels\r
{\r
- using System;\r
using System.Collections.Generic;\r
using System.Collections.ObjectModel;\r
using System.Collections.Specialized;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
using HandBrake.ApplicationServices.Parsing;\r
- using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop.Model.Encoding;\r
\r
{\r
List<Audio> trackList = new List<Audio>();\r
\r
-\r
List<string> isoCodes =\r
LanguageUtilities.GetLanguageCodes(\r
this.UserSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages));\r
namespace HandBrakeWPF.ViewModels\r
{\r
using System;\r
- using System.Windows.Forms.VisualStyles;\r
using System.Windows.Threading;\r
\r
using HandBrakeWPF.ViewModels.Interfaces;\r
/// <summary>\r
/// The Simple Encoder options screen\r
/// </summary>\r
- public class EncoderOptionsViewModel : ViewModelBase, IEncoderOptionsViewModel, ITabInterface\r
+ public class EncoderOptionsViewModel : ViewModelBase, IEncoderOptionsViewModel\r
{\r
/// <summary>\r
/// The cached options.\r
/// <summary>\r
/// Initializes a new instance of the <see cref="EncoderOptionsViewModel"/> class.\r
/// </summary>\r
- public EncoderOptionsViewModel()
- {
- this.Task = new EncodeTask();
- }
-
- /// <summary>
+ public EncoderOptionsViewModel()\r
+ {\r
+ this.Task = new EncodeTask();\r
+ }\r
+\r
+ /// <summary>\r
/// Gets or sets the task.\r
/// </summary>\r
public EncodeTask Task { get; set; }\r
{\r
Console.WriteLine(e);\r
}\r
-\r
}\r
\r
/// <summary>\r
this.userSettingService.SetUserSetting(UserSettingConstants.EnableDxva, this.EnableDxvaDecoding);\r
this.userSettingService.SetUserSetting(UserSettingConstants.ScalingMode, this.SelectedScalingMode);\r
\r
-\r
/* System and Logging */\r
userSettingService.SetUserSetting(UserSettingConstants.ProcessPriority, this.SelectedPriority);\r
userSettingService.SetUserSetting(UserSettingConstants.PreventSleep, this.PreventSleep);\r
/// <param name="e">\r
/// The EncodeProgressEventArgs.\r
/// </param>\r
- private void EncodeService_EncodeStatusChanged(\r
- object sender, EncodeProgressEventArgs e)\r
+ private void EncodeService_EncodeStatusChanged(object sender, EncodeProgressEventArgs e)\r
{\r
Caliburn.Micro.Execute.OnUIThread(() =>\r
{\r
-\r
-\r
this.JobStatus =\r
string.Format(\r
"Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\\:mm\\:ss}",\r
using System.Collections.Specialized;\r
using System.IO;\r
using System.Linq;\r
- using System.Windows.Controls.Primitives;\r
\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
#region Constants and Fields\r
\r
/// <summary>\r
- /// Backing field for the source subtitle tracks.\r
+ /// The Foreign Audio Search Track\r
/// </summary>\r
- private IList<Subtitle> sourceTracks;\r
+ private readonly Subtitle ForeignAudioSearchTrack;\r
\r
/// <summary>\r
- /// The Foreign Audio Search Track\r
+ /// Backing field for the source subtitle tracks.\r
/// </summary>\r
- private readonly Subtitle ForeignAudioSearchTrack;\r
+ private IList<Subtitle> sourceTracks;\r
\r
#endregion\r
\r
using System.ComponentModel;\r
using System.Globalization;\r
using System.Linq;\r
- using System.ServiceModel.Channels;\r
using System.Windows;\r
\r
using Caliburn.Micro;\r
using HandBrake.ApplicationServices.Model;\r
using HandBrake.ApplicationServices.Model.Encoding;\r
using HandBrake.ApplicationServices.Parsing;\r
- using HandBrake.ApplicationServices.Services.Interfaces;\r
using HandBrake.ApplicationServices.Utilities;\r
using HandBrake.Interop;\r
using HandBrake.Interop.Model.Encoding;\r
}\r
}\r
\r
-\r
/// <summary>\r
/// Gets or sets SelectedFramerate.\r
/// </summary>\r
}\r
}\r
\r
-\r
/// <summary>\r
/// Gets or sets a value indicating whether display x 264 options.\r
/// </summary>\r
}\r
}\r
\r
-\r
/// <summary>\r
/// Gets or sets a value indicating whether to display qsv options.\r
/// </summary>\r
/// </summary>\r
public BindingList<QsvPreset> QsvPresets { get; set; }\r
\r
-\r
/// <summary>\r
/// Gets or sets X264Profiles.\r
/// </summary>\r
using System.Windows;\r
using System.Windows.Controls;\r
\r
- using Caliburn.Micro;\r
-\r
using HandBrake.ApplicationServices.Model;\r
- using HandBrake.ApplicationServices.Utilities;\r
- using HandBrake.Interop.Model.Encoding;\r
\r
using HandBrakeWPF.ViewModels;\r
- using HandBrakeWPF.ViewModels.Interfaces;\r
\r
/// <summary>\r
/// Interaction logic for VideoView.xaml\r
InitializeComponent();\r
}\r
\r
-\r
+ /// <summary>\r
+ /// The qsv_preset_radiobutton.\r
+ /// </summary>\r
+ /// <param name="sender">\r
+ /// The sender.\r
+ /// </param>\r
+ /// <param name="e">\r
+ /// The e.\r
+ /// </param>\r
private void qsv_preset_radiobutton(object sender, System.Windows.RoutedEventArgs e)\r
{\r
qsv_preset_ValueChanged(sender, null);\r
}\r
\r
+ /// <summary>\r
+ /// The qsv_preset_ value changed.\r
+ /// </summary>\r
+ /// <param name="sender">\r
+ /// The sender.\r
+ /// </param>\r
+ /// <param name="e">\r
+ /// The e.\r
+ /// </param>\r
private void qsv_preset_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)\r
{\r
- VideoViewModel mvm = ((VideoViewModel)this.DataContext);
- EncodeTask task = mvm.Task;
-
- string full_string = "";
-
- IDictionary<string, string> newOptions = new Dictionary<string, string>();
- string[] existingSegments = full_string.Split(':');
- foreach (string existingSegment in existingSegments)
+ VideoViewModel mvm = ((VideoViewModel)this.DataContext);\r
+ EncodeTask task = mvm.Task;\r
+\r
+ string full_string = string.Empty;\r
+\r
+ IDictionary<string, string> newOptions = new Dictionary<string, string>();\r
+ string[] existingSegments = full_string.Split(':');\r
+ foreach (string existingSegment in existingSegments)\r
{\r
string optionName = existingSegment;\r
string optionValue = string.Empty;\r
}\r
}\r
\r
- full_string = "";\r
+ full_string = string.Empty;\r
foreach (KeyValuePair<string, string> entry in newOptions)\r
{\r
full_string += entry.Key;\r
// --------------------------------------------------------------------------------------------------------------------\r
-// <copyright file="AdvancedView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">\r
+// <copyright file="X264View.xaml.cs" company="HandBrake Project (http://handbrake.fr)">\r
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.\r
// </copyright>\r
// <summary>\r
-// Interaction logic for AdvancedView.xaml\r
+// Interaction logic for X264View.xaml\r
// </summary>\r
// --------------------------------------------------------------------------------------------------------------------\r
\r
namespace HandBrakeWPF.Views\r
{\r
- using System.Windows.Controls;\r
-\r
/// <summary>\r
/// Interaction logic for AdvancedView.xaml\r
/// </summary>\r
- public partial class X264View : UserControl\r
+ public partial class X264View\r
{\r
/// <summary>\r
- /// Initializes a new instance of the <see cref="AdvancedView"/> class.\r
+ /// Initializes a new instance of the <see cref="X264View"/> class. \r
/// </summary>\r
public X264View()\r
{\r
<BooleanProperty Name="Enabled">False</BooleanProperty>\r
</RuleSettings>\r
</Rule>\r
+ <Rule Name="PrefixCallsCorrectly">\r
+ <RuleSettings>\r
+ <BooleanProperty Name="Enabled">False</BooleanProperty>\r
+ </RuleSettings>\r
+ </Rule>\r
</Rules>\r
<AnalyzerSettings />\r
</Analyzer>\r