summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-08-17 20:38:18 +0000
committersr55 <[email protected]>2013-08-17 20:38:18 +0000
commitf319073778ba7f545a6c9d0a8dd07e3bf0e05aa8 (patch)
tree6fe7045222ed9a667e6c649b0808e49ae6d19ab0 /win
parentcc66e149da034cffaa48284532eec7e5b7ca72e8 (diff)
WinGui: General code tidyup
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5705 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Factories/PlistPresetFactory.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/ServerService.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs6
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs6
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs2
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs1
-rw-r--r--win/CS/HandBrakeWPF/HandBrakeWPF.csproj1
-rw-r--r--win/CS/HandBrakeWPF/Helpers/Macros.cs101
-rw-r--r--win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs4
-rw-r--r--win/CS/HandBrakeWPF/Services/PrePostActionService.cs2
-rw-r--r--win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs1
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs10
-rw-r--r--win/CS/HandBrakeWPF/Views/QueueView.xaml.cs2
-rw-r--r--win/CS/Settings.StyleCop5
15 files changed, 16 insertions, 131 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Factories/PlistPresetFactory.cs b/win/CS/HandBrake.ApplicationServices/Factories/PlistPresetFactory.cs
index 6e738351a..e3daf4154 100644
--- a/win/CS/HandBrake.ApplicationServices/Factories/PlistPresetFactory.cs
+++ b/win/CS/HandBrake.ApplicationServices/Factories/PlistPresetFactory.cs
@@ -347,7 +347,7 @@ namespace HandBrake.ApplicationServices.Factories
track.SampleRate = item.Value == "Auto" ? 0 : double.Parse(item.Value, CultureInfo.InvariantCulture);
break;
case "AudioTrack":
- //track.SourceTrack = value; We don't do anything with this one.
+ // track.SourceTrack = value; We don't do anything with this one.
break;
case "AudioTrackDRCSlider":
track.DRC = double.Parse(item.Value.ToString(), CultureInfo.InvariantCulture);
diff --git a/win/CS/HandBrake.ApplicationServices/Services/ServerService.cs b/win/CS/HandBrake.ApplicationServices/Services/ServerService.cs
index 199e371a9..22d9e22a8 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/ServerService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/ServerService.cs
@@ -207,7 +207,7 @@ namespace HandBrake.ApplicationServices.Services
if (host != null)
{
host.BeginClose(null, null);
- //host.Abort();
+ // host.Abort();
shutdownFlag.Set();
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs
index b290530dd..66a936d1f 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/Converters.cs
@@ -386,12 +386,6 @@ namespace HandBrake.ApplicationServices.Utilities
return x264Profile.Main;
case "high":
return x264Profile.High;
- //case "high10":
- // return x264Profile.High10;
- //case "high422":
- // return x264Profile.High422;
- //case "high444":
- // return x264Profile.High444;
default:
return x264Profile.Main;
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
index 43667557b..371ef128f 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/EnumHelper.cs
@@ -129,9 +129,6 @@ namespace HandBrake.ApplicationServices.Utilities
/// <param name="enumType">
/// The enum type.
/// </param>
- /// <typeparam name="T">
- /// The type of the enum
- /// </typeparam>
/// <returns>
/// A collection of strings that represent all the enum values
/// </returns>
@@ -149,9 +146,6 @@ namespace HandBrake.ApplicationServices.Utilities
/// <param name="items">
/// The items.
/// </param>
- /// <typeparam name="T">
- /// The type of the enum
- /// </typeparam>
/// <returns>
/// A collection of strings that represent all the enum values
/// </returns>
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
index e5849bd1c..040600207 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs
@@ -261,10 +261,8 @@ namespace HandBrake.ApplicationServices.Utilities
if (task.Anamorphic != Anamorphic.Strict)
{
- //if (task.MaxWidth.HasValue) query += string.Format(" -X {0}", task.MaxWidth);
if (task.Width.HasValue && task.Width != 0) query += string.Format(" -w {0}", task.Width);
- //if (task.MaxHeight.HasValue) query += string.Format(" -Y {0}", task.MaxHeight);
if (task.Height.HasValue && task.Height != 0) query += string.Format(" -l {0}", task.Height);
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs b/win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs
index f1d78be6c..10ae1f296 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/Win7.cs
@@ -11,7 +11,6 @@ namespace HandBrake.ApplicationServices.Utilities
{
using System.Windows.Shell;
-
/// <summary>
/// A class implementing Windows 7 Specific features
/// </summary>
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
index b4e6d724f..1422d2d5a 100644
--- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
+++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
@@ -160,7 +160,6 @@
<Compile Include="Helpers\GrayscaleImage.cs" />
<Compile Include="Helpers\GrowlCommunicator.cs" />
<Compile Include="Helpers\AppStyleHelper.cs" />
- <Compile Include="Helpers\Macros.cs" />
<Compile Include="Helpers\PictureSize.cs" />
<Compile Include="Model\OptionsTab.cs" />
<Compile Include="Model\SelectionTitle.cs" />
diff --git a/win/CS/HandBrakeWPF/Helpers/Macros.cs b/win/CS/HandBrakeWPF/Helpers/Macros.cs
deleted file mode 100644
index 8ea8d11d5..000000000
--- a/win/CS/HandBrakeWPF/Helpers/Macros.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Macros.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>
-// The macros.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.Helpers
-{
- /// <summary>
- /// The macros.
- /// </summary>
- public class Macros
- {
- /// <summary>
- /// The even.
- /// #define EVEN( a ) ( (a) + ( (a) & 1 ) )
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <returns>
- /// The <see cref="bool"/>.
- /// </returns>
- public static bool Even(int a)
- {
- return (a) + ((a) & 1) == 1;
- }
-
- /// <summary>
- /// The multipl e_ mo d_ down.
- /// #define MULTIPLE_MOD_DOWN( a, b ) ((b==1)?a:( b * ( (a) / b ) ))
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <param name="b">
- /// The b.
- /// </param>
- /// <returns>
- /// The <see cref="double"/>.
- /// </returns>
- public static int MultipleModDown(int a, int b)
- {
- return (b == 1) ? a : (b * ((a) / b));
- }
-
- /// <summary>
- /// The multiple mod up.
- /// #define MULTIPLE_MOD_UP( a, b ) ((b==1)?a:( b * ( ( (a) + (b) - 1) / b ) ))
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <param name="b">
- /// The b.
- /// </param>
- /// <returns>
- /// The <see cref="double"/>.
- /// </returns>
- public static int MultipleModUp(int a, int b)
- {
- return (b == 1) ? a : (b * (((a) + (b) - 1) / b));
- }
-
- /// <summary>
- /// The multiple of mod x
- /// #define MULTIPLE_MOD( a, b ) ((b==1)?a:( b * ( ( (a) + (b / 2) - 1) / b ) ))
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <param name="b">
- /// The b.
- /// </param>
- /// <returns>
- /// The <see cref="double"/>.
- /// </returns>
- public static int MultipleMod(int a, int b)
- {
- return (b == 1) ? a : (b * (((a) + (b / 2) - 1) / b));
- }
-
- /// <summary>
- /// The multiple of 16.
- /// #define MULTIPLE_16( a ) ( 16 * ( ( (a) + 8 ) / 16 ) )
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <returns>
- /// The <see cref="bool"/>.
- /// </returns>
- public static bool Multiple16(int a)
- {
- return 16 * (((a) + 8) / 16) == 1;
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
index 25e77bfa2..53ab407e2 100644
--- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
@@ -87,7 +87,7 @@ namespace HandBrakeWPF.Helpers
return queueFiles;
}
- catch (Exception exc)
+ catch (Exception)
{
return new List<string>(); // Keep quiet about the error.
}
@@ -132,7 +132,7 @@ namespace HandBrakeWPF.Helpers
// Once we load it in, remove it as we no longer need it.
File.Delete(Path.Combine(appDataPath, file));
}
- catch (Exception exc)
+ catch (Exception)
{
// Keep quite, nothing much we can do if there are problems.
// We will continue processing files.
diff --git a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
index ce4eee423..afc125e99 100644
--- a/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
+++ b/win/CS/HandBrakeWPF/Services/PrePostActionService.cs
@@ -1,5 +1,5 @@
// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="WhenDoneService.cs" company="HandBrake Project (http://handbrake.fr)">
+// <copyright file="PrePostActionService.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/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
index 87a92824a..02dcd9437 100644
--- a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
+++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs
@@ -79,7 +79,6 @@ namespace HandBrakeWPF.Startup
this.windsorContainer.Register(Component.For<ITitleSpecificViewModel>().ImplementedBy<TitleSpecificViewModel>().LifeStyle.Is(LifestyleType.Singleton));
this.windsorContainer.Register(Component.For<IQueueSelectionViewModel>().ImplementedBy<QueueSelectionViewModel>().LifeStyle.Is(LifestyleType.Singleton));
-
// Tab Components
this.windsorContainer.Register(Component.For<IAudioViewModel>().ImplementedBy<AudioViewModel>().LifeStyle.Is(LifestyleType.Singleton));
this.windsorContainer.Register(Component.For<IX264ViewModel>().ImplementedBy<X264ViewModel>().LifeStyle.Is(LifestyleType.Singleton));
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 0fea49d58..0aae4d4b8 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1608,7 +1608,7 @@ namespace HandBrakeWPF.ViewModels
PlistUtility.Export(
savefiledialog.FileName,
this.selectedPreset,
- userSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild)
+ this.userSettingService.GetUserSetting<int>(ASUserSettingConstants.HandBrakeBuild)
.ToString(CultureInfo.InvariantCulture));
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index 6329accf8..aa390eaa6 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -816,8 +816,8 @@ namespace HandBrakeWPF.ViewModels
switch (this.SelectedAnamorphicMode)
{
case Anamorphic.None:
- //this.Width = result.OutputWidth;
- //this.Height = result.OutputHeight;
+ // this.Width = result.OutputWidth;
+ // this.Height = result.OutputHeight;
break;
case Anamorphic.Strict:
case Anamorphic.Loose:
@@ -869,8 +869,6 @@ namespace HandBrakeWPF.ViewModels
this.SelectedModulus = 16; // Reset
this.ShowKeepAR = false;
-
-
this.Width = 0;
this.Height = 0;
this.SetDisplaySize();
@@ -884,7 +882,7 @@ namespace HandBrakeWPF.ViewModels
// Reset to the source size.
this.Width = this.sourceResolution.Width;
- this.Height = 0; //this.sourceResolution.Height - this.CropTop - this.CropBottom;
+ this.Height = 0; // this.sourceResolution.Height - this.CropTop - this.CropBottom;
this.ShowKeepAR = false;
this.SetDisplaySize();
@@ -911,7 +909,7 @@ namespace HandBrakeWPF.ViewModels
this.DisplayWidth = (this.Width * this.ParWidth / this.ParHeight);
}
- //this.SetDisplaySize();
+ // this.SetDisplaySize();
break;
}
}
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs
index f4af15fc3..ea01a20fb 100644
--- a/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml.cs
@@ -12,7 +12,7 @@ namespace HandBrakeWPF.Views
using System.Windows;
/// <summary>
- /// Interaction logic for VideoView.xaml
+ /// Interaction logic for VideoView
/// </summary>
public partial class QueueView : Window
{
diff --git a/win/CS/Settings.StyleCop b/win/CS/Settings.StyleCop
index 60e05fd02..9ce4e6158 100644
--- a/win/CS/Settings.StyleCop
+++ b/win/CS/Settings.StyleCop
@@ -54,6 +54,11 @@
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
+ <Rule Name="ElementDocumentationMustBeSpelledCorrectly">
+ <RuleSettings>
+ <BooleanProperty Name="Enabled">False</BooleanProperty>
+ </RuleSettings>
+ </Rule>
</Rules>
<AnalyzerSettings>
<StringProperty Name="CompanyName">HandBrake Project (http://handbrake.fr)</StringProperty>