Cleaning and stylecop

This commit is contained in:
Tichau committed 2016-01-12 08:34:19 +01:00
1 parent dac4f092ae
commit 64f9f66724
7 files changed
+27 -23

No files matched your search

@@ -24,7 +24,6 @@ namespace FileConverter
using FileConverter.ConversionJobs;
using FileConverter.Diagnostics;
using FileConverter.Upgrade;
using FileConverter.Windows;
public partial class Application : System.Windows.Application
@@ -174,7 +173,7 @@ namespace FileConverter
#if (DEBUG)
if (args.Length <= 1)
{
System.Array.Resize(ref args, 8);
//System.Array.Resize(ref args, 8);
//args[1] = "--conversion-preset";
//args[2] = "To Ogg";
//args[3] = "--verbose";
@@ -187,14 +186,14 @@ namespace FileConverter
//args[6] = @"D:\Test\Track03.mp3";
//args[7] = @"D:\Test\Track04.mp3";
System.Array.Resize(ref args, 1);
System.Array.Resize(ref args, 2);
args[1] = "--settings";
//System.Array.Resize(ref args, 5);
//args[1] = "--conversion-preset";
//args[2] = "To Wav";
//args[2] = "To Jpg";
//args[3] = "--verbose";
//args[4] = @"D:\Test\Track01.mp3";
//args[4] = @"D:\Test\Test avec accents héhé\imagé.png";
}
#endif
@@ -28,6 +28,15 @@ namespace FileConverter.ConversionJobs
{
}
protected virtual string FfmpegPath
{
get
{
string applicationDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
return System.IO.Path.Combine(applicationDirectory, "ffmpeg.exe");
}
}
protected override void Initialize()
{
base.Initialize();
@@ -39,8 +48,7 @@ namespace FileConverter.ConversionJobs
this.ffmpegProcessStartInfo = null;
string applicationDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
string ffmpegPath = string.Format("{0}\\ffmpeg.exe", applicationDirectory);
string ffmpegPath = this.FfmpegPath;
if (!System.IO.File.Exists(ffmpegPath))
{
this.ConversionFailed("Can't find ffmpeg executable. You should try to reinstall the application.");
@@ -1,6 +1,5 @@
// <copyright file="Debug.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
using System.Linq;
namespace FileConverter.Diagnostics
{
@@ -9,7 +8,7 @@ namespace FileConverter.Diagnostics
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Linq;
using System.Windows;
public static class Debug
@@ -18,8 +17,6 @@ namespace FileConverter.Diagnostics
private static Dictionary<int, DiagnosticsData> diagnosticsDataById = new Dictionary<int, DiagnosticsData>();
private static int threadCount = 0;
public static event EventHandler<PropertyChangedEventArgs> StaticPropertyChanged;
static Debug()
{
string path = PathHelpers.GetUserDataFolderPath();
@@ -42,6 +39,8 @@ namespace FileConverter.Diagnostics
Directory.CreateDirectory(Debug.diagnosticsFolderPath);
}
public static event EventHandler<PropertyChangedEventArgs> StaticPropertyChanged;
public static DiagnosticsData[] Data
{
get
@@ -91,6 +90,5 @@ namespace FileConverter.Diagnostics
Debug.diagnosticsDataById.Clear();
}
}
}
@@ -1,14 +1,13 @@
// <copyright file="DiagnosticsData.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
using System.Collections.ObjectModel;
namespace FileConverter.Diagnostics
{
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Text;
using System.Runtime.CompilerServices;
using System.Text;
using FileConverter.Annotations;
@@ -19,14 +18,14 @@ namespace FileConverter.Diagnostics
private System.IO.TextWriter logFileWriter;
private string name;
public event PropertyChangedEventHandler PropertyChanged;
public DiagnosticsData(string name)
{
this.Name = name;
this.LogMessages = new ReadOnlyCollection<string>(this.logMessages);
}
public event PropertyChangedEventHandler PropertyChanged;
public string Name
{
get
@@ -62,19 +62,19 @@ namespace FileConverter.ValueConverters
outputPath = outputPath.Replace("(i)", inputExtension);
outputPath = outputPath.Replace("(I)", inputExtension.ToUpperInvariant());
string myDocumentsFolder = System.Environment.GetFolderPath((System.Environment.SpecialFolder.MyDocuments)) + "\\";
string myDocumentsFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments) + "\\";
outputPath = outputPath.Replace("(p:d)", myDocumentsFolder);
outputPath = outputPath.Replace("(p:documents)", myDocumentsFolder);
string myMusicFolder = System.Environment.GetFolderPath((System.Environment.SpecialFolder.MyMusic)) + "\\";
string myMusicFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyMusic) + "\\";
outputPath = outputPath.Replace("(p:m)", myMusicFolder);
outputPath = outputPath.Replace("(p:music)", myMusicFolder);
string myVideoFolder = System.Environment.GetFolderPath((System.Environment.SpecialFolder.MyVideos)) + "\\";
string myVideoFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyVideos) + "\\";
outputPath = outputPath.Replace("(p:v)", myVideoFolder);
outputPath = outputPath.Replace("(p:videos)", myVideoFolder);
string myPictureFolder = System.Environment.GetFolderPath((System.Environment.SpecialFolder.MyPictures)) + "\\";
string myPictureFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyPictures) + "\\";
outputPath = outputPath.Replace("(p:p)", myPictureFolder);
outputPath = outputPath.Replace("(p:pictures)", myPictureFolder);
@@ -1,4 +1,4 @@
// <copyright file="CollectionContainsElementToBool.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
// <copyright file="FormatStringConverter.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
namespace FileConverter.ValueConverters.Generic
{
+1 -1
View File
@@ -40,7 +40,7 @@ namespace FileConverter
}
}
}
catch (System.Exception exception)
catch (System.Exception)
{
throw;
}