diff --git a/Application/FileConverter/FileConverter.csproj b/Application/FileConverter/FileConverter.csproj
index 7176ab3..3a6d136 100644
--- a/Application/FileConverter/FileConverter.csproj
+++ b/Application/FileConverter/FileConverter.csproj
@@ -109,6 +109,7 @@
+
diff --git a/Application/FileConverter/ValueConverters/Generic/BoolToVisibility.cs b/Application/FileConverter/ValueConverters/Generic/BoolToVisibility.cs
index f3cd532..5ecfbcc 100644
--- a/Application/FileConverter/ValueConverters/Generic/BoolToVisibility.cs
+++ b/Application/FileConverter/ValueConverters/Generic/BoolToVisibility.cs
@@ -15,9 +15,13 @@ namespace FileConverter.ValueConverters.Generic
throw new ArgumentException("The value must be a boolean.");
}
+ string stringParameter = parameter as string;
+
+ string falseResult = stringParameter ?? "Hidden";
+
bool booleanValue = (bool)value;
- return booleanValue ? "Visible" : "Hidden";
+ return booleanValue ? "Visible" : falseResult;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
diff --git a/Application/FileConverter/ValueConverters/Generic/DoubleToTimeString.cs b/Application/FileConverter/ValueConverters/Generic/DoubleToTimeString.cs
new file mode 100644
index 0000000..30d0800
--- /dev/null
+++ b/Application/FileConverter/ValueConverters/Generic/DoubleToTimeString.cs
@@ -0,0 +1,28 @@
+// License: http://www.gnu.org/licenses/gpl.html GPL version 3.
+
+namespace FileConverter.ValueConverters.Generic
+{
+ using System;
+ using System.Globalization;
+ using System.Windows.Data;
+
+ public class DoubleToTimeString : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (!(value is double))
+ {
+ throw new ArgumentException("The value must be a boolean.");
+ }
+
+ double doubleValue = (double)value;
+
+ return string.Format("{0} second{1}", doubleValue.ToString("0.#"), doubleValue >= 2 ? "s" : string.Empty);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Application/FileConverter/Windows/SettingsWindow.xaml b/Application/FileConverter/Windows/SettingsWindow.xaml
index a110c47..8ef9cf2 100644
--- a/Application/FileConverter/Windows/SettingsWindow.xaml
+++ b/Application/FileConverter/Windows/SettingsWindow.xaml
@@ -7,10 +7,11 @@
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"
- Height="600" Width="800" MinHeight="480" MinWidth="640"
+ Width="800" Height="600" MinWidth="640" MinHeight="480"
WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico"
Closing="SettingsWindow_OnClosing">
+
@@ -99,7 +100,7 @@
-
+
@@ -182,9 +183,11 @@
+
+
@@ -195,12 +198,13 @@
+
@@ -339,8 +343,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/FileConverter/Windows/SettingsWindow.xaml.cs b/Application/FileConverter/Windows/SettingsWindow.xaml.cs
index 8ce224d..7a89af4 100644
--- a/Application/FileConverter/Windows/SettingsWindow.xaml.cs
+++ b/Application/FileConverter/Windows/SettingsWindow.xaml.cs
@@ -31,7 +31,7 @@ namespace FileConverter
this.InitializeComponent();
Application application = Application.Current as Application;
- this.settings = application.Settings;
+ this.ApplicationSettings = application.Settings;
this.PresetList.ItemsSource = this.settings.ConversionPresets;
OutputType[] outputTypes = new[]
@@ -99,6 +99,20 @@ namespace FileConverter
}
}
+ public Settings ApplicationSettings
+ {
+ get
+ {
+ return this.settings;
+ }
+
+ set
+ {
+ this.settings = value;
+ this.OnPropertyChanged();
+ }
+ }
+
public IEnumerable InputCategories
{
get