diff --git a/Application/FileConverter/Application.xaml.cs b/Application/FileConverter/Application.xaml.cs
index 2a277af..09030db 100644
--- a/Application/FileConverter/Application.xaml.cs
+++ b/Application/FileConverter/Application.xaml.cs
@@ -122,8 +122,8 @@ namespace FileConverter
args[6] = @"D:\Test\Track03.mp3";
args[7] = @"D:\Test\Track04.mp3";
- //System.Array.Resize(ref args, 2);
- //args[1] = "--settings";
+ System.Array.Resize(ref args, 2);
+ args[1] = "--settings";
//System.Array.Resize(ref args, 5);
//args[1] = "--conversion-preset";
@@ -304,7 +304,7 @@ namespace FileConverter
Thread.Sleep(50);
}
- if (this.Settings.QuitApplicationWhenConversionsFinished)
+ if (this.Settings.ExitApplicationWhenConversionsFinished)
{
bool allConversionsSucceed = true;
for (int index = 0; index < this.conversionJobs.Count; index++)
@@ -314,7 +314,7 @@ namespace FileConverter
if (allConversionsSucceed)
{
- System.Threading.Thread.Sleep((int)this.Settings.DurationBetweenEndOfConversionsAndApplicationQuit * 1000);
+ System.Threading.Thread.Sleep((int)this.Settings.DurationBetweenEndOfConversionsAndApplicationExit * 1000);
if (this.cancelAutoExit)
{
diff --git a/Application/FileConverter/Diagnostics/Debug.cs b/Application/FileConverter/Diagnostics/Debug.cs
index e3c0954..55f4a14 100644
--- a/Application/FileConverter/Diagnostics/Debug.cs
+++ b/Application/FileConverter/Diagnostics/Debug.cs
@@ -24,7 +24,7 @@ namespace FileConverter.Diagnostics
{
string path = PathHelpers.GetUserDataFolderPath();
- // Delete old diagnostics folder.
+ // Delete old diagnostics folder (1 day).
DateTime expirationDate = DateTime.Now.Subtract(new TimeSpan(1, 0, 0, 0));
string[] diagnosticsDirectories = Directory.GetDirectories(path, "Diagnostics.*");
for (int index = 0; index < diagnosticsDirectories.Length; index++)
diff --git a/Application/FileConverter/Settings.Settings.cs b/Application/FileConverter/Settings.Settings.cs
index 9ab75e2..0b54fcc 100644
--- a/Application/FileConverter/Settings.Settings.cs
+++ b/Application/FileConverter/Settings.Settings.cs
@@ -1,18 +1,26 @@
// License: http://www.gnu.org/licenses/gpl.html GPL version 3.
-using System.Linq;
-
namespace FileConverter
{
+ using System.Linq;
using System.Collections.ObjectModel;
using System.Xml.Serialization;
public partial class Settings : IXmlSerializable
{
- private bool quitApplicationWhenConversionsFinished = true;
- private float durationBetweenEndOfConversionsAndApplicationQuit = 3f;
+ private double settingsWindowHeight = 640;
+ private double settingsWindowWidth = 800;
+ private bool exitApplicationWhenConversionsFinished = true;
+ private float durationBetweenEndOfConversionsAndApplicationExit = 3f;
private ObservableCollection conversionPresets = new ObservableCollection();
-
+
+ [XmlAttribute]
+ public int SerializationVersion
+ {
+ get;
+ set;
+ } = 0;
+
[XmlIgnore]
public ObservableCollection ConversionPresets
{
@@ -27,33 +35,33 @@ namespace FileConverter
this.OnPropertyChanged();
}
}
-
+
[XmlElement]
- public bool QuitApplicationWhenConversionsFinished
+ public bool ExitApplicationWhenConversionsFinished
{
get
{
- return this.quitApplicationWhenConversionsFinished;
+ return this.exitApplicationWhenConversionsFinished;
}
set
{
- this.quitApplicationWhenConversionsFinished = value;
+ this.exitApplicationWhenConversionsFinished = value;
this.OnPropertyChanged();
}
}
[XmlElement]
- public float DurationBetweenEndOfConversionsAndApplicationQuit
+ public float DurationBetweenEndOfConversionsAndApplicationExit
{
get
{
- return this.durationBetweenEndOfConversionsAndApplicationQuit;
+ return this.durationBetweenEndOfConversionsAndApplicationExit;
}
set
{
- this.durationBetweenEndOfConversionsAndApplicationQuit = value;
+ this.durationBetweenEndOfConversionsAndApplicationExit = value;
this.OnPropertyChanged();
}
}
@@ -77,6 +85,8 @@ namespace FileConverter
public void OnDeserializationComplete()
{
+ this.DurationBetweenEndOfConversionsAndApplicationExit = System.Math.Max(0, System.Math.Min(10, this.DurationBetweenEndOfConversionsAndApplicationExit));
+
for (int index = 0; index < this.ConversionPresets.Count; index++)
{
this.ConversionPresets[index].OnDeserializationComplete();
diff --git a/Application/FileConverter/Settings.xml b/Application/FileConverter/Settings.xml
index d821028..8797721 100644
--- a/Application/FileConverter/Settings.xml
+++ b/Application/FileConverter/Settings.xml
@@ -1,55 +1,164 @@
-
-
- flac
- ape
- wav
- wma
- m4a
+
+ true
+ 3
+
avi
+ bik
+ flv
+ mkv
+ mov
mp4
- mp3
- aiff
None
-
+
+
+
(p)(f)
-
- ogg
- flac
- ape
- wav
- wma
- m4a
- mp4
+
avi
- aiff
+ bik
+ flv
+ mkv
+ mov
+ mp4
None
-
-
+
+
+
+ (p)(f)
+
+
+ aac
+ aiff
+ ape
+ flac
+ m4a
+ mp3
+ wma
+ avi
+ bik
+ flv
+ mkv
+ mov
+ mp4
+ wav
+ None
+
(p)(f)
- ape
- wav
avi
+ bik
+ flv
+ mkv
+ mov
mp4
- aiff
+ wav
+ ape
None
(p)(f)
+ aac
+ aiff
ape
flac
+ m4a
mp3
ogg
wma
avi
+ bik
+ flv
+ mkv
+ mov
mp4
- m4a
- aiff
None
-
+
+ (p)(f)
+
+
+ aac
+ aiff
+ ape
+ flac
+ m4a
+ ogg
+ wma
+ avi
+ bik
+ flv
+ mkv
+ mov
+ mp4
+ wav
+ None
+
+
+ (p)(f)
+
+
+ aiff
+ ape
+ m4a
+ mp3
+ ogg
+ wma
+ avi
+ bik
+ flv
+ mkv
+ mov
+ mp4
+ wav
+ flac
+ None
+ (p)(f)
+
+
+ cda
+ None
+ (p:m)CDA Extraction\(f)
+
+
+ cda
+ None
+
+ (p:m)CDA Extraction\(f)
+
+
+ cda
+ None
+
+
+ (p:m)CDA Extraction\(f)
+
+
+ bmp
+ tiff
+ ico
+ jpg
+ jpeg
+ None
+ (p)(f)
+
+
+ bmp
+ png
+ tiff
+ ico
+ None
+
+ (p)(f)
+
+
+ bmp
+ jpg
+ jpeg
+ png
+ tiff
+ None
(p)(f)
\ No newline at end of file
diff --git a/Application/FileConverter/Windows/SettingsWindow.xaml b/Application/FileConverter/Windows/SettingsWindow.xaml
index 8ef9cf2..53d1926 100644
--- a/Application/FileConverter/Windows/SettingsWindow.xaml
+++ b/Application/FileConverter/Windows/SettingsWindow.xaml
@@ -7,15 +7,14 @@
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"
- Width="800" Height="600" MinWidth="640" MinHeight="480"
+ MinWidth="640" MinHeight="480"
+ Width="800" Height="600"
WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico"
Closing="SettingsWindow_OnClosing">
-
-
@@ -175,7 +174,7 @@
-
+
@@ -207,8 +206,8 @@
-
+
@@ -232,7 +231,7 @@
-
+
@@ -345,10 +344,10 @@
-
+
-
+
diff --git a/Installer/Product.wxs b/Installer/Product.wxs
index c75c84b..4388b51 100644
--- a/Installer/Product.wxs
+++ b/Installer/Product.wxs
@@ -10,14 +10,16 @@
+
-
+
-
+
+
@@ -80,35 +82,71 @@
+
+
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
-
+
-
+
+
+
+
+
+
+
-
+
-
+