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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+ help ?
+
+
+
-
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ help ?
+
+
-
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+ www.file-converter.org
+
+
+
+
+
+
+
+
+
+
+
+
+ See change log ...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/FileConverter/Windows/SettingsWindow.xaml.cs b/Application/FileConverter/Windows/SettingsWindow.xaml.cs
index 7944ca5..91b4baa 100644
--- a/Application/FileConverter/Windows/SettingsWindow.xaml.cs
+++ b/Application/FileConverter/Windows/SettingsWindow.xaml.cs
@@ -12,6 +12,8 @@ namespace FileConverter
using System.Windows.Input;
using FileConverter.Annotations;
+ using FileConverter.Commands;
+ using FileConverter.Upgrade;
using Microsoft.Win32;
///
@@ -24,6 +26,11 @@ namespace FileConverter
private Settings settings;
private InputExtensionCategory[] inputCategories;
+ private string releaseNoteContent;
+
+ private OpenUrlCommand openUrlCommand;
+ private DelegateCommand getChangeLogContentCommand;
+ private bool displaySeeChangeLogLink = true;
public SettingsWindow()
{
@@ -68,6 +75,32 @@ namespace FileConverter
public event System.EventHandler OnSettingsWindowHide;
+ public ICommand OpenUrlCommand
+ {
+ get
+ {
+ if (this.openUrlCommand == null)
+ {
+ this.openUrlCommand = new OpenUrlCommand();
+ }
+
+ return this.openUrlCommand;
+ }
+ }
+
+ public ICommand GetChangeLogContentCommand
+ {
+ get
+ {
+ if (this.getChangeLogContentCommand == null)
+ {
+ this.getChangeLogContentCommand = new DelegateCommand(this.DownloadChangeLogAction);
+ }
+
+ return this.getChangeLogContentCommand;
+ }
+ }
+
public ConversionPreset SelectedPreset
{
get
@@ -128,12 +161,56 @@ namespace FileConverter
}
}
+ public string AboutSectionContent
+ {
+ get
+ {
+ return "**This program is free software**.\n You can redistribute it and/or modify it under the terms of the GNU General Public License.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. See the GNU General Public License (available in the installation folder: `LICENSE.md`) for more details.\n\n" + this.releaseNoteContent;
+ }
+
+ set
+ {
+ this.releaseNoteContent = value;
+
+ this.OnPropertyChanged();
+ }
+ }
+
+ public bool DisplaySeeChangeLogLink
+ {
+ get
+ {
+ return this.displaySeeChangeLogLink;
+ }
+
+ private set
+ {
+ this.displaySeeChangeLogLink = value;
+
+ this.OnPropertyChanged();
+ }
+ }
+
[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
+ private void DownloadChangeLogAction()
+ {
+#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
+ Helpers.GetChangeLogAsync(new UpgradeVersionDescription(), this.OnChangeLogRetrieved);
+#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
+ this.AboutSectionContent = "###Downloading change log ...";
+ this.DisplaySeeChangeLogLink = false;
+ }
+
+ private void OnChangeLogRetrieved(UpgradeVersionDescription description)
+ {
+ this.AboutSectionContent = description.ChangeLog;
+ }
+
private void SelectedPresetPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "OutputType")
diff --git a/FileConverter.sln b/FileConverter.sln
index 1eb9171..edd6990 100644
--- a/FileConverter.sln
+++ b/FileConverter.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
-VisualStudioVersion = 14.0.24720.0
+VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileConverter", "Application\FileConverter\FileConverter.csproj", "{D27A76D2-43E4-43CC-9DA3-334B0B46F4E5}"
EndProject