diff --git a/Application/FileConverter/Application.xaml.cs b/Application/FileConverter/Application.xaml.cs index e89a2d6..7ded5c8 100644 --- a/Application/FileConverter/Application.xaml.cs +++ b/Application/FileConverter/Application.xaml.cs @@ -1,7 +1,7 @@ // License: http://www.gnu.org/licenses/gpl.html GPL version 3. /* File Converter - This program allow you to convert file format to another. - Copyright (C) 2015 Adrien Allard + Copyright (C) 2016 Adrien Allard email: adrien.allard.pro@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Application/FileConverter/ConversionJobs/CancelConversionJobCommand.cs b/Application/FileConverter/Commands/CancelConversionJobCommand.cs similarity index 92% rename from Application/FileConverter/ConversionJobs/CancelConversionJobCommand.cs rename to Application/FileConverter/Commands/CancelConversionJobCommand.cs index 7fb2ef5..1244ea9 100644 --- a/Application/FileConverter/ConversionJobs/CancelConversionJobCommand.cs +++ b/Application/FileConverter/Commands/CancelConversionJobCommand.cs @@ -1,9 +1,10 @@ // License: http://www.gnu.org/licenses/gpl.html GPL version 3. -namespace FileConverter.ConversionJobs +namespace FileConverter.Commands { using System; using System.Windows.Input; + using FileConverter.ConversionJobs; public class CancelConversionJobCommand : ICommand { diff --git a/Application/FileConverter/Commands/DelegateCommand.cs b/Application/FileConverter/Commands/DelegateCommand.cs new file mode 100644 index 0000000..31569ca --- /dev/null +++ b/Application/FileConverter/Commands/DelegateCommand.cs @@ -0,0 +1,46 @@ +// License: http://www.gnu.org/licenses/gpl.html GPL version 3. + +namespace FileConverter.Commands +{ + using System; + using System.Windows.Input; + + public class DelegateCommand : ICommand + { + private Action executeMethod; + private Func canExecuteMethod; + + public DelegateCommand(Action executeMethod) + { + if (executeMethod == null) + { + throw new ArgumentNullException(nameof(executeMethod)); + } + + this.executeMethod = executeMethod; + } + + public DelegateCommand(Action executeMethod, Func canExecuteMethod) + { + this.executeMethod = executeMethod; + this.canExecuteMethod = canExecuteMethod; + } + + public event EventHandler CanExecuteChanged; + + public bool CanExecute(object parameter) + { + if (this.canExecuteMethod != null) + { + return this.canExecuteMethod.Invoke(); + } + + return true; + } + + public void Execute(object parameter) + { + this.executeMethod.Invoke(); + } + } +} \ No newline at end of file diff --git a/Application/FileConverter/Commands/OpenUrlCommand.cs b/Application/FileConverter/Commands/OpenUrlCommand.cs new file mode 100644 index 0000000..4c8fe92 --- /dev/null +++ b/Application/FileConverter/Commands/OpenUrlCommand.cs @@ -0,0 +1,33 @@ +// License: http://www.gnu.org/licenses/gpl.html GPL version 3. + +namespace FileConverter.Commands +{ + using System; + using System.Diagnostics; + using System.Windows.Input; + + public class OpenUrlCommand : ICommand + { + public OpenUrlCommand() + { + } + + public event EventHandler CanExecuteChanged; + + public bool CanExecute(object parameter) + { + return true; + } + + public void Execute(object parameter) + { + string url = parameter as string; + if (string.IsNullOrEmpty(url)) + { + return; + } + + Process.Start(url); + } + } +} \ No newline at end of file diff --git a/Application/FileConverter/ConversionJobs/ConversionJob.cs b/Application/FileConverter/ConversionJobs/ConversionJob.cs index 63cc122..d7b12af 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob.cs @@ -7,6 +7,7 @@ namespace FileConverter.ConversionJobs using System.Runtime.CompilerServices; using System.Text; + using FileConverter.Commands; using FileConverter.Diagnostics; public class ConversionJob : INotifyPropertyChanged diff --git a/Application/FileConverter/FileConverter.csproj b/Application/FileConverter/FileConverter.csproj index 3210eb6..3dbe087 100644 --- a/Application/FileConverter/FileConverter.csproj +++ b/Application/FileConverter/FileConverter.csproj @@ -88,10 +88,12 @@ Designer + + EncodingQualitySliderControl.xaml - + @@ -247,6 +249,18 @@ + + + + + + + + + + + + copy /Y "$(SolutionDir)Middleware\ffmpeg.exe" "$(TargetDir)ffmpeg.exe" diff --git a/Application/FileConverter/Resources/GitHub-Documentation-Icon.png b/Application/FileConverter/Resources/GitHub-Documentation-Icon.png new file mode 100644 index 0000000..dfebc8d Binary files /dev/null and b/Application/FileConverter/Resources/GitHub-Documentation-Icon.png differ diff --git a/Application/FileConverter/Resources/GitHub-Icon.png b/Application/FileConverter/Resources/GitHub-Icon.png new file mode 100644 index 0000000..958872a Binary files /dev/null and b/Application/FileConverter/Resources/GitHub-Icon.png differ diff --git a/Application/FileConverter/Resources/GitHub-Issue-Icon.png b/Application/FileConverter/Resources/GitHub-Issue-Icon.png new file mode 100644 index 0000000..2c4a560 Binary files /dev/null and b/Application/FileConverter/Resources/GitHub-Issue-Icon.png differ diff --git a/Application/FileConverter/Resources/Pledge-icon.png b/Application/FileConverter/Resources/Pledge-icon.png new file mode 100644 index 0000000..a032ffb Binary files /dev/null and b/Application/FileConverter/Resources/Pledge-icon.png differ diff --git a/Application/FileConverter/Windows/SettingsWindow.xaml b/Application/FileConverter/Windows/SettingsWindow.xaml index d19272a..5423c53 100644 --- a/Application/FileConverter/Windows/SettingsWindow.xaml +++ b/Application/FileConverter/Windows/SettingsWindow.xaml @@ -6,12 +6,123 @@ xmlns:generic="clr-namespace:FileConverter.ValueConverters.Generic" xmlns:windows="clr-namespace:FileConverter.Windows" xmlns:project="clr-namespace:FileConverter.Properties" - xmlns:System="clr-namespace:System;assembly=mscorlib" x:Name="window" x:Class="FileConverter.SettingsWindow" + xmlns:System="clr-namespace:System;assembly=mscorlib" + xmlns:xaml="clr-namespace:Markdown.Xaml;assembly=Markdown.Xaml" + x:Name="window" x:Class="FileConverter.SettingsWindow" MinWidth="640" MinHeight="480" Width="900" Height="675" WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico" Closing="SettingsWindow_OnClosing"> + + + + + + + + + + + + + + + + + + + + + @@ -474,14 +585,13 @@ - + - - + @@ -496,158 +606,240 @@ - - - - - - - - - - - - - - - - - - + + + +