summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-11-19 22:54:16 +0000
committersr55 <[email protected]>2013-11-19 22:54:16 +0000
commitc32a46c925608e51be9edcd6b5647c50124dd16a (patch)
treefcd2cb8c04f326d07145117bbc03f130d1170b60 /win/CS/HandBrakeWPF
parent5e4d8c7244a85fafa7ae477f8378a0c56e7ba365 (diff)
WinGui: Fix a large number of stylecop warnings.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5900 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r--win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs2
-rw-r--r--win/CS/HandBrakeWPF/Converters/AdvancedVisibilityConverter.cs7
-rw-r--r--win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs2
-rw-r--r--win/CS/HandBrakeWPF/Converters/Options/OptionsTabConverter.cs1
-rw-r--r--win/CS/HandBrakeWPF/Services/PrePostActionService.cs2
-rw-r--r--win/CS/HandBrakeWPF/Services/UserSettingService.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs3
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/CountdownAlertViewModel.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs14
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs5
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs9
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs6
-rw-r--r--win/CS/HandBrakeWPF/Views/VideoView.xaml.cs42
-rw-r--r--win/CS/HandBrakeWPF/Views/X264View.xaml.cs10
16 files changed, 48 insertions, 60 deletions
diff --git a/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs b/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs
index 30a473d90..5bfbb22d7 100644
--- a/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs
+++ b/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs
@@ -1,5 +1,5 @@
// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="OpenOptionsScreen.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="OpenOptionsScreenCommand.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>
diff --git a/win/CS/HandBrakeWPF/Converters/AdvancedVisibilityConverter.cs b/win/CS/HandBrakeWPF/Converters/AdvancedVisibilityConverter.cs
index 905d8798a..1aeb7fdcb 100644
--- a/win/CS/HandBrakeWPF/Converters/AdvancedVisibilityConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/AdvancedVisibilityConverter.cs
@@ -40,7 +40,7 @@ namespace HandBrakeWPF.Converters
/// The culture.
/// </param>
/// <returns>
- /// The convert.
+ /// The Visibility Result
/// </returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
@@ -71,10 +71,9 @@ namespace HandBrakeWPF.Converters
/// The culture.
/// </param>
/// <returns>
- /// The convert back.
+ /// The Visibility Result
/// </returns>
- public object ConvertBack(
- object value, Type targetType, object parameter, CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
Visibility visibility = (Visibility)value;
bool result = visibility == Visibility.Visible;
diff --git a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
index 1d3a4e208..dd26399db 100644
--- a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
@@ -98,8 +98,6 @@ namespace HandBrakeWPF.Converters
return EnumHelper<VideoScaler>.GetEnumDisplayValues(typeof(VideoScaler));
}
-
-
// Single Items
if (targetType == typeof(x264Preset) || value.GetType() == typeof(x264Preset))
{
diff --git a/win/CS/HandBrakeWPF/Converters/Options/OptionsTabConverter.cs b/win/CS/HandBrakeWPF/Converters/Options/OptionsTabConverter.cs
index 2911bb4fc..bd1e4c8d0 100644
--- a/win/CS/HandBrakeWPF/Converters/Options/OptionsTabConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Options/OptionsTabConverter.cs
@@ -7,7 +7,6 @@
// </summary>
// --------------------------------------------------------------------------------------------------------------------
-
namespace HandBrakeWPF.Converters.Options
{
using System;
diff --git a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
index 7cfceace3..f6e4fc800 100644
--- a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
+++ b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
@@ -126,7 +126,6 @@ namespace HandBrakeWPF.Services
return;
}
-
if (this.userSettingService.GetUserSetting<string>(UserSettingConstants.WhenCompleteAction) == "Do nothing")
{
return;
@@ -141,7 +140,6 @@ namespace HandBrakeWPF.Services
this.windowManager.ShowDialog(titleSpecificView);
});
-
if (!titleSpecificView.IsCancelled)
{
// Do something whent he encode ends.
diff --git a/win/CS/HandBrakeWPF/Services/UserSettingService.cs b/win/CS/HandBrakeWPF/Services/UserSettingService.cs
index 6b7df3d85..d10ec84df 100644
--- a/win/CS/HandBrakeWPF/Services/UserSettingService.cs
+++ b/win/CS/HandBrakeWPF/Services/UserSettingService.cs
@@ -216,7 +216,7 @@ namespace HandBrakeWPF.Services
return (SerializableDictionary<string, object>)this.serializer.Deserialize(stream);
}
}
- catch (Exception exc)
+ catch (Exception)
{
return new SerializableDictionary<string, object>();
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index 296b1faa4..ed619b010 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -9,7 +9,6 @@
namespace HandBrakeWPF.ViewModels
{
- using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
@@ -20,7 +19,6 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
- using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop.Model.Encoding;
@@ -430,7 +428,6 @@ namespace HandBrakeWPF.ViewModels
{
List<Audio> trackList = new List<Audio>();
-
List<string> isoCodes =
LanguageUtilities.GetLanguageCodes(
this.UserSettingService.GetUserSetting<StringCollection>(UserSettingConstants.SelectedLanguages));
diff --git a/win/CS/HandBrakeWPF/ViewModels/CountdownAlertViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/CountdownAlertViewModel.cs
index ca8901c7c..0f92c18b8 100644
--- a/win/CS/HandBrakeWPF/ViewModels/CountdownAlertViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/CountdownAlertViewModel.cs
@@ -10,7 +10,6 @@
namespace HandBrakeWPF.ViewModels
{
using System;
- using System.Windows.Forms.VisualStyles;
using System.Windows.Threading;
using HandBrakeWPF.ViewModels.Interfaces;
diff --git a/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs
index f7968fcb4..42407aadf 100644
--- a/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/EncoderOptionsViewModel.cs
@@ -20,7 +20,7 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// The Simple Encoder options screen
/// </summary>
- public class EncoderOptionsViewModel : ViewModelBase, IEncoderOptionsViewModel, ITabInterface
+ public class EncoderOptionsViewModel : ViewModelBase, IEncoderOptionsViewModel
{
/// <summary>
/// The cached options.
@@ -30,12 +30,12 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// Initializes a new instance of the <see cref="EncoderOptionsViewModel"/> class.
/// </summary>
- public EncoderOptionsViewModel()
- {
- this.Task = new EncodeTask();
- }
-
- /// <summary>
+ public EncoderOptionsViewModel()
+ {
+ this.Task = new EncodeTask();
+ }
+
+ /// <summary>
/// Gets or sets the task.
/// </summary>
public EncodeTask Task { get; set; }
diff --git a/win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs
index e6bbfe6d4..78e4867ea 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ErrorViewModel.cs
@@ -120,7 +120,6 @@ namespace HandBrakeWPF.ViewModels
{
Console.WriteLine(e);
}
-
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index f8a86494e..dde54a5c6 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -2039,7 +2039,6 @@ namespace HandBrakeWPF.ViewModels
this.userSettingService.SetUserSetting(UserSettingConstants.EnableDxva, this.EnableDxvaDecoding);
this.userSettingService.SetUserSetting(UserSettingConstants.ScalingMode, this.SelectedScalingMode);
-
/* System and Logging */
userSettingService.SetUserSetting(UserSettingConstants.ProcessPriority, this.SelectedPriority);
userSettingService.SetUserSetting(UserSettingConstants.PreventSleep, this.PreventSleep);
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
index e89ecc4cd..3347cfddd 100644
--- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs
@@ -415,13 +415,10 @@ namespace HandBrakeWPF.ViewModels
/// <param name="e">
/// The EncodeProgressEventArgs.
/// </param>
- private void EncodeService_EncodeStatusChanged(
- object sender, EncodeProgressEventArgs e)
+ private void EncodeService_EncodeStatusChanged(object sender, EncodeProgressEventArgs e)
{
Caliburn.Micro.Execute.OnUIThread(() =>
{
-
-
this.JobStatus =
string.Format(
"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}",
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
index 4a28438b7..467535bc3 100644
--- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
@@ -13,7 +13,6 @@ namespace HandBrakeWPF.ViewModels
using System.Collections.Specialized;
using System.IO;
using System.Linq;
- using System.Windows.Controls.Primitives;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
@@ -34,14 +33,14 @@ namespace HandBrakeWPF.ViewModels
#region Constants and Fields
/// <summary>
- /// Backing field for the source subtitle tracks.
+ /// The Foreign Audio Search Track
/// </summary>
- private IList<Subtitle> sourceTracks;
+ private readonly Subtitle ForeignAudioSearchTrack;
/// <summary>
- /// The Foreign Audio Search Track
+ /// Backing field for the source subtitle tracks.
/// </summary>
- private readonly Subtitle ForeignAudioSearchTrack;
+ private IList<Subtitle> sourceTracks;
#endregion
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index d12798fef..5dd4b07aa 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -14,7 +14,6 @@ namespace HandBrakeWPF.ViewModels
using System.ComponentModel;
using System.Globalization;
using System.Linq;
- using System.ServiceModel.Channels;
using System.Windows;
using Caliburn.Micro;
@@ -22,7 +21,6 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
- using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop;
using HandBrake.Interop.Model.Encoding;
@@ -477,7 +475,6 @@ namespace HandBrakeWPF.ViewModels
}
}
-
/// <summary>
/// Gets or sets SelectedFramerate.
/// </summary>
@@ -619,7 +616,6 @@ namespace HandBrakeWPF.ViewModels
}
}
-
/// <summary>
/// Gets or sets a value indicating whether display x 264 options.
/// </summary>
@@ -637,7 +633,6 @@ namespace HandBrakeWPF.ViewModels
}
}
-
/// <summary>
/// Gets or sets a value indicating whether to display qsv options.
/// </summary>
@@ -847,7 +842,6 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public BindingList<QsvPreset> QsvPresets { get; set; }
-
/// <summary>
/// Gets or sets X264Profiles.
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs b/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs
index e9d54d4ce..9f12972be 100644
--- a/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/VideoView.xaml.cs
@@ -13,14 +13,9 @@ namespace HandBrakeWPF.Views
using System.Windows;
using System.Windows.Controls;
- using Caliburn.Micro;
-
using HandBrake.ApplicationServices.Model;
- using HandBrake.ApplicationServices.Utilities;
- using HandBrake.Interop.Model.Encoding;
using HandBrakeWPF.ViewModels;
- using HandBrakeWPF.ViewModels.Interfaces;
/// <summary>
/// Interaction logic for VideoView.xaml
@@ -35,22 +30,39 @@ namespace HandBrakeWPF.Views
InitializeComponent();
}
-
+ /// <summary>
+ /// The qsv_preset_radiobutton.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
private void qsv_preset_radiobutton(object sender, System.Windows.RoutedEventArgs e)
{
qsv_preset_ValueChanged(sender, null);
}
+ /// <summary>
+ /// The qsv_preset_ value changed.
+ /// </summary>
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
private void qsv_preset_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
- 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);
+ EncodeTask task = mvm.Task;
+
+ string full_string = string.Empty;
+
+ IDictionary<string, string> newOptions = new Dictionary<string, string>();
+ string[] existingSegments = full_string.Split(':');
+ foreach (string existingSegment in existingSegments)
{
string optionName = existingSegment;
string optionValue = string.Empty;
@@ -70,7 +82,7 @@ namespace HandBrakeWPF.Views
}
}
- full_string = "";
+ full_string = string.Empty;
foreach (KeyValuePair<string, string> entry in newOptions)
{
full_string += entry.Key;
diff --git a/win/CS/HandBrakeWPF/Views/X264View.xaml.cs b/win/CS/HandBrakeWPF/Views/X264View.xaml.cs
index 7c7f9bea3..42764bf5c 100644
--- a/win/CS/HandBrakeWPF/Views/X264View.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/X264View.xaml.cs
@@ -1,23 +1,21 @@
// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="AdvancedView.xaml.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="X264View.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 AdvancedView.xaml
+// Interaction logic for X264View.xaml
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Views
{
- using System.Windows.Controls;
-
/// <summary>
/// Interaction logic for AdvancedView.xaml
/// </summary>
- public partial class X264View : UserControl
+ public partial class X264View
{
/// <summary>
- /// Initializes a new instance of the <see cref="AdvancedView"/> class.
+ /// Initializes a new instance of the <see cref="X264View"/> class.
/// </summary>
public X264View()
{