Merge pull request #131 from Tichau/feature/ux

UX improvements
This commit is contained in:
Adrien Allard authored and GitHub committed 2021-03-06 23:24:13 +01:00
commit 41d24d49f7
100 files changed
+1385 -1034

No files matched your search

+49 -47
View File
@@ -9,67 +9,69 @@
xmlns:services="clr-namespace:FileConverter.Services"
ShutdownMode="OnLastWindowClose">
<Application.Resources>
<!--Global View Model Locator-->
<viewModels:ViewModelLocator x:Key="Locator" />
<services:NavigationService x:Key="Navigation" />
<services:ConversionService x:Key="Conversions" />
<services:SettingsService x:Key="Settings" />
<services:UpgradeService x:Key="Upgrade" />
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Views/Resources/Colors.xaml"/>
<ResourceDictionary Source="Views/Resources/CustomStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!-- Markdown style -->
<Style TargetType="FlowDocument" x:Key="DocumentStyle">
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="Foreground" Value="#786C71" />
<Setter Property="Background" Value="White" />
<Setter Property="LineHeight" Value="9"/>
<Setter Property="FontSize" Value="13" />
</Style>
<!--Global View Model Locator-->
<viewModels:ViewModelLocator x:Key="Locator" />
<services:NavigationService x:Key="Navigation" />
<services:ConversionService x:Key="Conversions" />
<services:SettingsService x:Key="Settings" />
<services:UpgradeService x:Key="Upgrade" />
<Style x:Key="PageHeader" TargetType="Paragraph">
<Setter Property="FontSize" Value="24" />
<Setter Property="Foreground" Value="#1E6BB8" />
</Style>
<!-- Markdown style -->
<Style TargetType="FlowDocument" x:Key="DocumentStyle">
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="Foreground" Value="{StaticResource LighterForegroundBrush}" />
<Setter Property="Background" Value="{StaticResource BackgroundBrush}" />
<Setter Property="LineHeight" Value="9"/>
<Setter Property="FontSize" Value="13" />
</Style>
<Style x:Key="SubHeader"
<Style x:Key="PageHeader" TargetType="Paragraph">
<Setter Property="FontSize" Value="24" />
<Setter Property="Foreground" Value="{StaticResource MainBrush}" />
</Style>
<Style x:Key="SubHeader"
TargetType="Paragraph">
<Setter Property="FontSize"
Value="20" />
<Setter Property="Foreground"
Value="#DF3900" />
</Style>
<Setter Property="FontSize" Value="20" />
<Setter Property="Foreground" Value="{StaticResource AccentForegroundBrush}" />
</Style>
<Style x:Key="SubHeaderSecondary"
<Style x:Key="SubHeaderSecondary"
TargetType="Paragraph">
<Setter Property="FontSize"
Value="20" />
<Setter Property="Foreground"
Value="#DF3900" />
</Style>
<Setter Property="FontSize" Value="20" />
<Setter Property="Foreground" Value="{StaticResource AccentForegroundBrush}" />
</Style>
<xaml:Markdown x:Key="Markdown"
<xaml:Markdown x:Key="Markdown"
DocumentStyle="{StaticResource DocumentStyle}"
Heading1Style="{StaticResource PageHeader}"
Heading2Style="{StaticResource SubHeader}"
Heading3Style="{StaticResource SubHeaderSecondary}"/>
<!-- Converters -->
<valueConverters:ApplicationVersionToApplicationName x:Key="ApplicationVersionToApplicationName"/>
<generic:BoolToVisibility x:Key="BoolToVisibility"/>
<!-- Converters -->
<valueConverters:ApplicationVersionToApplicationName x:Key="ApplicationVersionToApplicationName"/>
<generic:BoolToVisibility x:Key="BoolToVisibility"/>
<generic:ValueConverterGroup x:Key="EnumEqualsToVisibility">
<generic:ValueToString/>
<generic:EqualsConverter/>
<generic:BoolToVisibility/>
</generic:ValueConverterGroup>
<generic:ValueConverterGroup x:Key="EnumEqualsToVisibility">
<generic:ValueToString/>
<generic:EqualsConverter/>
<generic:BoolToVisibility/>
</generic:ValueConverterGroup>
<valueConverters:ConversionStateToBrush x:Key="ConversionStateToBrush" />
<valueConverters:ConversionJobToEstimatedRemainingDuration x:Key="ConversionJobToEstimatedRemainingDuration" />
<valueConverters:ConversionStateToBrush x:Key="ConversionStateToBrush" />
<valueConverters:ConversionJobToEstimatedRemainingDuration x:Key="ConversionJobToEstimatedRemainingDuration" />
<generic:ValueConverterGroup x:Key="ChangelogToMarkdown">
<valueConverters:ChangelogConverter/>
<xaml:TextToFlowDocumentConverter Markdown="{StaticResource Markdown}"/>
</generic:ValueConverterGroup>
<generic:ValueConverterGroup x:Key="ChangelogToMarkdown">
<valueConverters:ChangelogConverter/>
<xaml:TextToFlowDocumentConverter Markdown="{StaticResource Markdown}"/>
</generic:ValueConverterGroup>
</ResourceDictionary>
</Application.Resources>
</Application>
@@ -8,17 +8,10 @@
mc:Ignorable="d"
d:DesignHeight="100" d:DesignWidth="800"
d:DataContext="{d:DesignData /SampleData/ConversionJobSampleData.xaml}">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Views/Resources/CustomStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid Background="{Binding State, Converter={StaticResource ConversionStateToBrush}, ConverterParameter=Background}" Margin="0,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="70"/>
<ColumnDefinition Width="64"/>
</Grid.ColumnDefinitions>
<Grid Margin="10" Grid.Column="0">
@@ -44,7 +37,7 @@
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding UserState}" FontWeight="Bold" Foreground="{Binding State, ConverterParameter=Foreground, Converter={StaticResource ConversionStateToBrush}}" />
<StackPanel Grid.Row="1" Grid.Column="1">
<ProgressBar Grid.Row="1" Grid.Column="1" Height="18" Width="Auto" Minimum="0" Maximum="1" SmallChange="0.001" Value="{Binding Progress, Mode=OneWay}" Foreground="{Binding State, ConverterParameter=Foreground, Converter={StaticResource ConversionStateToBrush}, Mode=OneWay}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" MinWidth="100" LargeChange="0.1" />
<ProgressBar Height="18" Width="Auto" Minimum="0" Maximum="1" SmallChange="0.001" Value="{Binding Progress, Mode=OneWay}" Foreground="{Binding State, ConverterParameter=Foreground, Converter={StaticResource ConversionStateToBrush}, Mode=OneWay}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" MinWidth="100" LargeChange="0.1" />
<TextBlock Foreground="{Binding State, ConverterParameter=Foreground, Converter={StaticResource ConversionStateToBrush}}">
<TextBlock.Text>
<MultiBinding Converter="{StaticResource ConversionJobToEstimatedRemainingDuration}" Mode="OneWay">
@@ -57,10 +50,15 @@
</StackPanel>
</Grid>
<Button Margin="5" Grid.Column="1" Background="WhiteSmoke" Foreground="#FF3E3E3E" Visibility="{Binding State, ConverterParameter=|InProgress|Collapsed, Converter={StaticResource EnumEqualsToVisibility}}" Command="{Binding CancelCommand}" ToolTip="Cancel">
<Image Source="/FileConverter;component/Resources/CancelIcon.png" Width="48" Height="48" Style="{StaticResource EnableDisableImageStyle}" />
<Button Margin="3" Grid.Column="1" Height="57"
Visibility="{Binding State, ConverterParameter=|InProgress|Collapsed, Converter={StaticResource EnumEqualsToVisibility}}"
Command="{Binding CancelCommand}" ToolTip="{x:Static project:Resources.CancelJobTooltip}">
<Image Source="/FileConverter;component/Resources/CancelIcon.png" Width="48" Height="48"
Style="{StaticResource EnableDisableImageStyle}" />
</Button>
<Image Margin="5" Grid.Column="1" Source="/FileConverter;component/Resources/SuccessIcon.png" Width="48" Height="48" Visibility="{Binding State, ConverterParameter=|Done|Collapsed, Converter={StaticResource EnumEqualsToVisibility}}"/>
<Image Margin="5" Grid.Column="1" Source="/FileConverter;component/Resources/FailIcon.png" Width="48" Height="48" Visibility="{Binding State, ConverterParameter=|Failed|Collapsed, Converter={StaticResource EnumEqualsToVisibility}}"/>
<Image Margin="3" Grid.Column="1" Source="/FileConverter;component/Resources/SuccessIcon.png" Width="48" Height="48"
Visibility="{Binding State, ConverterParameter=|Done|Collapsed, Converter={StaticResource EnumEqualsToVisibility}}"/>
<Image Margin="3" Grid.Column="1" Source="/FileConverter;component/Resources/FailIcon.png" Width="48" Height="48"
Visibility="{Binding State, ConverterParameter=|Failed|Collapsed, Converter={StaticResource EnumEqualsToVisibility}}"/>
</Grid>
</UserControl>
@@ -5,12 +5,12 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:valueConverters="clr-namespace:FileConverter.ValueConverters"
xmlns:project="clr-namespace:FileConverter.Properties"
x:Name="userControl"
x:Class="FileConverter.Controls.EncodingQualitySliderControl"
mc:Ignorable="d" d:DesignWidth="300" Height="50">
<UserControl.Resources>
<valueConverters:BitrateToString x:Key="BitrateToString"/>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -21,8 +21,10 @@
<ColumnDefinition Width="65"/>
</Grid.ColumnDefinitions>
<Slider Grid.Column="0" x:Name="slider" Margin="0,2,0,0" VerticalAlignment="Top" Maximum="245" AutoToolTipPlacement="TopLeft" SmallChange="8" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="115" SelectionEnd="245" Minimum="65" TickPlacement="BottomRight" LargeChange="32" TickFrequency="8" Ticks="65 85 100 115 130 165 175 190 225 245" Foreground="#004B82" />
<Label Grid.Column="1" Content="{Binding Value, Converter={StaticResource BitrateToString}, ElementName=slider, Mode=OneWay}" Width="65" />
<Label Grid.Column="0" Grid.Row="1" Content="{x:Static project:Resources.RecommendeBitrateRangeInBlue}" Foreground="#E5004B82" FontSize="11" />
<Slider x:Name="slider" Grid.Column="0" Margin="0,2,0,0" VerticalAlignment="Top"
AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" Minimum="65" Maximum="245" SelectionStart="115" SelectionEnd="245" SmallChange="8" LargeChange="32" TickPlacement="BottomRight" TickFrequency="8" Ticks="65 85 100 115 130 165 175 190 225 245"
Foreground="{StaticResource MainDarkBrush}" />
<Label Grid.Row="0" Grid.Column="1" Content="{Binding Value, Converter={StaticResource BitrateToString}, ElementName=slider, Mode=OneWay}" Width="65" />
<Label Grid.Column="0" Grid.Row="1" Content="{x:Static project:Resources.RecommendedBitrateRangeInBlue}" Foreground="{StaticResource MainDarkBrush}" FontSize="11" />
</Grid>
</UserControl>
@@ -2,7 +2,6 @@
namespace FileConverter.Controls
{
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
@@ -0,0 +1,38 @@
// <copyright file="IconButton.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
namespace FileConverter.Controls
{
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
public class IconButton : Button
{
public static readonly DependencyProperty IconSourceProperty = DependencyProperty.Register("IconSource", typeof(ImageSource), typeof(IconButton));
public static readonly DependencyProperty MouseOverBrushProperty = DependencyProperty.Register("MouseOverBrush", typeof(Brush), typeof(IconButton));
public static readonly DependencyProperty PressedBrushProperty = DependencyProperty.Register("PressedBrush", typeof(Brush), typeof(IconButton));
static IconButton()
{
FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata(typeof(IconButton), new FrameworkPropertyMetadata(typeof(IconButton)));
}
public ImageSource IconSource
{
get => (ImageSource)this.GetValue(IconButton.IconSourceProperty);
set => this.SetValue(IconButton.IconSourceProperty, value);
}
public Brush MouseOverBrush
{
get => (Brush)this.GetValue(IconButton.MouseOverBrushProperty);
set => this.SetValue(IconButton.MouseOverBrushProperty, value);
}
public Brush PressedBrush
{
get => (Brush)this.GetValue(IconButton.PressedBrushProperty);
set => this.SetValue(IconButton.PressedBrushProperty, value);
}
}
}
@@ -20,7 +20,7 @@ namespace FileConverter.ConversionJobs
private string userState = string.Empty;
private RelayCommand cancelCommand;
private string initialInputPath;
private readonly string initialInputPath;
private int currentOutputFilePathIndex;
public ConversionJob()
@@ -101,10 +101,7 @@ namespace FileConverter.ConversionJobs
public string UserState
{
get
{
return this.userState;
}
get => this.userState;
protected set
{
@@ -115,10 +112,7 @@ namespace FileConverter.ConversionJobs
public float Progress
{
get
{
return this.progress;
}
get => this.progress;
protected set
{
@@ -127,12 +121,9 @@ namespace FileConverter.ConversionJobs
}
}
public System.DateTime StartTime
public DateTime StartTime
{
get
{
return this.startTime;
}
get => this.startTime;
protected set
{
@@ -143,10 +134,7 @@ namespace FileConverter.ConversionJobs
public string ErrorMessage
{
get
{
return this.errorMessage;
}
get => this.errorMessage;
private set
{
@@ -182,10 +170,7 @@ namespace FileConverter.ConversionJobs
protected int CurrentOutputFilePathIndex
{
get
{
return this.currentOutputFilePathIndex;
}
get => this.currentOutputFilePathIndex;
set
{
@@ -207,6 +192,8 @@ namespace FileConverter.ConversionJobs
}
}
protected virtual bool IsCancelable => this.State == ConversionState.InProgress;
protected string[] OutputFilePaths
{
get;
@@ -376,7 +363,7 @@ namespace FileConverter.ConversionJobs
public virtual void Cancel()
{
if (!this.IsCancelable())
if (!this.IsCancelable)
{
return;
}
@@ -385,11 +372,6 @@ namespace FileConverter.ConversionJobs
this.ConversionFailed(Properties.Resources.ErrorCanceled);
}
protected virtual bool IsCancelable()
{
return this.State == ConversionState.InProgress;
}
protected virtual int GetOutputFilesCount()
{
return 1;
@@ -26,18 +26,9 @@ namespace FileConverter.ConversionJobs
{
}
protected override ApplicationName Application
{
get
{
return ApplicationName.Excel;
}
}
protected override ApplicationName Application => ApplicationName.Excel;
protected override bool IsCancelable()
{
return false;
}
protected override bool IsCancelable => false;
protected override int GetOutputFilesCount()
{
@@ -16,7 +16,7 @@ namespace FileConverter.ConversionJobs
return string.Empty;
}
return string.Format("{0} \"{1}\"", optionName, args);
return $"{optionName} \"{args}\"";
}
/// <summary>
@@ -21,7 +21,7 @@ namespace FileConverter.ConversionJobs
private ProcessStartInfo ffmpegProcessStartInfo;
private List<FFMpegPass> ffmpegArgumentStringByPass = new List<FFMpegPass>();
private readonly List<FFMpegPass> ffmpegArgumentStringByPass = new List<FFMpegPass>();
public ConversionJob_FFMPEG() : base()
{
@@ -72,12 +72,13 @@ namespace FileConverter.ConversionJobs
return;
}
this.ffmpegProcessStartInfo = new ProcessStartInfo(ffmpegPath);
this.ffmpegProcessStartInfo.CreateNoWindow = true;
this.ffmpegProcessStartInfo.UseShellExecute = false;
this.ffmpegProcessStartInfo.RedirectStandardOutput = true;
this.ffmpegProcessStartInfo.RedirectStandardError = true;
this.ffmpegProcessStartInfo = new ProcessStartInfo(ffmpegPath)
{
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true
};
this.FillFFMpegArgumentsList();
}
@@ -26,10 +26,7 @@ namespace FileConverter.ConversionJobs
get;
}
protected override bool IsCancelable()
{
return false;
}
protected override bool IsCancelable => false;
protected override void Initialize()
{
@@ -27,18 +27,9 @@ namespace FileConverter.ConversionJobs
{
}
protected override ApplicationName Application
{
get
{
return ApplicationName.PowerPoint;
}
}
protected override ApplicationName Application => ApplicationName.PowerPoint;
protected override bool IsCancelable()
{
return false;
}
protected override bool IsCancelable => false;
protected override int GetOutputFilesCount()
{
@@ -26,18 +26,9 @@ namespace FileConverter.ConversionJobs
{
}
protected override ApplicationName Application
{
get
{
return ApplicationName.Word;
}
}
protected override ApplicationName Application => ApplicationName.Word;
protected override bool IsCancelable()
{
return false;
}
protected override bool IsCancelable => false;
protected override int GetOutputFilesCount()
{
@@ -4,16 +4,12 @@ namespace FileConverter
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Xml.Serialization;
using FileConverter.Controls;
using FileConverter.Services;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Ioc;
[XmlRoot]
[XmlType]
@@ -332,7 +328,7 @@ namespace FileConverter
{
if (string.IsNullOrEmpty(settingsKey))
{
throw new ArgumentNullException("key");
throw new ArgumentNullException(nameof(settingsKey));
}
if (value == null)
@@ -359,7 +355,7 @@ namespace FileConverter
{
if (string.IsNullOrEmpty(settingsKey))
{
throw new ArgumentNullException("key");
throw new ArgumentNullException(nameof(settingsKey));
}
if (this.settings.ContainsKey(settingsKey))
@@ -382,10 +378,10 @@ namespace FileConverter
Type type = typeof(T);
if (type.IsEnum)
{
return (T)System.Enum.Parse(type, settingsValue);
return (T)Enum.Parse(type, settingsValue);
}
return (T)System.Convert.ChangeType(settingsValue, type, NumberFormatInfo.InvariantInfo);
return (T)Convert.ChangeType(settingsValue, type, NumberFormatInfo.InvariantInfo);
}
public bool IsRelevantSetting(string settingsKey)
@@ -16,13 +16,7 @@ namespace FileConverter
this.value = value;
}
public int Count
{
get
{
return 1;
}
}
public int Count => 1;
public IEnumerable<string> Keys
{
+4 -10
View File
@@ -12,10 +12,10 @@ namespace FileConverter.Diagnostics
public static class Debug
{
private static string diagnosticsFolderPath;
private static Dictionary<int, DiagnosticsData> diagnosticsDataById = new Dictionary<int, DiagnosticsData>();
private static readonly string diagnosticsFolderPath;
private static readonly Dictionary<int, DiagnosticsData> diagnosticsDataById = new Dictionary<int, DiagnosticsData>();
private static int threadCount = 0;
private static int mainThreadId = 0;
private static readonly int mainThreadId = 0;
static Debug()
{
@@ -45,13 +45,7 @@ namespace FileConverter.Diagnostics
public static event EventHandler<PropertyChangedEventArgs> StaticPropertyChanged;
public static DiagnosticsData[] Data
{
get
{
return Debug.diagnosticsDataById.Values.ToArray();
}
}
public static DiagnosticsData[] Data => Debug.diagnosticsDataById.Values.ToArray();
public static void Log(string message, params object[] arguments)
{
@@ -13,8 +13,8 @@ namespace FileConverter.Diagnostics
public class DiagnosticsData : INotifyPropertyChanged
{
private List<string> logMessages = new List<string>();
private StringBuilder stringBuilder = new StringBuilder();
private readonly List<string> logMessages = new List<string>();
private readonly StringBuilder stringBuilder = new StringBuilder();
private System.IO.TextWriter logFileWriter;
private string name;
@@ -28,10 +28,7 @@ namespace FileConverter.Diagnostics
public string Name
{
get
{
return this.name;
}
get => this.name;
private set
{
@@ -62,7 +59,7 @@ namespace FileConverter.Diagnostics
public void Initialize(string diagnosticsFolderPath, int id)
{
string path = Path.Combine(diagnosticsFolderPath, string.Format("Diagnostics{0}.log", id));
string path = Path.Combine(diagnosticsFolderPath, $"Diagnostics{id}.log");
path = PathHelpers.GenerateUniquePath(path);
this.logFileWriter = new StreamWriter(File.Open(path, FileMode.Create));
@@ -81,7 +78,7 @@ namespace FileConverter.Diagnostics
this.logFileWriter.WriteLine(log);
this.logFileWriter.Flush();
this.OnPropertyChanged("Content");
this.OnPropertyChanged(nameof(this.Content));
}
[NotifyPropertyChangedInvocator]
+21 -6
View File
@@ -144,6 +144,7 @@
<Compile Include="Controls\ConversionJobControl.xaml.cs">
<DependentUpon>ConversionJobControl.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\IconButton.cs" />
<Compile Include="Controls\EncodingQualitySliderControl.xaml.cs">
<DependentUpon>EncodingQualitySliderControl.xaml</DependentUpon>
</Compile>
@@ -291,6 +292,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Resources\Colors.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Views\Resources\CustomStyles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -384,12 +389,6 @@
<ItemGroup>
<Resource Include="Resources\WebSite-Icon.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ItchIO-icon.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SayThanks-Icon.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FileConverterExtension\FileConverterExtension.csproj">
<Project>{0c44ca69-42d6-4357-bdfd-83069d1aba2f}</Project>
@@ -414,6 +413,22 @@
<ItemGroup>
<Resource Include="Resources\DeleteIcon.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\LogIcon.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\PaypalIcon.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\SayThanksIcon.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\ExportIcon.ico" />
<Resource Include="Resources\ImportIcon.ico" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DuplicatePresetIcon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy /Y "$(SolutionDir)Middleware\ffmpeg\$(PlatformName)\ffmpeg.exe" "$(TargetDir)ffmpeg.exe"
+3 -3
View File
@@ -129,7 +129,7 @@ namespace FileConverter
}
catch (Exception)
{
Debug.Log(string.Format("Can't create directories for path {0}", filePath));
Debug.Log($"Can't create directories for path {filePath}");
return false;
}
}
@@ -213,8 +213,8 @@ namespace FileConverter
for (int index = 0; index < directories.Length; index++)
{
outputPath = outputPath.Replace(string.Format("(d{0})", directories.Length - index - 1), directories[index]);
outputPath = outputPath.Replace(string.Format("(D{0})", directories.Length - index - 1), directories[index].ToUpperInvariant());
outputPath = outputPath.Replace($"(d{directories.Length - index - 1})", directories[index]);
outputPath = outputPath.Replace($"(D{directories.Length - index - 1})", directories[index].ToUpperInvariant());
}
outputPath = outputPath.Replace("(n:i)", numberIndex.ToString());
+55 -10
View File
@@ -19,7 +19,7 @@ namespace FileConverter.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
@@ -88,7 +88,7 @@ namespace FileConverter.Properties {
}
/// <summary>
/// Looks up a localized string similar to Add new preset (duplicate selected preset).
/// Looks up a localized string similar to New preset.
/// </summary>
public static string AddNewPreset {
get {
@@ -168,6 +168,15 @@ namespace FileConverter.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Cancel.
/// </summary>
public static string CancelJobTooltip {
get {
return ResourceManager.GetString("CancelJobTooltip", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Channel count :.
/// </summary>
@@ -313,7 +322,7 @@ namespace FileConverter.Properties {
}
/// <summary>
/// Looks up a localized string similar to Create a new folder..
/// Looks up a localized string similar to New folder.
/// </summary>
public static string CreateANewFolder {
get {
@@ -351,9 +360,9 @@ namespace FileConverter.Properties {
/// <summary>
/// Looks up a localized string similar to Logs.
/// </summary>
public static string DiagnosticsButtonTitle {
public static string DiagnosticsButtonTooltip {
get {
return ResourceManager.GetString("DiagnosticsButtonTitle", resourceCulture);
return ResourceManager.GetString("DiagnosticsButtonTooltip", resourceCulture);
}
}
@@ -411,6 +420,15 @@ namespace FileConverter.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Duplicate preset.
/// </summary>
public static string DuplicatePreset {
get {
return ResourceManager.GetString("DuplicatePreset", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Encoding :.
/// </summary>
@@ -636,6 +654,15 @@ namespace FileConverter.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Export.
/// </summary>
public static string ExportSelectedPresets {
get {
return ResourceManager.GetString("ExportSelectedPresets", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Custom Arguments.
/// </summary>
@@ -717,6 +744,15 @@ namespace FileConverter.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Import.
/// </summary>
public static string ImportPresets {
get {
return ResourceManager.GetString("ImportPresets", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Input example.
/// </summary>
@@ -897,6 +933,15 @@ namespace FileConverter.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to No preset selected.
/// </summary>
public static string NoPresetSelected {
get {
return ResourceManager.GetString("NoPresetSelected", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Ok.
/// </summary>
@@ -1024,14 +1069,14 @@ namespace FileConverter.Properties {
/// <summary>
/// Looks up a localized string similar to Recommended bitrate range in blue.
/// </summary>
public static string RecommendeBitrateRangeInBlue {
public static string RecommendedBitrateRangeInBlue {
get {
return ResourceManager.GetString("RecommendeBitrateRangeInBlue", resourceCulture);
return ResourceManager.GetString("RecommendedBitrateRangeInBlue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Remove selected preset.
/// Looks up a localized string similar to Delete.
/// </summary>
public static string RemoveSelectedPreset {
get {
@@ -1105,9 +1150,9 @@ namespace FileConverter.Properties {
/// <summary>
/// Looks up a localized string similar to Settings.
/// </summary>
public static string SettingsButtonTitle {
public static string SettingsButtonTooltip {
get {
return ResourceManager.GetString("SettingsButtonTitle", resourceCulture);
return ResourceManager.GetString("SettingsButtonTooltip", resourceCulture);
}
}
@@ -127,7 +127,7 @@
<value>Action when conversion succeed</value>
</data>
<data name="AddNewPreset" xml:space="preserve">
<value>Add new preset (duplicate selected preset)</value>
<value>New preset</value>
</data>
<data name="Application" xml:space="preserve">
<value>Application</value>
@@ -159,7 +159,7 @@
<data name="Diagnostics" xml:space="preserve">
<value>Logs</value>
</data>
<data name="DiagnosticsButtonTitle" xml:space="preserve">
<data name="DiagnosticsButtonTooltip" xml:space="preserve">
<value>Logs</value>
</data>
<data name="DocumentationButtonDescription" xml:space="preserve">
@@ -289,11 +289,11 @@ use maj for uppercase version</value>
<data name="Quality" xml:space="preserve">
<value>Quality :</value>
</data>
<data name="RecommendeBitrateRangeInBlue" xml:space="preserve">
<data name="RecommendedBitrateRangeInBlue" xml:space="preserve">
<value>Recommended bitrate range in blue</value>
</data>
<data name="RemoveSelectedPreset" xml:space="preserve">
<value>Remove selected preset</value>
<value>Delete</value>
</data>
<data name="Rotate" xml:space="preserve">
<value>Rotate :</value>
@@ -310,7 +310,7 @@ use maj for uppercase version</value>
<data name="Settings" xml:space="preserve">
<value>File Converter Settings</value>
</data>
<data name="SettingsButtonTitle" xml:space="preserve">
<data name="SettingsButtonTooltip" xml:space="preserve">
<value>Settings</value>
</data>
<data name="TwoSeventyDegreesRotationTitle" xml:space="preserve">
@@ -550,4 +550,25 @@ use maj for uppercase version</value>
<data name="ErrorDuringJobInitialization" xml:space="preserve">
<value>Error during conversion job initialization.</value>
</data>
<data name="ExportSelectedPresets" xml:space="preserve">
<value>Export</value>
</data>
<data name="ImportPresets" xml:space="preserve">
<value>Import</value>
</data>
<data name="DuplicatePreset" xml:space="preserve">
<value>Duplicate preset</value>
</data>
<data name="CancelJobTooltip" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="AdvancedMode" xml:space="preserve">
<value>Advanced mode</value>
</data>
<data name="FFMPEGCustomArguments" xml:space="preserve">
<value>Custom Arguments</value>
</data>
<data name="FFMPEGCustomArgumentsTooltip" xml:space="preserve">
<value>Custom FFMPEG command line arguments</value>
</data>
</root>
@@ -159,7 +159,7 @@
<data name="Diagnostics" xml:space="preserve">
<value>Registros</value>
</data>
<data name="DiagnosticsButtonTitle" xml:space="preserve">
<data name="DiagnosticsButtonTooltip" xml:space="preserve">
<value>Registros</value>
</data>
<data name="DocumentationButtonDescription" xml:space="preserve">
@@ -292,7 +292,7 @@ Use May para versión en mayúsculas</value>
<data name="Quality" xml:space="preserve">
<value>Calidad:</value>
</data>
<data name="RecommendeBitrateRangeInBlue" xml:space="preserve">
<data name="RecommendedBitrateRangeInBlue" xml:space="preserve">
<value>Rango de tasa de bits recomendado en azul</value>
</data>
<data name="RemoveSelectedPreset" xml:space="preserve">
@@ -313,7 +313,7 @@ Use May para versión en mayúsculas</value>
<data name="Settings" xml:space="preserve">
<value>Configuración</value>
</data>
<data name="SettingsButtonTitle" xml:space="preserve">
<data name="SettingsButtonTooltip" xml:space="preserve">
<value>Configuración</value>
</data>
<data name="TwoSeventyDegreesRotationTitle" xml:space="preserve">
@@ -161,7 +161,7 @@
<data name="Diagnostics" xml:space="preserve">
<value>Historique d'activité</value>
</data>
<data name="DiagnosticsButtonTitle" xml:space="preserve">
<data name="DiagnosticsButtonTooltip" xml:space="preserve">
<value>Historique d'activité</value>
</data>
<data name="DocumentationButtonDescription" xml:space="preserve">
@@ -300,7 +300,7 @@ utilisez maj pour une version en majuscules</value>
<data name="Quality" xml:space="preserve">
<value>Qualité :</value>
</data>
<data name="RecommendeBitrateRangeInBlue" xml:space="preserve">
<data name="RecommendedBitrateRangeInBlue" xml:space="preserve">
<value>Taux recommandés en bleu</value>
</data>
<data name="RemoveSelectedPreset" xml:space="preserve">
@@ -321,7 +321,7 @@ utilisez maj pour une version en majuscules</value>
<data name="Settings" xml:space="preserve">
<value>Configuration de File Converter</value>
</data>
<data name="SettingsButtonTitle" xml:space="preserve">
<data name="SettingsButtonTooltip" xml:space="preserve">
<value>Configuration</value>
</data>
<data name="TwoSeventyDegreesRotationTitle" xml:space="preserve">
@@ -568,4 +568,16 @@ utilisez maj pour une version en majuscules</value>
<data name="ErrorDuringJobInitialization" xml:space="preserve">
<value>L'initialisation du processus de conversion a échoué.</value>
</data>
<data name="CancelJobTooltip" xml:space="preserve">
<value>Annuler</value>
</data>
<data name="AdvancedMode" xml:space="preserve">
<value>Mode avancé</value>
</data>
<data name="FFMPEGCustomArguments" xml:space="preserve">
<value>Arguments personalisés</value>
</data>
<data name="FFMPEGCustomArgumentsTooltip" xml:space="preserve">
<value>Arguments de ligne de commande FFMPEG personalisés</value>
</data>
</root>
@@ -173,7 +173,7 @@
<value>Log</value>
<comment>Logs</comment>
</data>
<data name="DiagnosticsButtonTitle" xml:space="preserve">
<data name="DiagnosticsButtonTooltip" xml:space="preserve">
<value>Log</value>
<comment>Logs</comment>
</data>
@@ -361,7 +361,7 @@ use maj for uppercase version</comment>
<value>Qualità :</value>
<comment>Quality :</comment>
</data>
<data name="RecommendeBitrateRangeInBlue" xml:space="preserve">
<data name="RecommendedBitrateRangeInBlue" xml:space="preserve">
<value>In blu l'intervallo di bitrate consigliato</value>
<comment>Recommended bitrate range in blue</comment>
</data>
@@ -389,7 +389,7 @@ use maj for uppercase version</comment>
<value>Impostazioni</value>
<comment>Settings</comment>
</data>
<data name="SettingsButtonTitle" xml:space="preserve">
<data name="SettingsButtonTooltip" xml:space="preserve">
<value>Impostazioni</value>
<comment>Settings</comment>
</data>
@@ -159,7 +159,7 @@
<data name="Diagnostics" xml:space="preserve">
<value>Logs</value>
</data>
<data name="DiagnosticsButtonTitle" xml:space="preserve">
<data name="DiagnosticsButtonTooltip" xml:space="preserve">
<value>Logs</value>
</data>
<data name="DocumentationButtonDescription" xml:space="preserve">
@@ -292,7 +292,7 @@ Use maj para a versão em maiúsculas</value>
<data name="Quality" xml:space="preserve">
<value>Qualidade :</value>
</data>
<data name="RecommendeBitrateRangeInBlue" xml:space="preserve">
<data name="RecommendedBitrateRangeInBlue" xml:space="preserve">
<value>O bitrate recomendado está representado em azul</value>
</data>
<data name="RemoveSelectedPreset" xml:space="preserve">
@@ -313,7 +313,7 @@ Use maj para a versão em maiúsculas</value>
<data name="Settings" xml:space="preserve">
<value>Configurações</value>
</data>
<data name="SettingsButtonTitle" xml:space="preserve">
<data name="SettingsButtonTooltip" xml:space="preserve">
<value>Configurações</value>
</data>
<data name="TwoSeventyDegreesRotationTitle" xml:space="preserve">
@@ -159,7 +159,7 @@
<data name="Diagnostics" xml:space="preserve">
<value>Logs</value>
</data>
<data name="DiagnosticsButtonTitle" xml:space="preserve">
<data name="DiagnosticsButtonTooltip" xml:space="preserve">
<value>Logs</value>
</data>
<data name="DocumentationButtonDescription" xml:space="preserve">
@@ -292,7 +292,7 @@ Use maj para a versão em maiúsculas</value>
<data name="Quality" xml:space="preserve">
<value>Qualidade :</value>
</data>
<data name="RecommendeBitrateRangeInBlue" xml:space="preserve">
<data name="RecommendedBitrateRangeInBlue" xml:space="preserve">
<value>O bitrate recomendado está representado a azul</value>
</data>
<data name="RemoveSelectedPreset" xml:space="preserve">
@@ -313,7 +313,7 @@ Use maj para a versão em maiúsculas</value>
<data name="Settings" xml:space="preserve">
<value>Definições</value>
</data>
<data name="SettingsButtonTitle" xml:space="preserve">
<data name="SettingsButtonTooltip" xml:space="preserve">
<value>Definições</value>
</data>
<data name="TwoSeventyDegreesRotationTitle" xml:space="preserve">
@@ -127,7 +127,7 @@
<value>Action when conversion succeed</value>
</data>
<data name="AddNewPreset" xml:space="preserve">
<value>Add new preset (duplicate selected preset)</value>
<value>New preset</value>
</data>
<data name="Application" xml:space="preserve">
<value>Application</value>
@@ -159,7 +159,7 @@
<data name="Diagnostics" xml:space="preserve">
<value>Logs</value>
</data>
<data name="DiagnosticsButtonTitle" xml:space="preserve">
<data name="DiagnosticsButtonTooltip" xml:space="preserve">
<value>Logs</value>
</data>
<data name="DocumentationButtonDescription" xml:space="preserve">
@@ -292,11 +292,11 @@ use maj for uppercase version</value>
<data name="Quality" xml:space="preserve">
<value>Quality :</value>
</data>
<data name="RecommendeBitrateRangeInBlue" xml:space="preserve">
<data name="RecommendedBitrateRangeInBlue" xml:space="preserve">
<value>Recommended bitrate range in blue</value>
</data>
<data name="RemoveSelectedPreset" xml:space="preserve">
<value>Remove selected preset</value>
<value>Delete</value>
</data>
<data name="Rotate" xml:space="preserve">
<value>Rotate :</value>
@@ -313,7 +313,7 @@ use maj for uppercase version</value>
<data name="Settings" xml:space="preserve">
<value>Settings</value>
</data>
<data name="SettingsButtonTitle" xml:space="preserve">
<data name="SettingsButtonTooltip" xml:space="preserve">
<value>Settings</value>
</data>
<data name="TwoSeventyDegreesRotationTitle" xml:space="preserve">
@@ -551,7 +551,7 @@ use maj for uppercase version</value>
<value>Error during conversion job initialization.</value>
</data>
<data name="CreateANewFolder" xml:space="preserve">
<value>Create a new folder.</value>
<value>New folder</value>
</data>
<data name="DefaultFolderName" xml:space="preserve">
<value>New folder</value>
@@ -571,4 +571,19 @@ use maj for uppercase version</value>
<data name="FFMPEGCustomArgumentsTooltip" xml:space="preserve">
<value>Custom FFMPEG command line arguments</value>
</data>
<data name="NoPresetSelected" xml:space="preserve">
<value>No preset selected</value>
</data>
<data name="ExportSelectedPresets" xml:space="preserve">
<value>Export</value>
</data>
<data name="ImportPresets" xml:space="preserve">
<value>Import</value>
</data>
<data name="DuplicatePreset" xml:space="preserve">
<value>Duplicate preset</value>
</data>
<data name="CancelJobTooltip" xml:space="preserve">
<value>Cancel</value>
</data>
</root>
+5 -5
View File
@@ -80,14 +80,13 @@ namespace FileConverter
}
}
public static T GetValue<T>(string key)
public static T GetValue<T>(string key, T defaultValue = default(T))
{
Registry registry = Registry.Instance;
string stringValue;
if (!registry.registryEntries.TryGetValue(key, out stringValue))
if (!registry.registryEntries.TryGetValue(key, out string stringValue))
{
return default(T);
return defaultValue;
}
try
@@ -100,7 +99,7 @@ namespace FileConverter
Diagnostics.Debug.LogError("Can't convert registry value: {0}.", exception.Message);
}
return default(T);
return defaultValue;
}
public static void SetValue<T>(string key, T value)
@@ -198,6 +197,7 @@ namespace FileConverter
public static class Keys
{
public static readonly string LastUpdateCheckDate = "LastUpdateCheckDate";
public static readonly string ImportInitialFolder = "ImportInitialFolder";
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

@@ -55,7 +55,7 @@
</viewModels:PresetFolderNode>
</viewModels:SettingsViewModel.PresetsRootFolder>
<viewModels:SettingsViewModel.SelectedPreset>
<viewModels:SettingsViewModel.SelectedItem>
<viewModels:PresetNode>
<viewModels:PresetNode.Preset>
<fileConverter:ConversionPreset ShortName="To Avi"
@@ -64,6 +64,6 @@
InputPostConversionAction="None" />
</viewModels:PresetNode.Preset>
</viewModels:PresetNode>
</viewModels:SettingsViewModel.SelectedPreset>
</viewModels:SettingsViewModel.SelectedItem>
</viewModels:SettingsViewModel>
@@ -4,9 +4,6 @@ namespace FileConverter.Services
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Windows;
using FileConverter.Annotations;
@@ -2,12 +2,8 @@
namespace FileConverter.Services
{
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Xml.Serialization;
using FileConverter.Annotations;
using GalaSoft.MvvmLight;
public class UpgradeVersionDescription : ObservableObject
@@ -52,10 +48,7 @@ namespace FileConverter.Services
[XmlIgnore]
public bool InstallerDownloadInProgress
{
get
{
return this.installerDownloadInProgress;
}
get => this.installerDownloadInProgress;
set
{
@@ -69,10 +62,7 @@ namespace FileConverter.Services
[XmlIgnore]
public int InstallerDownloadProgress
{
get
{
return this.installerDownloadProgress;
}
get => this.installerDownloadProgress;
set
{
@@ -84,22 +74,10 @@ namespace FileConverter.Services
}
[XmlIgnore]
public bool InstallerDownloadDone
{
get
{
return !this.InstallerDownloadInProgress && this.InstallerDownloadProgress == 100;
}
}
public bool InstallerDownloadDone => !this.InstallerDownloadInProgress && this.InstallerDownloadProgress == 100;
[XmlIgnore]
public bool InstallerDownloadNotStarted
{
get
{
return !this.InstallerDownloadInProgress && this.InstallerDownloadProgress == 0;
}
}
public bool InstallerDownloadNotStarted => !this.InstallerDownloadInProgress && this.InstallerDownloadProgress == 0;
[XmlIgnore]
public bool NeedToUpgrade
+1 -1
View File
@@ -16,7 +16,7 @@ namespace FileConverter
{
public const int Version = 4;
private bool exitApplicationWhenConversionsFinished = true;
private bool exitApplicationWhenConversionsFinished = false;
private float durationBetweenEndOfConversionsAndApplicationExit = 3f;
private ObservableCollection<ConversionPreset> conversionPresets = new ObservableCollection<ConversionPreset>();
private bool checkUpgradeAtStartup = true;
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Settings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SerializationVersion="4">
<ExitApplicationWhenConversionsFinished>true</ExitApplicationWhenConversionsFinished>
<DurationBetweenEndOfConversionsAndApplicationExit>3</DurationBetweenEndOfConversionsAndApplicationExit>
<MaximumNumberOfSimultaneousConversions>2</MaximumNumberOfSimultaneousConversions>
<ConversionPreset Name="To Mkv" OutputType="Mkv" IsDefaultSettings="true">
<InputTypes>3gp</InputTypes>
@@ -1126,7 +1124,7 @@
<Settings Key="AudioBitrate" Value="155" />
<Settings Key="EnableFFMPEGCustomCommand" Value="True" />
<Settings Key="FFMPEGCustomCommand" Value="-c:v libx264 -preset medium -crf 21 -c:a aac -qscale:a 1.3 -vf &quot;scale=1920:1080,format=yuv420p&quot;" />
<OutputFileNameTemplate>(p)(f) (720p)</OutputFileNameTemplate>
<OutputFileNameTemplate>(p)(f) (1080p)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="Scale 1080p/To Mp4" OutputType="Mp4" IsDefaultSettings="true">
<InputTypes>3gp</InputTypes>
@@ -1151,7 +1149,7 @@
<Settings Key="AudioBitrate" Value="128" />
<Settings Key="EnableFFMPEGCustomCommand" Value="True" />
<Settings Key="FFMPEGCustomCommand" Value="-c:v libx264 -preset medium -crf 21 -c:a aac -qscale:a 1.3 -vf &quot;scale=1920:1080,format=yuv420p&quot;" />
<OutputFileNameTemplate>(p)(f) (720p)</OutputFileNameTemplate>
<OutputFileNameTemplate>(p)(f) (1080p)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="Scale 1080p/To Webm" OutputType="Webm" IsDefaultSettings="true">
<InputTypes>3gp</InputTypes>
@@ -1175,7 +1173,7 @@
<Settings Key="VideoRotation" Value="0" />
<Settings Key="EnableFFMPEGCustomCommand" Value="True" />
<Settings Key="FFMPEGCustomCommand" Value="-c:v libvpx-vp9 -crf 23 -b:v 0 -c:a libvorbis -qscale:a 5 -vf &quot;scale=1920:1080,format=yuv420p&quot;" />
<OutputFileNameTemplate>(p)(f) (720p)</OutputFileNameTemplate>
<OutputFileNameTemplate>(p)(f) (1080p)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="Scale 1080p/To Ogv" OutputType="Ogv" IsDefaultSettings="true">
<InputTypes>3gp</InputTypes>
@@ -1199,7 +1197,7 @@
<Settings Key="AudioBitrate" Value="160" />
<Settings Key="EnableFFMPEGCustomCommand" Value="True" />
<Settings Key="FFMPEGCustomCommand" Value="-codec:v libtheora -qscale:v 8 -codec:a libvorbis -qscale:a 5 -vf &quot;scale=1920:1080,format=yuv420p&quot;" />
<OutputFileNameTemplate>(p)(f) (720p)</OutputFileNameTemplate>
<OutputFileNameTemplate>(p)(f) (1080p)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="Scale 1080p/To Avi" OutputType="Avi" IsDefaultSettings="true">
<InputTypes>3gp</InputTypes>
@@ -1223,7 +1221,7 @@
<Settings Key="AudioBitrate" Value="190" />
<Settings Key="EnableFFMPEGCustomCommand" Value="True" />
<Settings Key="FFMPEGCustomCommand" Value="-c:v mpeg4 -vtag xvid -qscale:v 4 -c:a libmp3lame -qscale:a 2 -id3v2_version 3 -write_id3v1 1 -vf &quot;scale=1920:1080,format=yuv420p&quot;" />
<OutputFileNameTemplate>(p)(f) (720p)</OutputFileNameTemplate>
<OutputFileNameTemplate>(p)(f) (1080p)</OutputFileNameTemplate>
</ConversionPreset>
<ConversionPreset Name="Rotate left/To Mkv" OutputType="Mkv" IsDefaultSettings="true">
<InputTypes>3gp</InputTypes>
@@ -17,7 +17,7 @@ namespace FileConverter.ValueConverters
FileConverter.Version version = (FileConverter.Version)value;
return string.Format("File Converter v{0}", version.ToString());
return $"File Converter v{version}";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
@@ -17,7 +17,7 @@ namespace FileConverter.ValueConverters
double bitrate = (double)value;
return string.Format("{0} kbit/s", bitrate.ToString("0"));
return $"{bitrate:0} kbit/s";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
@@ -21,52 +21,7 @@ namespace FileConverter.ValueConverters
ConversionState conversionState = (ConversionState)value;
string type = parameter as string;
if (type == "Background")
{
switch (conversionState)
{
case ConversionState.Unknown:
return new SolidColorBrush(Color.FromRgb(230, 230, 230));
case ConversionState.Ready:
return new SolidColorBrush(Color.FromRgb(230, 230, 230));
case ConversionState.InProgress:
return new SolidColorBrush(Color.FromRgb(250, 236, 179));
case ConversionState.Done:
return new SolidColorBrush(Color.FromRgb(200, 230, 201));
case ConversionState.Failed:
return new SolidColorBrush(Color.FromRgb(255, 205, 210));
}
}
else if (type == "Foreground")
{
switch (conversionState)
{
case ConversionState.Unknown:
return new SolidColorBrush(Color.FromRgb(128, 128, 128));
case ConversionState.Ready:
return new SolidColorBrush(Color.FromRgb(32, 32, 32));
case ConversionState.InProgress:
return new SolidColorBrush(Color.FromRgb(255, 160, 0));
case ConversionState.Done:
return new SolidColorBrush(Color.FromRgb(56, 142, 60));
case ConversionState.Failed:
return new SolidColorBrush(Color.FromRgb(255, 82, 82));
}
}
else
{
throw new SystemException("Unknown type.");
}
throw new SystemException("Unknown state.");
return Application.Current.Resources[$"{conversionState}{type}Brush"];
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
@@ -10,11 +10,13 @@ namespace FileConverter.ValueConverters.Generic
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (!(value is bool))
if (value != null && !(value is bool))
{
throw new ArgumentException("The value must be a boolean.");
}
bool booleanValue = (bool?) value ?? false;
string stringParameter = parameter as string;
string trueResult = "Visible";
@@ -35,7 +37,6 @@ namespace FileConverter.ValueConverters.Generic
}
}
bool booleanValue = (bool)value;
return booleanValue ? trueResult : falseResult;
}
@@ -17,7 +17,7 @@ namespace FileConverter.ValueConverters.Generic
double doubleValue = (double)value;
return string.Format("{0} second{1}", doubleValue.ToString("0.#"), doubleValue >= 2 ? "s" : string.Empty);
return $"{doubleValue:0.#} second{(doubleValue >= 2 ? "s" : string.Empty)}";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
@@ -12,7 +12,7 @@ namespace FileConverter.ValueConverters.Generic
{
if (value == null)
{
throw new System.ArgumentNullException("value.");
throw new System.ArgumentNullException(nameof(value));
}
string stringValue = value.ToString();
@@ -20,7 +20,7 @@ namespace FileConverter.ValueConverters.Generic
string typeName = parameter as string;
if (typeName == null)
{
throw new ArgumentNullException("parameter", "The parameter must contains the enum type.");
throw new ArgumentNullException(nameof(parameter), "The parameter must contains the enum type.");
}
Type enumType = Type.GetType(typeName);
@@ -18,7 +18,7 @@ namespace FileConverter.ValueConverters.Generic
string typeName = parameter as string;
if (typeName == null)
{
throw new ArgumentNullException("parameter", "The parameter must contains a convertible type.");
throw new ArgumentNullException(nameof(parameter), "The parameter must contains a convertible type.");
}
Type type = Type.GetType(typeName);
@@ -23,8 +23,7 @@ namespace FileConverter.ValueConverters
return "Hidden";
}
OutputType referenceType;
if (!Enum.TryParse<OutputType>(referenceTypeName, out referenceType))
if (!Enum.TryParse(referenceTypeName, out OutputType referenceType))
{
return "Hidden";
}
+2 -2
View File
@@ -49,10 +49,10 @@ namespace FileConverter
{
if (this.Patch == 0)
{
return string.Format("{0}.{1}", this.Major, this.Minor);
return $"{this.Major}.{this.Minor}";
}
return string.Format("{0}.{1}.{2}", this.Major, this.Minor, this.Patch);
return $"{this.Major}.{this.Minor}.{this.Patch}";
}
public override bool Equals(object obj)
@@ -2,14 +2,15 @@
namespace FileConverter.ViewModels
{
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Media;
using CommonServiceLocator;
using GalaSoft.MvvmLight;
using FileConverter.Annotations;
using FileConverter.ConversionJobs;
public class InputExtension : INotifyPropertyChanged
public class InputExtension : ObservableObject
{
private readonly Brush defaultBrush = new SolidColorBrush(Color.FromRgb(0, 0, 0));
private readonly Brush errorBrush = new SolidColorBrush(Color.FromRgb(255, 65, 0));
@@ -48,54 +49,69 @@ namespace FileConverter.ViewModels
}
}
public event PropertyChangedEventHandler PropertyChanged;
public string Name
{
get
{
return this.name;
}
get => this.name;
set
{
this.name = value;
this.OnPropertyChanged();
this.RaisePropertyChanged();
}
}
public Brush ForegroundBrush
{
get
{
return this.foregroundBrush;
}
get => this.foregroundBrush;
set
{
this.foregroundBrush = value;
this.OnPropertyChanged();
this.RaisePropertyChanged();
}
}
public string ToolTip
{
get
{
return this.toolTip;
}
get => this.toolTip;
set
{
this.toolTip = value;
this.OnPropertyChanged();
this.RaisePropertyChanged();
}
}
[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
public bool IsChecked
{
this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
get
{
SettingsViewModel settingsViewModel = ServiceLocator.Current.GetInstance<SettingsViewModel>();
PresetNode selectedPreset = settingsViewModel.SelectedPreset;
if (selectedPreset == null)
{
return false;
}
return selectedPreset.Preset.InputTypes.Contains(this.name.ToLowerInvariant());
}
set
{
SettingsViewModel settingsViewModel = ServiceLocator.Current.GetInstance<SettingsViewModel>();
PresetNode selectedPreset = settingsViewModel.SelectedPreset;
if (value)
{
selectedPreset?.Preset.AddInputType(this.name.ToLowerInvariant());
}
else
{
selectedPreset?.Preset.RemoveInputType(this.name.ToLowerInvariant());
}
this.RaisePropertyChanged(nameof(this.IsChecked));
}
}
}
}
@@ -2,13 +2,15 @@
namespace FileConverter.ViewModels
{
using System.Collections.Generic;
using CommonServiceLocator;
using GalaSoft.MvvmLight;
using System.ComponentModel;
using System.Collections.Generic;
public class InputExtensionCategory : ObservableObject
{
private readonly List<InputExtension> inputExtensions = new List<InputExtension>();
private string name;
private List<InputExtension> inputExtensions = new List<InputExtension>();
public InputExtensionCategory(string name)
{
@@ -17,10 +19,7 @@ namespace FileConverter.ViewModels
public string Name
{
get
{
return this.name;
}
get => this.name;
set
{
@@ -29,13 +28,7 @@ namespace FileConverter.ViewModels
}
}
public IEnumerable<InputExtension> InputExtensions
{
get
{
return this.inputExtensions;
}
}
public IEnumerable<InputExtension> InputExtensions => this.inputExtensions;
public IEnumerable<string> InputExtensionNames
{
@@ -55,9 +48,77 @@ namespace FileConverter.ViewModels
{
inputExtension = new InputExtension(extension);
this.inputExtensions.Add(inputExtension);
this.RaisePropertyChanged("InputExtensions");
this.RaisePropertyChanged("InputExtensionNames");
inputExtension.PropertyChanged += this.OnExtensionPropertyChange;
this.RaisePropertyChanged(nameof(this.InputExtensions));
this.RaisePropertyChanged(nameof(this.InputExtensionNames));
this.RaisePropertyChanged(nameof(this.IsChecked));
}
}
public bool? IsChecked
{
get
{
SettingsViewModel settingsViewModel = ServiceLocator.Current.GetInstance<SettingsViewModel>();
PresetNode selectedPreset = settingsViewModel.SelectedPreset;
if (selectedPreset == null)
{
return false;
}
bool all = true;
bool none = true;
foreach (string extension in this.InputExtensionNames)
{
bool contains = selectedPreset.Preset.InputTypes.Contains(extension);
all &= contains;
none &= !contains;
}
if (all)
{
return true;
}
else if (none)
{
return false;
}
return null;
}
set
{
SettingsViewModel settingsViewModel = ServiceLocator.Current.GetInstance<SettingsViewModel>();
PresetNode selectedPreset = settingsViewModel.SelectedPreset;
foreach (string extension in this.InputExtensionNames)
{
if (value == true)
{
selectedPreset?.Preset.AddInputType(extension);
}
else
{
selectedPreset?.Preset.RemoveInputType(extension);
}
}
// Raise property change for extensions.
foreach (InputExtension inputExtension in this.InputExtensions)
{
inputExtension.RaisePropertyChanged(nameof(inputExtension.IsChecked));
}
this.RaisePropertyChanged(nameof(this.IsChecked));
}
}
private void OnExtensionPropertyChange(object sender, PropertyChangedEventArgs e)
{
this.RaisePropertyChanged(nameof(this.IsChecked));
}
}
}
@@ -58,10 +58,7 @@ namespace FileConverter.ViewModels
public string InformationMessage
{
get
{
return this.informationMessage;
}
get => this.informationMessage;
private set
{
@@ -71,10 +68,7 @@ namespace FileConverter.ViewModels
public ObservableCollection<ConversionJob> ConversionJobs
{
get
{
return this.conversionJobs;
}
get => this.conversionJobs;
private set
{
@@ -1,6 +1,5 @@
// <copyright file="PresetNode.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
@@ -143,10 +142,7 @@ namespace FileConverter.ViewModels
public string OutputFileNameTemplate
{
get
{
return this.Preset.OutputFileNameTemplate;
}
get => this.Preset.OutputFileNameTemplate;
set
{
@@ -2,6 +2,8 @@
namespace FileConverter.ViewModels
{
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
@@ -11,6 +13,7 @@ namespace FileConverter.ViewModels
using System.Windows.Data;
using System.Windows.Input;
using FileConverter.Annotations;
using FileConverter.Services;
using FileConverter.Views;
@@ -45,9 +48,10 @@ namespace FileConverter.ViewModels
private RelayCommand<string> openUrlCommand;
private RelayCommand getChangeLogContentCommand;
private RelayCommand createFolderCommand;
private RelayCommand movePresetUpCommand;
private RelayCommand movePresetDownCommand;
private RelayCommand addNewPresetCommand;
private RelayCommand newPresetCommand;
private RelayCommand duplicatePresetCommand;
private RelayCommand importPresetCommand;
private RelayCommand exportPresetCommand;
private RelayCommand removePresetCommand;
private RelayCommand saveCommand;
private RelayCommand<CancelEventArgs> closeCommand;
@@ -63,9 +67,10 @@ namespace FileConverter.ViewModels
this.getChangeLogContentCommand = new RelayCommand(this.DownloadChangeLogAction);
this.openUrlCommand = new RelayCommand<string>((url) => Process.Start(url));
this.createFolderCommand = new RelayCommand(this.CreateFolder);
this.movePresetUpCommand = new RelayCommand(this.MoveSelectedPresetUp, this.CanMoveSelectedPresetUp);
this.movePresetDownCommand = new RelayCommand(this.MoveSelectedPresetDown, this.CanMoveSelectedPresetDown);
this.addNewPresetCommand = new RelayCommand(this.AddNewPreset);
this.newPresetCommand = new RelayCommand(() => this.AddNewPreset(false));
this.duplicatePresetCommand = new RelayCommand(() => this.AddNewPreset(true), this.CanDuplicateSelectedPreset);
this.importPresetCommand = new RelayCommand(this.ImportPreset);
this.exportPresetCommand = new RelayCommand(this.ExportSelectedPreset, this.CanExportSelectedPreset);
this.removePresetCommand = new RelayCommand(this.RemoveSelectedPreset, this.CanRemoveSelectedPreset);
this.saveCommand = new RelayCommand(this.SaveSettings, this.CanSaveSettings);
this.closeCommand = new RelayCommand<CancelEventArgs>(this.CloseSettings);
@@ -190,9 +195,9 @@ namespace FileConverter.ViewModels
this.RaisePropertyChanged();
this.RaisePropertyChanged(nameof(this.SelectedItem));
this.movePresetUpCommand?.RaiseCanExecuteChanged();
this.movePresetDownCommand?.RaiseCanExecuteChanged();
this.removePresetCommand?.RaiseCanExecuteChanged();
this.exportPresetCommand?.RaiseCanExecuteChanged();
this.duplicatePresetCommand?.RaiseCanExecuteChanged();
}
}
@@ -217,9 +222,9 @@ namespace FileConverter.ViewModels
this.RaisePropertyChanged();
this.RaisePropertyChanged(nameof(this.SelectedItem));
this.RaisePropertyChanged(nameof(this.InputCategories));
this.movePresetUpCommand?.RaiseCanExecuteChanged();
this.movePresetDownCommand?.RaiseCanExecuteChanged();
this.removePresetCommand?.RaiseCanExecuteChanged();
this.exportPresetCommand?.RaiseCanExecuteChanged();
this.duplicatePresetCommand?.RaiseCanExecuteChanged();
}
}
@@ -275,11 +280,13 @@ namespace FileConverter.ViewModels
public ICommand CreateFolderCommand => this.createFolderCommand;
public ICommand MovePresetUpCommand => this.movePresetUpCommand;
public ICommand AddNewPresetCommand => this.newPresetCommand;
public ICommand MovePresetDownCommand => this.movePresetDownCommand;
public ICommand DuplicatePresetCommand => this.duplicatePresetCommand;
public ICommand AddNewPresetCommand => this.addNewPresetCommand;
public ICommand ImportPresetCommand => this.importPresetCommand;
public ICommand ExportPresetCommand => this.exportPresetCommand;
public ICommand RemoveSelectedPresetCommand => this.removePresetCommand;
@@ -316,6 +323,31 @@ namespace FileConverter.ViewModels
public string this[string columnName] => this.Error;
[NotNull]
public string ImportDirectoryPath
{
get
{
string path = FileConverter.Registry.GetValue(FileConverter.Registry.Keys.ImportInitialFolder, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments));
if (!Directory.Exists(path))
{
path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
}
return path;
}
set
{
if (!Directory.Exists(value))
{
return;
}
FileConverter.Registry.SetValue(FileConverter.Registry.Keys.ImportInitialFolder, value);
}
}
private string CheckErrorRecursively(AbstractTreeNode node)
{
string nodeError = node.Error;
@@ -409,19 +441,13 @@ namespace FileConverter.ViewModels
PresetFolderNode subFolder = parent.Children.FirstOrDefault(match => match is PresetFolderNode && ((PresetFolderNode)match).Name == folderName) as PresetFolderNode;
if (subFolder == null)
{
subFolder = new PresetFolderNode(folderName, parent);
parent.Children.Add(subFolder);
subFolder.PropertyChanged += this.NodePropertyChanged;
subFolder = this.CreateFolderNode(folderName, parent);
}
parent = subFolder;
}
PresetNode presetNode = new PresetNode(preset, parent);
parent.Children.Add(presetNode);
presetNode.PropertyChanged += this.NodePropertyChanged;
this.CreatePresetNode(preset, parent);
}
this.RaisePropertyChanged(nameof(this.PresetsRootFolder));
@@ -525,120 +551,12 @@ namespace FileConverter.ViewModels
Messenger.Default.Send<string>("FolderName", "DoFocus");
}
private bool CanMoveSelectedPresetUp()
private bool CanDuplicateSelectedPreset()
{
if (this.SelectedItem == null)
{
// no preset selected.
return false;
}
if (this.SelectedItem.Parent != this.presetsRootFolder)
{
// The parent is not the root, we can move the preset up.
return true;
}
int indexOfSelectedPreset = this.SelectedItem.Parent.Children.IndexOf(this.SelectedItem);
return indexOfSelectedPreset > 0;
return this.SelectedPreset != null;
}
private void MoveSelectedPresetUp()
{
Diagnostics.Debug.Assert(this.SelectedItem != null, "this.SelectedItem != null");
AbstractTreeNode itemToMoveUp = this.SelectedItem;
PresetFolderNode currentParent = itemToMoveUp.Parent;
int indexOfSelectedPreset = currentParent.Children.IndexOf(itemToMoveUp);
if (indexOfSelectedPreset == 0)
{
// Move to the parent folder.
int indexOfFolder = currentParent.Parent.Children.IndexOf(currentParent);
currentParent.Children.RemoveAt(indexOfSelectedPreset);
currentParent.Parent.Children.Insert(indexOfFolder, itemToMoveUp);
itemToMoveUp.Parent = currentParent.Parent;
}
else
{
int newIndexOfSelectedPreset = System.Math.Max(0, indexOfSelectedPreset - 1);
if (currentParent.Children[newIndexOfSelectedPreset] is PresetFolderNode newParent)
{
// Move to child folder.
currentParent.Children.RemoveAt(indexOfSelectedPreset);
newParent.Children.Add(itemToMoveUp);
itemToMoveUp.Parent = newParent;
}
else
{
// Swap nodes.
currentParent.Children.Move(indexOfSelectedPreset, newIndexOfSelectedPreset);
}
}
this.SelectedItem = itemToMoveUp;
this.movePresetUpCommand.RaiseCanExecuteChanged();
this.movePresetDownCommand.RaiseCanExecuteChanged();
this.saveCommand.RaiseCanExecuteChanged();
}
private bool CanMoveSelectedPresetDown()
{
if (this.SelectedItem == null)
{
// no preset selected.
return false;
}
if (this.SelectedItem.Parent != this.presetsRootFolder)
{
// The parent is not the root, we can move the preset down.
return true;
}
int indexOfSelectedPreset = this.SelectedItem.Parent.Children.IndexOf(this.SelectedItem);
return indexOfSelectedPreset < this.SelectedItem.Parent.Children.Count - 1;
}
private void MoveSelectedPresetDown()
{
Diagnostics.Debug.Assert(this.SelectedItem != null, "this.SelectedItem != null");
AbstractTreeNode itemToMoveDown = this.SelectedItem;
PresetFolderNode currentParent = itemToMoveDown.Parent;
int indexOfSelectedPreset = currentParent.Children.IndexOf(itemToMoveDown);
if (indexOfSelectedPreset == currentParent.Children.Count - 1)
{
// Move to the parent folder.
int indexOfFolder = currentParent.Parent.Children.IndexOf(currentParent);
currentParent.Children.RemoveAt(indexOfSelectedPreset);
currentParent.Parent.Children.Insert(indexOfFolder + 1, itemToMoveDown);
itemToMoveDown.Parent = currentParent.Parent;
}
else
{
int newIndexOfSelectedPreset = System.Math.Min(this.SelectedItem.Parent.Children.Count - 1, indexOfSelectedPreset + 1);
if (currentParent.Children[newIndexOfSelectedPreset] is PresetFolderNode newParent)
{
// Move to child folder.
currentParent.Children.RemoveAt(indexOfSelectedPreset);
newParent.Children.Insert(0, itemToMoveDown);
itemToMoveDown.Parent = newParent;
}
else
{
// Swap nodes.
currentParent.Children.Move(indexOfSelectedPreset, newIndexOfSelectedPreset);
}
}
this.SelectedItem = itemToMoveDown;
this.movePresetUpCommand.RaiseCanExecuteChanged();
this.movePresetDownCommand.RaiseCanExecuteChanged();
this.saveCommand.RaiseCanExecuteChanged();
}
private void AddNewPreset()
private void AddNewPreset(bool duplicate)
{
PresetFolderNode parent;
if (this.SelectedFolder != null)
@@ -671,7 +589,7 @@ namespace FileConverter.ViewModels
// Create preset by copying the selected one.
ConversionPreset newPreset = null;
if (this.SelectedPreset != null)
if (this.SelectedPreset != null && duplicate)
{
newPreset = new ConversionPreset(presetName, this.SelectedPreset.Preset);
}
@@ -694,6 +612,101 @@ namespace FileConverter.ViewModels
this.saveCommand.RaiseCanExecuteChanged();
}
private void ImportPreset()
{
OpenFileDialog openFileDialog = new OpenFileDialog
{
Title = "Import presets",
Filter = "Preset file (*.xml)|*.xml",
InitialDirectory = this.ImportDirectoryPath,
};
if (openFileDialog.ShowDialog() == true)
{
if (!File.Exists(openFileDialog.FileName))
{
Diagnostics.Debug.LogError("File does not exists.");
}
string directoryPath = Path.GetDirectoryName(openFileDialog.FileName);
if (!string.IsNullOrEmpty(directoryPath))
{
this.ImportDirectoryPath = directoryPath;
}
List<ConversionPreset> presetsToImport = new List<ConversionPreset>();
XmlHelpers.LoadFromFile("Presets", openFileDialog.FileName, out presetsToImport);
// Add imported preset to preset tree.
bool itemSelected = false;
foreach (ConversionPreset conversionPreset in presetsToImport)
{
PresetFolderNode parent = this.PresetsRootFolder;
foreach (string folderName in conversionPreset.ParentFoldersNames)
{
PresetFolderNode folderNode = parent.Children.FirstOrDefault(match => match is PresetFolderNode && match.Name == folderName) as PresetFolderNode;
if (folderNode == null)
{
folderNode = this.CreateFolderNode(folderName, parent);
if (!itemSelected)
{
this.SelectedItem = folderNode;
itemSelected = true;
}
}
parent = folderNode;
}
PresetNode node = this.CreatePresetNode(conversionPreset, parent);
if (!itemSelected)
{
this.SelectedItem = node;
itemSelected = true;
}
}
}
}
private void ExportSelectedPreset()
{
SaveFileDialog saveFileDialog = new SaveFileDialog
{
Title = "Export selected preset or folder",
Filter = "Preset file (*.xml)|*.xml",
InitialDirectory = this.ImportDirectoryPath,
};
if (saveFileDialog.ShowDialog() == true)
{
string filePath = saveFileDialog.FileName;
string directoryPath = Path.GetDirectoryName(filePath);
if (!string.IsNullOrEmpty(directoryPath))
{
this.ImportDirectoryPath = directoryPath;
}
if (Path.GetExtension(filePath) != ".xml")
{
filePath += ".xml";
}
this.settings.ConversionPresets.Clear();
this.ComputePresetsParentFoldersNamesAndFillSettings(this.presetsRootFolder, new List<string>());
List<ConversionPreset> presetsToExport = new List<ConversionPreset>();
this.FillWithPresetsRecursively(this.SelectedItem, presetsToExport);
XmlHelpers.SaveToFile("Presets", filePath, presetsToExport);
}
}
private bool CanExportSelectedPreset()
{
return this.SelectedItem != null;
}
private void RemoveSelectedPreset()
{
this.SelectedItem.PropertyChanged -= this.NodePropertyChanged;
@@ -730,5 +743,38 @@ namespace FileConverter.ViewModels
}
}
}
private void FillWithPresetsRecursively(AbstractTreeNode node, List<ConversionPreset> presets)
{
if (node is PresetNode presetNode)
{
presets.Add(presetNode.Preset);
}
else if (node is PresetFolderNode folder)
{
foreach (AbstractTreeNode childNode in folder.Children)
{
this.FillWithPresetsRecursively(childNode, presets);
}
}
}
private PresetFolderNode CreateFolderNode(string folderName, PresetFolderNode parent)
{
PresetFolderNode subFolder = new PresetFolderNode(folderName, parent);
parent.Children.Add(subFolder);
subFolder.PropertyChanged += this.NodePropertyChanged;
return subFolder;
}
private PresetNode CreatePresetNode(ConversionPreset preset, PresetFolderNode parent)
{
PresetNode presetNode = new PresetNode(preset, parent);
parent.Children.Add(presetNode);
presetNode.PropertyChanged += this.NodePropertyChanged;
return presetNode;
}
}
}
@@ -3,7 +3,6 @@
namespace FileConverter.ViewModels
{
using System.ComponentModel;
using System.Threading.Tasks;
using System.Windows.Input;
using FileConverter.Services;
@@ -21,10 +21,19 @@
</Window.Title>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="60" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="{x:Static project:Resources.Diagnostics}" VerticalAlignment="Top" Height="30" FontSize="16" FontWeight="Bold" />
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Height="48" Width="48" HorizontalAlignment="Center" VerticalAlignment="Center" Source="/Resources/LogIcon.png" />
<Label Grid.Column="1" Content="{x:Static project:Resources.Diagnostics}" VerticalAlignment="Center" FontSize="18" FontWeight="Bold" />
</Grid>
<TabControl Grid.Row="1" Margin="5" ItemsSource="{Binding Path=(diagnostics:Debug.Data), Mode=OneWay}">
<TabControl.ItemTemplate>
@@ -33,9 +42,11 @@
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<DataTemplate DataType="{x:Type diagnostics:DiagnosticsData}">
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" CanContentScroll="True">
<TextBlock Name="Diagnostics" TextWrapping="NoWrap" Text="{Binding Content}" FontFamily="Consolas" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="False"/>
<TextBox TextWrapping="NoWrap" FontFamily="Consolas" IsReadOnly="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.CanContentScroll="False"
Text="{Binding Content, Mode=OneWay}" />
</ScrollViewer>
</DataTemplate>
</TabControl.ContentTemplate>
@@ -9,7 +9,7 @@
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:command="http://www.galasoft.ch/mvvmlight"
mc:Ignorable="d" x:Class="FileConverter.Views.MainWindow"
Height="500" Width="950" MinHeight="250" MinWidth="500" WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico"
Height="500" Width="950" MinHeight="480" MinWidth="640" WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico"
DataContext="{Binding Main, Source={StaticResource Locator}}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Closing">
@@ -31,26 +31,30 @@
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="35" />
<RowDefinition Height="64" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="64" />
<ColumnDefinition Width="64" />
</Grid.ColumnDefinitions>
<DockPanel Grid.Column="0">
<Label Content="{x:Static project:Resources.ConversionQueueTitle}" VerticalAlignment="Top" Height="30" FontSize="16" FontWeight="Bold"/>
<Label Content="{Binding InformationMessage}" VerticalAlignment="Top" Height="30" FontSize="13.333" HorizontalAlignment="Right"/>
<Label Content="{x:Static project:Resources.ConversionQueueTitle}" VerticalAlignment="Center" FontSize="18" FontWeight="Bold"/>
<Label Content="{Binding InformationMessage}" VerticalAlignment="Center" FontSize="13.333" HorizontalAlignment="Right"/>
</DockPanel>
<Button x:Name="DiagnosticsButton" Grid.Column="1" Content="{x:Static project:Resources.DiagnosticsButtonTitle}" Margin="3,3" Command="{Binding ShowDiagnosticsCommand}"/>
<Button x:Name="SettingsButton" Grid.Column="2" Content="{x:Static project:Resources.SettingsButtonTitle}" Margin="3,3" Command="{Binding ShowSettingsCommand}"/>
<Button Grid.Column="1" Margin="3" Command="{Binding ShowDiagnosticsCommand}" ToolTip="{x:Static project:Resources.DiagnosticsButtonTooltip}">
<Image HorizontalAlignment="Left" Height="48" Width="48" VerticalAlignment="Top" Source="/Resources/LogIcon.png" />
</Button>
<Button Grid.Column="2" Margin="3" Command="{Binding ShowSettingsCommand}" ToolTip="{x:Static project:Resources.SettingsButtonTooltip}">
<Image HorizontalAlignment="Left" Height="48" Width="48" VerticalAlignment="Top" Source="/Resources/SettingsIcon.ico" />
</Button>
</Grid>
<ScrollViewer x:Name="ScrollViewer" Grid.Row="1" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
<ItemsControl ItemsSource="{Binding ConversionJobs}">
<ItemsControl.ItemTemplate>
<DataTemplate>
@@ -0,0 +1,52 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Color x:Key="MainLightColor">#86C8F6</Color>
<Color x:Key="MainColor">#0171BB</Color>
<Color x:Key="MainDarkColor">#004B82</Color>
<Color x:Key="MainDarkerColor">#074078</Color>
<Color x:Key="LighterForegroundColor">#808080</Color>
<Color x:Key="LightForegroundColor">#4D4D4D</Color>
<Color x:Key="DarkForegroundColor">#202020</Color>
<Color x:Key="SuccessForegroundColor">#388E3C</Color>
<Color x:Key="PendingForegroundColor">#FFA000</Color>
<Color x:Key="AccentForegroundColor">#DF3900</Color>
<Color x:Key="ErrorForegroundColor">#FF5252</Color>
<Color x:Key="BackgroundColor">#FFFFFF</Color>
<Color x:Key="DarkBackgroundColor">#F5F5F5</Color>
<Color x:Key="DarkerBackgroundColor">#E0E0E0</Color>
<Color x:Key="AccentBackgroundColor">#FFA88C</Color>
<Color x:Key="PendingBackgroundColor">#FAECB3</Color>
<Color x:Key="SuccessBackgroundColor">#C8E6C9</Color>
<Color x:Key="ErrorBackgroundColor">#FFCDD2</Color>
<SolidColorBrush x:Key="MainLightBrush" Color="{StaticResource MainLightColor}" />
<SolidColorBrush x:Key="MainBrush" Color="{StaticResource MainColor}" />
<SolidColorBrush x:Key="MainDarkBrush" Color="{StaticResource MainDarkColor}" />
<SolidColorBrush x:Key="MainDarkerBrush" Color="{StaticResource MainDarkerColor}" />
<SolidColorBrush x:Key="LighterForegroundBrush" Color="{StaticResource LighterForegroundColor}" />
<SolidColorBrush x:Key="LightForegroundBrush" Color="{StaticResource LightForegroundColor}" />
<SolidColorBrush x:Key="AccentForegroundBrush" Color="{StaticResource AccentForegroundColor}" />
<SolidColorBrush x:Key="HyperlinkBrush" Color="{StaticResource MainColor}" />
<SolidColorBrush x:Key="BackgroundBrush" Color="{StaticResource BackgroundColor}" />
<SolidColorBrush x:Key="AccentBackgroundBrush" Color="{StaticResource AccentBackgroundColor}" />
<SolidColorBrush x:Key="DarkBackgroundBrush" Color="{StaticResource DarkBackgroundColor}" />
<SolidColorBrush x:Key="ErrorForegroundBrush" Color="{StaticResource ErrorForegroundColor}" />
<SolidColorBrush x:Key="UnknownForegroundBrush" Color="{StaticResource LighterForegroundColor}" />
<SolidColorBrush x:Key="ReadyForegroundBrush" Color="{StaticResource DarkForegroundColor}" />
<SolidColorBrush x:Key="InProgressForegroundBrush" Color="{StaticResource PendingForegroundColor}" />
<SolidColorBrush x:Key="DoneForegroundBrush" Color="{StaticResource SuccessForegroundColor}" />
<SolidColorBrush x:Key="FailedForegroundBrush" Color="{StaticResource ErrorForegroundColor}" />
<SolidColorBrush x:Key="UnknownBackgroundBrush" Color="{StaticResource DarkerBackgroundColor}" />
<SolidColorBrush x:Key="ReadyBackgroundBrush" Color="{StaticResource DarkerBackgroundColor}" />
<SolidColorBrush x:Key="InProgressBackgroundBrush" Color="{StaticResource PendingBackgroundColor}" />
<SolidColorBrush x:Key="DoneBackgroundBrush" Color="{StaticResource SuccessBackgroundColor}" />
<SolidColorBrush x:Key="FailedBackgroundBrush" Color="{StaticResource ErrorBackgroundColor}" />
</ResourceDictionary>
@@ -196,7 +196,7 @@
<Label Content="{x:Static project:Resources.FramesPerSecond}" Grid.Row="0" Grid.Column="0" HorizontalContentAlignment="Right"/>
<Slider x:Name="QualitySlider" Grid.Row="0" Grid.Column="1" Value="{Binding Settings, ConverterParameter=VideoFramesPerSecond|System.Int32, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}"
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="10" SelectionEnd="20" Minimum="1" Maximum="30" TickPlacement="BottomRight" SmallChange="1" LargeChange="4" TickFrequency="1" Foreground="#004B82" />
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="10" SelectionEnd="20" Minimum="1" Maximum="30" TickPlacement="BottomRight" SmallChange="1" LargeChange="4" TickFrequency="1" Foreground="{StaticResource MainDarkBrush}" />
<!-- Scale -->
<Label Content="{x:Static project:Resources.Scale}" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right"/>
@@ -205,7 +205,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="#004B82"/>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="{StaticResource MainDarkBrush}"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
@@ -248,12 +248,12 @@
<DockPanel Grid.Row="0" Grid.Column="0">
<Label Content="{x:Static project:Resources.VideoTitle}" FontWeight="Bold" Margin="17,0,0,0" />
<Label Content="(Xvid)" FontWeight="Light" Foreground="#004B82" />
<Label Content="(Xvid)" FontWeight="Light" Foreground="{StaticResource MainDarkBrush}" />
</DockPanel>
<Label Content="{x:Static project:Resources.Quality}" Grid.Row="1" Grid.Column="0" ToolTip="{x:Static project:Resources.VideoEncodingQualityTooltip}" HorizontalContentAlignment="Right"/>
<Slider x:Name="QualitySlider" Grid.Row="1" Grid.Column="1" Value="{Binding Settings, ConverterParameter=VideoQuality|System.Double, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}"
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="28" Minimum="0" Maximum="30" TickPlacement="BottomRight" SmallChange="1" LargeChange="5" TickFrequency="1" Foreground="#004B82" />
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="28" Minimum="0" Maximum="30" TickPlacement="BottomRight" SmallChange="1" LargeChange="5" TickFrequency="1" Foreground="{StaticResource MainDarkBrush}" />
<!-- Scale -->
<Label Content="{x:Static project:Resources.Scale}" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right"/>
@@ -262,7 +262,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="#004B82"/>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="{StaticResource MainDarkBrush}"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
@@ -289,7 +289,7 @@
<DockPanel Grid.Row="4" Grid.Column="0">
<CheckBox IsChecked="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,6,0,0" />
<Label Content="{x:Static project:Resources.AudioTitle}" FontWeight="Bold" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
<Label Content="(Mp3)" FontWeight="Light" Foreground="#004B82" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
<Label Content="(Mp3)" FontWeight="Light" Foreground="{StaticResource MainDarkBrush}" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
</DockPanel>
<Label Content="{x:Static project:Resources.Quality}" Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Right" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
@@ -316,13 +316,13 @@
<DockPanel Grid.Row="0" Grid.Column="0">
<Label Content="{x:Static project:Resources.VideoTitle}" FontWeight="Bold" Margin="17,0,0,0"/>
<Label Content="(H.264)" FontWeight="Light" Foreground="#004B82" />
<Label Content="(H.264)" FontWeight="Light" Foreground="{StaticResource MainDarkBrush}" />
</DockPanel>
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static project:Resources.Quality}" ToolTip="{x:Static project:Resources.VideoEncodingQualityTooltip}" HorizontalContentAlignment="Right"/>
<Slider x:Name="QualitySlider" Grid.Row="1" Grid.Column="1"
Value="{Binding Settings, ConverterParameter=VideoQuality|System.Double, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}"
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="33" Minimum="0" Maximum="51" TickPlacement="BottomRight" SmallChange="1" LargeChange="6" TickFrequency="1" Foreground="#004B82" />
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="33" Minimum="0" Maximum="51" TickPlacement="BottomRight" SmallChange="1" LargeChange="6" TickFrequency="1" Foreground="{StaticResource MainDarkBrush}" />
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static project:Resources.EncodingSpeed}" ToolTip="{x:Static project:Resources.VideoEncodingSpeedTooltip}" HorizontalContentAlignment="Right"/>
<ComboBox Grid.Row="2" Grid.Column="1"
@@ -341,7 +341,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="#004B82"/>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="{StaticResource MainDarkBrush}"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
@@ -368,7 +368,7 @@
<DockPanel Grid.Row="5" Grid.Column="0">
<CheckBox IsChecked="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,6,0,0" />
<Label Content="{x:Static project:Resources.AudioTitle}" FontWeight="Bold" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
<Label Content="(AAC)" FontWeight="Light" Foreground="#004B82" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
<Label Content="(AAC)" FontWeight="Light" Foreground="{StaticResource MainDarkBrush}" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
</DockPanel>
<Label Content="{x:Static project:Resources.Quality}" Grid.Row="6" Grid.Column="0" HorizontalContentAlignment="Right" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
@@ -394,12 +394,12 @@
<DockPanel Grid.Row="0" Grid.Column="0">
<Label Content="{x:Static project:Resources.VideoTitle}" FontWeight="Bold" Margin="17,0,0,0"/>
<Label Content="(theora)" FontWeight="Light" Foreground="#004B82" />
<Label Content="(theora)" FontWeight="Light" Foreground="{StaticResource MainDarkBrush}" />
</DockPanel>
<Label Content="{x:Static project:Resources.Quality}" Grid.Row="1" Grid.Column="0" ToolTip="{x:Static project:Resources.VideoEncodingQualityTooltip}" HorizontalContentAlignment="Right"/>
<Slider x:Name="QualitySlider" Grid.Row="1" Grid.Column="1" Value="{Binding Settings, ConverterParameter=VideoQuality|System.Double, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}"
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="5" SelectionEnd="8" Minimum="0" Maximum="10" TickPlacement="BottomRight" SmallChange="1" LargeChange="3" TickFrequency="1" Foreground="#004B82" />
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="5" SelectionEnd="8" Minimum="0" Maximum="10" TickPlacement="BottomRight" SmallChange="1" LargeChange="3" TickFrequency="1" Foreground="{StaticResource MainDarkBrush}" />
<Label Content="{x:Static project:Resources.Scale}" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right"/>
<Grid Grid.Row="2" Grid.Column="1">
@@ -407,7 +407,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="#004B82"/>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="{StaticResource MainDarkBrush}"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
@@ -434,7 +434,7 @@
<DockPanel Grid.Row="4" Grid.Column="0">
<CheckBox IsChecked="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,6,0,0" />
<Label Content="{x:Static project:Resources.AudioTitle}" FontWeight="Bold" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
<Label Content="(vorbis)" FontWeight="Light" Foreground="#004B82" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
<Label Content="(vorbis)" FontWeight="Light" Foreground="{StaticResource MainDarkBrush}" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
</DockPanel>
<Label Content="{x:Static project:Resources.Quality}" Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Right" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
@@ -460,12 +460,12 @@
<DockPanel Grid.Row="0" Grid.Column="0">
<Label Content="{x:Static project:Resources.VideoTitle}" FontWeight="Bold" Margin="17,0,0,0" />
<Label Content="(vp9)" FontWeight="Light" Foreground="#004B82" />
<Label Content="(vp9)" FontWeight="Light" Foreground="{StaticResource MainDarkBrush}" />
</DockPanel>
<Label Content="{x:Static project:Resources.Quality}" Grid.Row="1" Grid.Column="0" ToolTip="{x:Static project:Resources.VideoEncodingQualityTooltip}" HorizontalContentAlignment="Right"/>
<Slider x:Name="QualitySlider" Grid.Row="1" Grid.Column="1" Value="{Binding Settings, ConverterParameter=VideoQuality|System.Double, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}"
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="40" Minimum="0" Maximum="63" TickPlacement="BottomRight" SmallChange="1" LargeChange="5" TickFrequency="1" Foreground="#004B82" />
Margin="0,2,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="40" Minimum="0" Maximum="63" TickPlacement="BottomRight" SmallChange="1" LargeChange="5" TickFrequency="1" Foreground="{StaticResource MainDarkBrush}" />
<!-- Scale -->
<Label Content="{x:Static project:Resources.Scale}" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right"/>
@@ -474,7 +474,7 @@
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="60"/>
</Grid.ColumnDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="#004B82"/>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=VideoScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="2" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2" Foreground="{StaticResource MainDarkBrush}"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
@@ -501,7 +501,7 @@
<DockPanel Grid.Row="4" Grid.Column="0">
<CheckBox IsChecked="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,6,0,0" />
<Label Content="{x:Static project:Resources.AudioTitle}" FontWeight="Bold" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
<Label Content="(Ogg vorbis)" FontWeight="Light" Foreground="#004B82" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
<Label Content="(Ogg vorbis)" FontWeight="Light" Foreground="{StaticResource MainDarkBrush}" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
</DockPanel>
<Label Content="{x:Static project:Resources.Quality}" Grid.Row="5" Grid.Column="0" HorizontalContentAlignment="Right" IsEnabled="{Binding Settings, ConverterParameter=EnableAudio|System.Boolean, Converter={StaticResource ConversionSettingsToValueType}, Mode=OneWay}"/>
@@ -524,7 +524,7 @@
<!--Quality-->
<Label Content="{x:Static project:Resources.Quality}" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right"/>
<Slider Grid.Row="0" Grid.Column="1" x:Name="QualitySlider" Value="{Binding Settings, ConverterParameter=ImageQuality|System.Double, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay, TargetNullValue=25}"
Margin="0,5,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="30" SelectionEnd="100" Minimum="0" Maximum="100" TickPlacement="BottomRight" SmallChange="5" LargeChange="15" TickFrequency="5" Foreground="#004B82" />
Margin="0,5,0,0" VerticalAlignment="Top" AutoToolTipPlacement="TopLeft" IsSnapToTickEnabled="True" IsSelectionRangeEnabled="True" SelectionStart="30" SelectionEnd="100" Minimum="0" Maximum="100" TickPlacement="BottomRight" SmallChange="5" LargeChange="15" TickFrequency="5" Foreground="{StaticResource MainDarkBrush}" />
<!--Scale-->
<Label Content="{x:Static project:Resources.Scale}" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right"/>
<Grid Grid.Row="1" Grid.Column="1">
@@ -536,7 +536,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=ImageScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="16" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2 3 4 6 8 12 16" Foreground="#004B82"/>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=ImageScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="16" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2 3 4 6 8 12 16" Foreground="{StaticResource MainDarkBrush}"/>
<Label Grid.Row="0" Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
@@ -585,7 +585,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=ImageScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="16" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2 3 4 6 8 12 16" Foreground="#004B82"/>
<Slider x:Name="ScaleSlider" Grid.Column="0" Value="{Binding Settings, ConverterParameter=ImageScale|System.Double, ConverterCulture={x:Static globalization:CultureInfo.InvariantCulture}, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay}" Margin="0,2,0,0" VerticalAlignment="Top" IsSnapToTickEnabled="True" Minimum="0.075" Maximum="16" SmallChange="0.075" LargeChange="0.25" TickPlacement="BottomRight" Ticks="0.075 0.125 0.25 0.5 0.75 1 1.25 1.5 1.75 2 3 4 6 8 12 16" Foreground="{StaticResource MainDarkBrush}"/>
<Label Grid.Column="1">
<Label.Content>
<MultiBinding Converter="{StaticResource FormatStringConverter}" Mode="OneWay">
@@ -685,7 +685,7 @@
ToolTip="{x:Static project:Resources.FFMPEGCustomArgumentsTooltip}"
Text="{Binding Settings, ConverterParameter=FFMPEGCustomCommand|System.String, Converter={StaticResource ConversionSettingsToValueType}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
<TextBlock Grid.Row="1" Grid.Column="1" Margin="0,5,5,0">
<Hyperlink CommandParameter="https://ffmpeg.org/ffmpeg.html" Command="{Binding DataContext.OpenUrlCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}}, Mode=OneWay}" Foreground="#1E6BB8"><x:Static Member="project:Resources.Help" /></Hyperlink>
<Hyperlink CommandParameter="https://ffmpeg.org/ffmpeg.html" Command="{Binding DataContext.OpenUrlCommand, RelativeSource={RelativeSource AncestorType={x:Type Window}}, Mode=OneWay}" Foreground="{StaticResource HyperlinkBrush}"><x:Static Member="project:Resources.Help" /></Hyperlink>
</TextBlock>
</Grid>
@@ -1,5 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:FileConverter.Controls">
<Style x:Key="EnableDisableImageStyle" TargetType="{x:Type Image}">
<Style.Triggers>
@@ -9,86 +10,6 @@
</Style.Triggers>
</Style>
<!-- Donation button style -->
<Style x:Key="ShadowStyle">
<Setter Property="Control.Foreground" Value="LightGray" />
</Style>
<Style x:Key="DonateButton" TargetType="Button">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Background" Value="#F95B5C"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Name="border" BorderThickness="1" Padding="4,2" BorderBrush="#F96D6C" CornerRadius="3" Background="{TemplateBinding Background}">
<Grid>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="contentShadow" Style="{StaticResource ShadowStyle}">
<ContentPresenter.RenderTransform>
<TranslateTransform X="1.0" Y="1.0" />
</ContentPresenter.RenderTransform>
</ContentPresenter>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="content"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#F96D6C" />
<Setter Property="Background" Value="#F78A8C"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#F75B5B" />
<Setter Property="Background" Value="#F4ADB0"/>
<Setter TargetName="content" Property="RenderTransform" >
<Setter.Value>
<TranslateTransform Y="1.0" />
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- SayThanks button style -->
<Style x:Key="SayThanksButton" TargetType="Button">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Background" Value="#E5E5E5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Name="border" BorderThickness="1" Padding="4,2" BorderBrush="#D0D0D0" CornerRadius="3" Background="{TemplateBinding Background}">
<Grid>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="contentShadow" Style="{StaticResource ShadowStyle}">
<ContentPresenter.RenderTransform>
<TranslateTransform X="1.0" Y="1.0" />
</ContentPresenter.RenderTransform>
</ContentPresenter>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="content"/>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#B0B0B0" />
<Setter Property="Background" Value="#CCCCCC"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#808080" />
<Setter Property="Background" Value="#BBBBBB"/>
<Setter TargetName="content" Property="RenderTransform" >
<Setter.Value>
<TranslateTransform Y="1.0" />
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Data validation styles -->
<Style TargetType="{x:Type TextBox}">
@@ -109,5 +30,44 @@
</Setter>
</Style>
<!-- Button -->
<Style TargetType="{x:Type Button}">
<Setter Property="Background" Value="{StaticResource DarkBackgroundBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource LighterForegroundBrush}"/>
</Style>
<Style TargetType="{x:Type controls:IconButton}">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:IconButton">
<Border Name="border" Padding="4,2" CornerRadius="15"
Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}" >
<DockPanel Name="content">
<Image Margin="5, 2, 0, 2" Source="{TemplateBinding IconSource}" />
<Label Margin="0,0,5,0" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}"/>
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="{Binding RelativeSource={RelativeSource AncestorType=controls:IconButton}, Path=MouseOverBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="border" Property="Background" Value="{Binding RelativeSource={RelativeSource AncestorType=controls:IconButton}, Path=PressedBrush}"/>
<Setter TargetName="content" Property="RenderTransform" >
<Setter.Value>
<TranslateTransform Y="1.0" />
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
@@ -9,9 +9,10 @@
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:command="http://www.galasoft.ch/mvvmlight"
xmlns:generic="clr-namespace:FileConverter.ValueConverters.Generic"
xmlns:controls="clr-namespace:FileConverter.Controls"
x:Class="FileConverter.Views.SettingsWindow"
MinWidth="640" MinHeight="480"
Width="920" Height="675"
MinWidth="800" MinHeight="600"
Width="1050" Height="700"
WindowStartupLocation="CenterScreen" Icon="/FileConverter;component/Resources/ApplicationIcon.ico"
mc:Ignorable="d"
DataContext="{Binding Settings, Source={StaticResource Locator}}"
@@ -24,11 +25,185 @@
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/CustomStyles.xaml"/>
<ResourceDictionary Source="Resources/ConversionPresetTemplates.xaml"/>
</ResourceDictionary.MergedDictionaries>
<generic:IcoFileSizeSelectorConverter x:Key="IcoFileSizeSelector" />
<generic:EqualsConverter x:Key="EqualsConverter"/>
<DataTemplate x:Key="NoPresetSelectedTemplate" DataType="{x:Type viewModels:SettingsViewModel}">
<Label HorizontalAlignment="Center" VerticalAlignment="Center" Height="auto" FontSize="20" Content="{x:Static project:Resources.NoPresetSelected}"/>
</DataTemplate>
<DataTemplate x:Key="FolderSelectedTemplate" DataType="{x:Type viewModels:SettingsViewModel}">
<GroupBox Header="{x:Static project:Resources.PresetFolder}">
<Grid DataContext="{Binding SelectedFolder}" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2.5*"/>
<ColumnDefinition Width="*" MaxWidth="240"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Grid.Column="0">
<Label Content="{x:Static project:Resources.PresetFolderName}" HorizontalContentAlignment="Right" Margin="0,0,5,0"/>
<TextBox Margin="5,2,25,2" TextWrapping="Wrap" Width="Auto" FontSize="15"
Loaded="SelectedFolderName_OnLoaded"
Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</DockPanel>
</Grid>
</GroupBox>
</DataTemplate>
<DataTemplate x:Key="PresetSelectedTemplate" DataType="{x:Type viewModels:SettingsViewModel}">
<GroupBox Header="{x:Static project:Resources.Preset}">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2.5*"/>
<ColumnDefinition Width="*" MaxWidth="240"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Grid.Column="0">
<Label Content="{x:Static project:Resources.PresetName}" Margin="0,0,5,0"/>
<TextBox Margin="5,2,5,2" TextWrapping="Wrap" FontSize="15"
Loaded="SelectedPresetName_OnLoaded"
Text="{Binding SelectedPreset.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</DockPanel>
<GroupBox Header="{x:Static project:Resources.OutputFormat}" Grid.Row="1" Grid.Column="0" Margin="5">
<StackPanel>
<ComboBox Margin="5" Height="29" VerticalAlignment="Top"
ItemsSource="{Binding OutputTypes}"
SelectedItem="{Binding SelectedPreset.Preset.OutputType, Converter={StaticResource OutputTypeEnumToViewModel}, Mode=TwoWay}">
<ComboBox.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderTemplate>
<DataTemplate>
<TextBlock Foreground="{StaticResource MainDarkBrush}" Background="{StaticResource MainLightBrush}" FontWeight="Bold" Padding="5,5,5,5"
Text="{Binding Name, Converter={StaticResource ObjectToLocalizedString}}"/>
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ComboBox.GroupStyle>
<ComboBox.ItemTemplate>
<DataTemplate DataType="{x:Type viewModels:OutputTypeViewModel}">
<TextBlock Text="{Binding Type}" Padding="10,2,2,2"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ContentControl Content="{Binding SelectedPreset.Preset}"
Style="{StaticResource ConversionSettingsSelectorStyle}">
</ContentControl>
<Separator/>
<!-- Output file name template -->
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="23"/>
<RowDefinition Height="23"/>
<RowDefinition Height="23"/>
</Grid.RowDefinitions>
<Label Content="{x:Static project:Resources.FileNameTemplate}" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,5,0"/>
<TextBox Grid.Row="0" Grid.Column="1" Margin="5,2,25,2" TextWrapping="Wrap" Width="Auto"
ToolTip="{x:Static project:Resources.OutputFilePathTemplateHelp}"
Text="{Binding SelectedPreset.OutputFileNameTemplate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
<Label Content="{x:Static project:Resources.InputExample}" Grid.Row="1" Grid.Column="0" HorizontalContentAlignment="Right" Margin="0,0,5,0" Foreground="{StaticResource LighterForegroundBrush}" FontSize="10"/>
<TextBlock Text="{x:Static project:Resources.OutputFileNameTemplateSample}" Grid.Row="1" Grid.Column="1" Margin="5,0,5,0" Foreground="{StaticResource LighterForegroundBrush}" FontSize="10" VerticalAlignment="Center"/>
<Label Content="{x:Static project:Resources.OutputExample}" Grid.Row="2" Grid.Column="0" HorizontalContentAlignment="Right" Margin="0,0,5,0" Foreground="{StaticResource LighterForegroundBrush}" FontSize="10"/>
<TextBlock Grid.Row="2" Grid.Column="1" Margin="5,0,5,0" Foreground="{StaticResource LighterForegroundBrush}" FontSize="10" VerticalAlignment="Center">
<TextBlock.Text>
<MultiBinding Converter="{StaticResource FileNameConverter}">
<Binding Source="{x:Static project:Resources.OutputFileNameTemplateSample}"/>
<Binding Path="SelectedPreset.Preset.OutputType" Mode="OneWay"/>
<Binding Path="SelectedPreset.Preset.OutputFileNameTemplate" Mode="OneWay"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="1" Margin="5,0,5,0">
<Hyperlink CommandParameter="https://github.com/Tichau/FileConverter/wiki/Output-file-path-template" Command="{Binding OpenUrlCommand, Mode=OneWay}" Foreground="{StaticResource HyperlinkBrush}"><x:Static Member="project:Resources.Help" /></Hyperlink>
</TextBlock>
</Grid>
</StackPanel>
</GroupBox>
<GroupBox Grid.Row="1" Grid.Column="1" Header="{x:Static project:Resources.InputFormats}" Margin="5">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="25"/>
<RowDefinition Height="25"/>
<RowDefinition Height="22"/>
</Grid.RowDefinitions>
<TreeView x:Name="InputTypesTreeView" ItemsSource="{Binding InputCategories}" >
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type viewModels:InputExtensionCategory}" ItemsSource="{Binding InputExtensions}">
<CheckBox Height="20" VerticalAlignment="Top" Margin="2" IsThreeState="True"
Content="{Binding Name, Converter={StaticResource ObjectToLocalizedString}}"
IsChecked="{Binding IsChecked, Mode=TwoWay}">
</CheckBox>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type viewModels:InputExtension}">
<CheckBox Height="20" VerticalAlignment="Top" Margin="2"
Content="{Binding Name}" Foreground="{Binding ForegroundBrush}" ToolTip="{Binding ToolTip}"
IsChecked="{Binding IsChecked, Mode=TwoWay}">
</CheckBox>
</DataTemplate>
</TreeView.Resources>
<TreeView.ItemContainerStyle>
<Style TargetType="TreeViewItem">
<Setter Property="IsExpanded" Value="True"/>
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
<Label Grid.Row="1" Content="{x:Static project:Resources.ActionWhenConversionSucceedTitle}" ToolTip="{x:Static project:Resources.ActionWhenConversionSucceedDescription}" />
<ComboBox Grid.Row="2" ItemsSource="{Binding InputPostConversionActions, Mode=OneTime}"
SelectedItem="{Binding SelectedPreset.Preset.InputPostConversionAction, Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate>
<ContentPresenter Content="{Binding Converter={StaticResource ObjectToLocalizedString}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Grid.Row="3" Margin="0,5,0,0">
<Hyperlink CommandParameter="https://github.com/Tichau/FileConverter/wiki/Input-file-post-conversion-actions" Command="{Binding OpenUrlCommand, Mode=OneWay}" Foreground="{StaticResource HyperlinkBrush}"><x:Static Member="project:Resources.Help" /></Hyperlink>
</TextBlock>
</Grid>
</GroupBox>
</Grid>
</GroupBox>
</DataTemplate>
<Style x:Key="SettingsSelectorStyle" TargetType="{x:Type ContentControl}">
<Setter Property="ContentTemplate" Value="{StaticResource NoPresetSelectedTemplate}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding SelectedFolder, Converter={StaticResource EqualsConverter}}" Value="False">
<Setter Property="ContentTemplate" Value="{StaticResource FolderSelectedTemplate}"/>
</DataTrigger>
<DataTrigger Binding="{Binding SelectedPreset, Converter={StaticResource EqualsConverter}}" Value="False">
<Setter Property="ContentTemplate" Value="{StaticResource PresetSelectedTemplate}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
</Window.Resources>
@@ -48,7 +223,6 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="48"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Image HorizontalAlignment="Left" Height="48" Width="48" VerticalAlignment="Top"
@@ -56,11 +230,6 @@
</Image>
<Label Grid.Column="1" Content="{x:Static project:Resources.Settings}" FontSize="20" Margin="4" VerticalAlignment="Center" />
<Label Grid.Column="2" HorizontalAlignment="Right" FontStyle="Italic" FontSize="14" VerticalAlignment="Center" Foreground="#FF999999">
<Label.Content>
<Binding Path="(local:Application.ApplicationVersion)" Converter="{StaticResource ApplicationVersionToApplicationName}" Mode="OneWay" />
</Label.Content>
</Label>
</Grid>
<TabControl Grid.Row="1">
@@ -80,13 +249,12 @@
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30"/>
<RowDefinition Height="25"/>
</Grid.RowDefinitions>
<TreeView Name="PresetTreeView" Grid.Row="0"
<TreeView Name="PresetTreeView" Grid.Row="0" AllowDrop="True" views:DragDropExtension.ScrollOnDragDrop="True"
ItemsSource="{Binding PresetsRootFolder.Children}"
Width="{Binding ActualWidth, ElementName=PresetListGrid, Mode=OneWay}" AllowDrop="True"
views:DragDropExtension.ScrollOnDragDrop="True">
Width="{Binding ActualWidth, ElementName=PresetListGrid, Mode=OneWay}">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type viewModels:PresetFolderNode}" ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
@@ -104,22 +272,24 @@
<Style TargetType="{x:Type TreeViewItem}">
<Style.Triggers>
<DataTrigger Binding="{Binding HasError, FallbackValue=False}" Value="True">
<Setter Property="Background" Value="#F44336"/>
<Setter Property="Background" Value="{StaticResource ErrorForegroundBrush}"/>
</DataTrigger>
</Style.Triggers>
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#86C8F6" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#074078" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#DFE0E0" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="#4B5762" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="{StaticResource AccentBackgroundColor}" />
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="{StaticResource AccentForegroundColor}" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{StaticResource DarkerBackgroundColor}" />
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="{StaticResource LightForegroundColor}" />
</Style.Resources>
<Setter Property="IsExpanded" Value="True"/>
<Setter Property="BorderBrush" Value="#1E6BB8"/>
<Setter Property="BorderBrush" Value="{StaticResource HyperlinkBrush}"/>
<EventSetter Event="TreeViewItem.DragOver" Handler="TreeView_DragOver"/>
<EventSetter Event="TreeViewItem.Drop" Handler="TreeView_Drop"/>
<EventSetter Event="TreeViewItem.MouseMove" Handler="TreeView_MouseMove"/>
<EventSetter Event="PreviewMouseLeftButtonDown" Handler="TreeView_MouseDown"/>
<EventSetter Event="MouseUp" Handler="TreeView_MouseUp"/>
<EventSetter Event="DragOver" Handler="TreeView_DragOver"/>
<EventSetter Event="Drop" Handler="TreeView_Drop"/>
<EventSetter Event="MouseMove" Handler="TreeView_MouseMove"/>
</Style>
</TreeView.ItemContainerStyle>
<i:Interaction.Behaviors>
@@ -128,204 +298,63 @@
HierarchyPredicate="{Binding PresetsHierarchyPredicate}"
ExpandSelected="False"/>
</i:Interaction.Behaviors>
<TreeView.ContextMenu>
<ContextMenu>
<MenuItem Header="{x:Static project:Resources.CreateANewFolder}" Command="{Binding CreateFolderCommand}">
<MenuItem.Icon>
<Image Source="{Binding Source=/FileConverter;component/Resources/FolderIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="{x:Static project:Resources.AddNewPreset}" Command="{Binding AddNewPresetCommand}">
<MenuItem.Icon>
<Image Source="{Binding Source=/FileConverter;component/Resources/PresetIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="{x:Static project:Resources.DuplicatePreset}" Command="{Binding DuplicatePresetCommand}">
<MenuItem.Icon>
<Image Source="{Binding Source=/FileConverter;component/Resources/DuplicatePresetIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</MenuItem.Icon>
</MenuItem>
<Separator />
<MenuItem Header="{x:Static project:Resources.ImportPresets}" Command="{Binding ImportPresetCommand}">
<MenuItem.Icon>
<Image Source="{Binding Source=/FileConverter;component/Resources/ImportIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="{x:Static project:Resources.ExportSelectedPresets}" Command="{Binding ExportPresetCommand}">
<MenuItem.Icon>
<Image Source="{Binding Source=/FileConverter;component/Resources/ExportIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</MenuItem.Icon>
</MenuItem>
<Separator />
<MenuItem Header="{x:Static project:Resources.RemoveSelectedPreset}" Command="{Binding RemoveSelectedPresetCommand}">
<MenuItem.Icon>
<Image Source="{Binding Source=/FileConverter;component/Resources/DeleteIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</TreeView.ContextMenu>
<TreeView.InputBindings>
<KeyBinding Key="Delete" Command="{Binding RemoveSelectedPresetCommand}"/>
</TreeView.InputBindings>
</TreeView>
<DockPanel Grid.Row="1" Margin="0,5,0,0" HorizontalAlignment="Center">
<Button Width="25" Margin="2,0"
ToolTip="{x:Static project:Resources.MoveUpSelectedPreset}"
Command="{Binding MovePresetUpCommand}">
<Image Source="{Binding Source=/FileConverter;component/Resources/UpIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</Button>
<Button Width="25" Margin="0,0,2,0"
ToolTip="{x:Static project:Resources.CreateANewFolder}"
Command="{Binding CreateFolderCommand}">
<Image Source="{Binding Source=/FileConverter;component/Resources/FolderIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</Button>
<Button Width="25" Margin="2,0"
ToolTip="{x:Static project:Resources.AddNewPreset}"
Command="{Binding AddNewPresetCommand}">
<Image Source="{Binding Source=/FileConverter;component/Resources/PresetIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</Button>
<Button Width="25" Margin="2,0"
ToolTip="{x:Static project:Resources.RemoveSelectedPreset}"
Command="{Binding RemoveSelectedPresetCommand}">
<Image Source="{Binding Source=/FileConverter;component/Resources/DeleteIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</Button>
<Button Width="25" Margin="2,0,0,0"
ToolTip="{x:Static project:Resources.MoveDownSelectedPreset}"
Command="{Binding MovePresetDownCommand}">
<Image Source="{Binding Source=/FileConverter;component/Resources/DownIcon.ico, Converter={StaticResource IcoFileSizeSelector}, ConverterParameter=48}"
Style="{StaticResource EnableDisableImageStyle}"/>
</Button>
<TextBlock Margin="5,5,0,0">
<Hyperlink CommandParameter="https://github.com/Tichau/FileConverter/wiki/How-to-create-a-new-custom-preset%3F" Command="{Binding OpenUrlCommand, Mode=OneWay}" Foreground="#1E6BB8"><x:Static Member="project:Resources.Help" /></Hyperlink>
</TextBlock>
</DockPanel>
<TextBlock Margin="4" Grid.Row="1">
<Hyperlink CommandParameter="https://github.com/Tichau/FileConverter/wiki/How-to-create-a-new-custom-preset%3F" Command="{Binding OpenUrlCommand, Mode=OneWay}" Foreground="{StaticResource HyperlinkBrush}"><x:Static Member="project:Resources.Help" /></Hyperlink>
</TextBlock>
</Grid>
<!-- Folder settings -->
<GroupBox Header="{x:Static project:Resources.PresetFolder}" Margin="5,5,0,0" Grid.Column="1"
Visibility="{Binding SelectedFolder, Converter={StaticResource ReferenceToVisibility}}">
<Grid DataContext="{Binding SelectedFolder}" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MaxWidth="240"/>
<ColumnDefinition Width="2.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Content="{x:Static project:Resources.PresetFolderName}" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,5,0"/>
<TextBox x:Name="FolderNameTextBox" Grid.Row="0" Grid.Column="1" Margin="5,2,25,2" TextWrapping="Wrap" Width="Auto" FontSize="15"
Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
</Grid>
</GroupBox>
<!-- Preset settings -->
<GroupBox Header="{x:Static project:Resources.Preset}" Margin="5,5,0,0" Grid.Column="1"
Visibility="{Binding SelectedPreset, Converter={StaticResource ReferenceToVisibility}}">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" MaxWidth="240"/>
<ColumnDefinition Width="2.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Label Content="{x:Static project:Resources.PresetName}" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,5,0"/>
<TextBox x:Name="PresetNameTextBox" Grid.Row="0" Grid.Column="1" Margin="5,2,25,2" TextWrapping="Wrap" Width="Auto" FontSize="15"
Text="{Binding SelectedPreset.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
<GroupBox Grid.Row="1" Grid.Column="0" Header="{x:Static project:Resources.InputFormats}" Margin="5">
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="25"/>
<RowDefinition Height="25"/>
<RowDefinition Height="22"/>
</Grid.RowDefinitions>
<TreeView x:Name="InputTypesTreeView" ItemsSource="{Binding InputCategories}" >
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type viewModels:InputExtensionCategory}" ItemsSource="{Binding InputExtensions}">
<CheckBox Content="{Binding Name, Converter={StaticResource ObjectToLocalizedString}}" Height="20" VerticalAlignment="Top" Margin="2" Checked="OnInputTypeCategoryChecked" Unchecked="OnInputTypeCategoryUnchecked" IsThreeState="True" >
<CheckBox.IsChecked>
<MultiBinding Converter="{StaticResource CollectionContainsElementToBool}" Mode="OneWay">
<Binding RelativeSource="{RelativeSource AncestorType={x:Type Window}}" Path="DataContext.SelectedPreset.Preset.InputTypes" Mode="OneWay"/>
<Binding Path="InputExtensionNames" Mode="OneWay"/>
</MultiBinding>
</CheckBox.IsChecked>
</CheckBox>
</HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type viewModels:InputExtension}">
<CheckBox Content="{Binding Name}" Foreground="{Binding ForegroundBrush}" ToolTip="{Binding ToolTip}" Height="20" VerticalAlignment="Top" Margin="2" Checked="OnInputTypeChecked" Unchecked="OnInputTypeUnchecked">
<CheckBox.IsChecked>
<MultiBinding Converter="{StaticResource CollectionContainsElementToBool}" Mode="OneWay">
<Binding RelativeSource="{RelativeSource AncestorType={x:Type Window}}" Path="DataContext.SelectedPreset.Preset.InputTypes" Mode="OneWay"/>
<Binding Path="Name" Mode="OneWay"/>
</MultiBinding>
</CheckBox.IsChecked>
</CheckBox>
</DataTemplate>
</TreeView.Resources>
<TreeView.ItemContainerStyle>
<Style TargetType="TreeViewItem">
<Setter Property="IsExpanded" Value="True"/>
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
<Label Grid.Row="1" Content="{x:Static project:Resources.ActionWhenConversionSucceedTitle}" ToolTip="{x:Static project:Resources.ActionWhenConversionSucceedDescription}" />
<ComboBox Grid.Row="2" ItemsSource="{Binding InputPostConversionActions, Mode=OneTime}"
SelectedItem="{Binding SelectedPreset.Preset.InputPostConversionAction, Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate>
<ContentPresenter Content="{Binding Converter={StaticResource ObjectToLocalizedString}}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Grid.Row="3" Margin="0,5,0,0">
<Hyperlink CommandParameter="https://github.com/Tichau/FileConverter/wiki/Input-file-post-conversion-actions" Command="{Binding OpenUrlCommand, Mode=OneWay}" Foreground="#1E6BB8"><x:Static Member="project:Resources.Help" /></Hyperlink>
</TextBlock>
</Grid>
</GroupBox>
<GroupBox Header="{x:Static project:Resources.OutputFormat}" Grid.Row="1" Grid.Column="1" Margin="5">
<StackPanel>
<ComboBox Margin="5" Height="29" VerticalAlignment="Top"
ItemsSource="{Binding OutputTypes}"
SelectedItem="{Binding SelectedPreset.Preset.OutputType, Converter={StaticResource OutputTypeEnumToViewModel}, Mode=TwoWay}">
<ComboBox.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderTemplate>
<DataTemplate>
<TextBlock Foreground="#004B82" Background="#86C8F6" FontWeight="Bold" Padding="5,5,5,5"
Text="{Binding Name, Converter={StaticResource ObjectToLocalizedString}}"/>
</DataTemplate>
</GroupStyle.HeaderTemplate>
</GroupStyle>
</ComboBox.GroupStyle>
<ComboBox.ItemTemplate>
<DataTemplate DataType="{x:Type viewModels:OutputTypeViewModel}">
<TextBlock Text="{Binding Type}" Padding="10,2,2,2"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<ContentControl Content="{Binding SelectedPreset.Preset}"
Style="{StaticResource ConversionSettingsSelectorStyle}">
</ContentControl>
<Separator/>
<!-- Output file name template -->
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="23"/>
<RowDefinition Height="23"/>
<RowDefinition Height="23"/>
</Grid.RowDefinitions>
<Label Content="{x:Static project:Resources.FileNameTemplate}" Grid.Row="0" HorizontalContentAlignment="Right" Margin="0,0,5,0"/>
<TextBox Grid.Row="0" Grid.Column="1" Margin="5,2,25,2" TextWrapping="Wrap" Width="Auto"
ToolTip="{x:Static project:Resources.OutputFilePathTemplateHelp}"
Text="{Binding SelectedPreset.OutputFileNameTemplate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
<Label Content="{x:Static project:Resources.InputExample}" Grid.Row="1" Grid.Column="0" HorizontalContentAlignment="Right" Margin="0,0,5,0" Foreground="Gray" FontSize="10"/>
<TextBlock Text="{x:Static project:Resources.OutputFileNameTemplateSample}" Grid.Row="1" Grid.Column="1" Margin="5,0,5,0" Foreground="Gray" FontSize="10" VerticalAlignment="Center"/>
<Label Content="{x:Static project:Resources.OutputExample}" Grid.Row="2" Grid.Column="0" HorizontalContentAlignment="Right" Margin="0,0,5,0" Foreground="Gray" FontSize="10"/>
<TextBlock Grid.Row="2" Grid.Column="1" Margin="5,0,5,0" Foreground="Gray" FontSize="10" VerticalAlignment="Center">
<TextBlock.Text>
<MultiBinding Converter="{StaticResource FileNameConverter}">
<Binding Source="{x:Static project:Resources.OutputFileNameTemplateSample}"/>
<Binding Path="SelectedPreset.Preset.OutputType" Mode="OneWay"/>
<Binding Path="SelectedPreset.Preset.OutputFileNameTemplate" Mode="OneWay"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="1" Margin="5,0,5,0">
<Hyperlink CommandParameter="https://github.com/Tichau/FileConverter/wiki/Output-file-path-template" Command="{Binding OpenUrlCommand, Mode=OneWay}" Foreground="#1E6BB8"><x:Static Member="project:Resources.Help" /></Hyperlink>
</TextBlock>
</Grid>
</StackPanel>
</GroupBox>
</Grid>
</GroupBox>
<!-- Selected item settings -->
<ContentControl x:Name="SelectedItemSettings" Grid.Column="1" Margin="5,5,0,0"
Content="{Binding .}"
Style="{StaticResource SettingsSelectorStyle}">
</ContentControl>
</Grid>
</TabItem>
@@ -395,12 +424,12 @@
</DockPanel>
<DockPanel Grid.Row="1" Grid.Column="0" Margin="0,0,5,0">
<FlowDocumentScrollViewer Grid.Row="0" Grid.Column="0" Margin="5,10,5,10" HorizontalAlignment="Stretch" VerticalAlignment="Top" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DockPanel.Dock="Top"
<FlowDocumentScrollViewer Margin="5,10,5,10" HorizontalAlignment="Stretch" VerticalAlignment="Top" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" DockPanel.Dock="Top"
Document="{Binding UpgradeVersionDescription.ChangeLog, Source={StaticResource Upgrade}, Converter={StaticResource ChangelogToMarkdown}, ConverterParameter=True|}" />
<TextBlock Grid.Row="1" Margin="5" DockPanel.Dock="Top" FontSize="14" HorizontalAlignment="Center"
<TextBlock Margin="5" DockPanel.Dock="Top" FontSize="14" HorizontalAlignment="Center"
Visibility="{Binding DisplaySeeChangeLogLink, Mode=OneWay, Converter={StaticResource BoolToVisibility}}">
<Hyperlink Foreground="#1E6BB8" Command="{Binding GetChangeLogContentCommand, Mode=OneWay}"><x:Static Member="project:Resources.SeeChangeLog" /></Hyperlink>
<Hyperlink Foreground="{StaticResource HyperlinkBrush}" Command="{Binding GetChangeLogContentCommand, Mode=OneWay}"><x:Static Member="project:Resources.SeeChangeLog" /></Hyperlink>
</TextBlock>
</DockPanel>
@@ -410,44 +439,34 @@
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
<Label Content="{x:Static project:Resources.DonateDescription}" VerticalAlignment="Center" FontStyle="Italic"/>
<Button Style="{StaticResource DonateButton}" Margin="5,0,5,0" Command="{Binding OpenUrlCommand, Mode=OneWay}" CommandParameter="https://tichau.itch.io/file-converter/purchase">
<Button.Content>
<DockPanel>
<Image Source="/FileConverter;component/Resources/ItchIO-icon.png"></Image>
<Label Content="{x:Static project:Resources.DonateButtonTitle}" Margin="5,0,5,0" Foreground="WhiteSmoke" FontWeight="Bold" FontSize="14"/>
</DockPanel>
</Button.Content>
</Button>
<Button Style="{StaticResource SayThanksButton}" Margin="5,0,5,0" Command="{Binding OpenUrlCommand, Mode=OneWay}" CommandParameter="https://saythanks.io/to/Tichau">
<Button.Content>
<DockPanel>
<Image Source="/FileConverter;component/Resources/SayThanks-icon.png"></Image>
<Label Content="{x:Static project:Resources.SayThanksButtonTitle}" Margin="5,0,5,0" Foreground="DimGray" FontWeight="Bold" FontSize="14"/>
</DockPanel>
</Button.Content>
</Button>
<controls:IconButton Margin="5,0,5,0" Background="#0467B4" Foreground="White" MouseOverBrush="#007AD8" PressedBrush="#0F4199"
Command="{Binding OpenUrlCommand, Mode=OneWay}" CommandParameter="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&amp;business=3BDWQTYTTA3D8&amp;item_name=File+Converter+Donations&amp;currency_code=EUR"
IconSource="/FileConverter;component/Resources/PaypalIcon.png" Content="{x:Static project:Resources.DonateButtonTitle}" FontWeight="Bold" FontSize="14" />
<controls:IconButton Margin="5,0,5,0" Background="#BBBBBB" Foreground="#505050" MouseOverBrush="#CCCCCC" PressedBrush="#AAAAAA"
Command="{Binding OpenUrlCommand, Mode=OneWay}" CommandParameter="https://saythanks.io/to/adrien.allard.pro%40gmail.com"
IconSource="/FileConverter;component/Resources/SayThanksIcon.png" Content="{x:Static project:Resources.SayThanksButtonTitle}" FontWeight="Bold" FontSize="14" />
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,0">
<Button ToolTip="{x:Static project:Resources.GitHubButtonDescription}" Background="WhiteSmoke" BorderBrush="DarkGray" Padding="1" Margin="5,0,5,0"
<Button ToolTip="{x:Static project:Resources.GitHubButtonDescription}" Padding="1" Margin="5,0,5,0"
Command="{Binding OpenUrlCommand, Mode=OneWay}" CommandParameter="https://github.com/Tichau/FileConverter/?from=about">
<Button.Content>
<Image Source="/FileConverter;component/Resources/GitHub-Icon.png"></Image>
</Button.Content>
</Button>
<Button ToolTip="{x:Static project:Resources.IssueButtonDescription}" Background="WhiteSmoke" BorderBrush="DarkGray" Padding="1" Margin="5,0,5,0"
<Button ToolTip="{x:Static project:Resources.IssueButtonDescription}" Padding="1" Margin="5,0,5,0"
Command="{Binding OpenUrlCommand, Mode=OneWay}" CommandParameter="https://github.com/Tichau/FileConverter/issues?from=about">
<Button.Content>
<Image Source="/FileConverter;component/Resources/GitHub-Issue-Icon.png"></Image>
</Button.Content>
</Button>
<Button ToolTip="{x:Static project:Resources.DocumentationButtonDescription}" Background="WhiteSmoke" BorderBrush="DarkGray" Padding="1" Margin="5,0,5,0"
<Button ToolTip="{x:Static project:Resources.DocumentationButtonDescription}" Padding="1" Margin="5,0,5,0"
Command="{Binding OpenUrlCommand, Mode=OneWay}" CommandParameter="https://github.com/Tichau/FileConverter/wiki?from=about">
<Button.Content>
<Image Source="/FileConverter;component/Resources/GitHub-Documentation-Icon.png"></Image>
</Button.Content>
</Button>
<Button ToolTip="{x:Static project:Resources.WebsiteButtonDescription}" Background="WhiteSmoke" BorderBrush="DarkGray" Padding="1" Margin="5,0,5,0"
<Button ToolTip="{x:Static project:Resources.WebsiteButtonDescription}" Padding="1" Margin="5,0,5,0"
Command="{Binding OpenUrlCommand, Mode=OneWay}" CommandParameter="www.file-converter.org?from=about">
<Button.Content>
<Image Source="/FileConverter;component/Resources/WebSite-Icon.png"></Image>
@@ -455,7 +474,7 @@
</Button>
</StackPanel>
<Label Grid.Row="3" Grid.Column="0" Content="Copyright @ 2017, Adrien Allard. All right reserved." Foreground="#FF4D4D4D" Margin="0,2,0,2"/>
<Label Grid.Row="3" Grid.Column="0" Content="Copyright @ 2020, Adrien Allard. All right reserved." Foreground="{StaticResource LightForegroundBrush}" Margin="0,2,0,2"/>
</Grid>
</TabItem>
</TabControl>
@@ -19,6 +19,11 @@ namespace FileConverter.Views
/// </summary>
public partial class SettingsWindow : Window
{
private TextBox selectedPresetNameTextBox;
private TextBox selectedFolderNameTextBox;
private string focusMessage;
private bool dragInProgress = false;
private enum DragDropTargetPosition
{
Before,
@@ -31,109 +36,63 @@ namespace FileConverter.Views
this.InitializeComponent();
Messenger.Default.Register<string>(this, "DoFocus", this.DoFocus);
(this.DataContext as SettingsViewModel).PropertyChanged += this.SettingsWindow_PropertyChanged;
this.PresetTreeView.MouseDown += this.TreeView_MouseDown;
this.PresetTreeView.MouseUp += this.TreeView_MouseUp;
}
private void SettingsWindow_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs args)
{
if (args.PropertyName == "SelectedItem")
{
TreeViewItem selectedItem = this.GetTreeViewItem(this.PresetTreeView, this.PresetTreeView.SelectedItem);
selectedItem?.BringIntoView();
}
}
public void DoFocus(string message)
{
this.focusMessage = message;
switch (message)
{
case "PresetName":
this.PresetNameTextBox.Focus();
this.PresetNameTextBox.SelectAll();
this.selectedPresetNameTextBox?.Focus();
this.selectedPresetNameTextBox?.SelectAll();
break;
case "FolderName":
this.FolderNameTextBox.Focus();
this.FolderNameTextBox.SelectAll();
this.selectedFolderNameTextBox?.Focus();
this.selectedFolderNameTextBox?.SelectAll();
break;
}
}
private void OnInputTypeChecked(object sender, RoutedEventArgs e)
private void TreeView_MouseDown(object sender, MouseButtonEventArgs args)
{
SettingsViewModel dataContext = this.DataContext as SettingsViewModel;
if (dataContext.SelectedPreset == null)
FrameworkElement element = args.OriginalSource as FrameworkElement;
TreeViewItem treeViewItem = this.GetNearestContainer(element);
if (treeViewItem != null)
{
return;
treeViewItem.IsSelected = true;
this.dragInProgress = args.ChangedButton == MouseButton.Left;
}
CheckBox checkBox = sender as CheckBox;
if (!checkBox.IsVisible)
else
{
return;
}
string inputFormat = (checkBox.Content as string).ToLowerInvariant();
dataContext.SelectedPreset.Preset.AddInputType(inputFormat);
}
private void OnInputTypeUnchecked(object sender, RoutedEventArgs e)
{
SettingsViewModel dataContext = this.DataContext as SettingsViewModel;
if (dataContext.SelectedPreset == null)
{
return;
}
CheckBox checkBox = sender as CheckBox;
if (!checkBox.IsVisible)
{
return;
}
string inputFormat = (checkBox.Content as string).ToLowerInvariant();
dataContext.SelectedPreset.Preset.RemoveInputType(inputFormat);
}
private void OnInputTypeCategoryChecked(object sender, RoutedEventArgs e)
{
SettingsViewModel dataContext = this.DataContext as SettingsViewModel;
if (dataContext.SelectedPreset == null)
{
return;
}
CheckBox checkBox = sender as CheckBox;
string categoryName = checkBox.Content as string;
InputExtensionCategory category = dataContext.InputCategories.FirstOrDefault(match => match.Name == categoryName);
if (category == null)
{
return;
}
foreach (string inputExtension in category.InputExtensionNames)
{
dataContext.SelectedPreset.Preset.AddInputType(inputExtension);
this.dragInProgress = false;
}
}
private void OnInputTypeCategoryUnchecked(object sender, RoutedEventArgs e)
private void TreeView_MouseUp(object sender, MouseButtonEventArgs args)
{
SettingsViewModel dataContext = this.DataContext as SettingsViewModel;
if (dataContext.SelectedPreset == null)
{
return;
}
CheckBox checkBox = sender as CheckBox;
string categoryName = checkBox.Content as string;
InputExtensionCategory category = dataContext.InputCategories.FirstOrDefault(match => match.Name == categoryName);
if (category == null)
{
return;
}
foreach (string inputExtension in category.InputExtensionNames)
{
dataContext.SelectedPreset.Preset.RemoveInputType(inputExtension);
}
this.dragInProgress = false;
}
private void TreeView_MouseMove(object sender, MouseEventArgs args)
{
if (args.LeftButton == MouseButtonState.Pressed &&
if (this.dragInProgress &&
args.LeftButton == MouseButtonState.Pressed &&
this.PresetTreeView.SelectedItem is AbstractTreeNode nodeToDrag)
{
var dataObj = new DataObject();
@@ -380,5 +339,25 @@ namespace FileConverter.Views
return null;
}
private void SelectedPresetName_OnLoaded(object sender, RoutedEventArgs e)
{
this.selectedPresetNameTextBox = (TextBox)sender;
if (this.focusMessage == "PresetName")
{
this.DoFocus(this.focusMessage);
this.focusMessage = null;
}
}
private void SelectedFolderName_OnLoaded(object sender, RoutedEventArgs e)
{
this.selectedFolderNameTextBox = (TextBox)sender;
if (this.focusMessage == "FolderName")
{
this.DoFocus(this.focusMessage);
this.focusMessage = null;
}
}
}
}
@@ -35,7 +35,7 @@
Document="{Binding UpgradeVersionDescription.ChangeLog, Source={StaticResource Upgrade}, Converter={StaticResource ChangelogToMarkdown}}"/>
<!-- Download button -->
<Button Background="WhiteSmoke" Grid.Row="3" Padding="10,5,10,5" Margin="5" HorizontalContentAlignment="Left" Command="{Binding DownloadInstallerCommand}"
<Button Grid.Row="3" Padding="10,5,10,5" Margin="5" HorizontalContentAlignment="Left" Command="{Binding DownloadInstallerCommand}"
Visibility="{Binding UpgradeVersionDescription.InstallerDownloadNotStarted, Source={StaticResource Upgrade}, Converter={StaticResource BoolToVisibility}, ConverterParameter=Collapsed}">
<Button.Content>
<Grid>
@@ -70,13 +70,13 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="{x:Static project:Resources.UpgradeDownloadInProgress}" FontSize="14.667"/>
<ProgressBar Grid.Row="1" Margin="5" Height="30" Foreground="#004B82" Minimum="0" Maximum="100"
<ProgressBar Grid.Row="1" Margin="5" Height="30" Foreground="{StaticResource MainDarkBrush}" Minimum="0" Maximum="100"
Value="{Binding UpgradeVersionDescription.InstallerDownloadProgress, Source={StaticResource Upgrade}}"/>
</Grid>
</Grid>
<!-- Install button -->
<Button Background="WhiteSmoke" Grid.Row="3" Padding="10,5,10,5" Margin="5" HorizontalContentAlignment="Left" Command="{Binding LaunchInstallerCommand}"
<Button Grid.Row="3" Padding="10,5,10,5" Margin="5" HorizontalContentAlignment="Left" Command="{Binding LaunchInstallerCommand}"
Visibility="{Binding UpgradeVersionDescription.InstallerDownloadDone, Source={StaticResource Upgrade}, Converter={StaticResource BoolToVisibility}, ConverterParameter=Collapsed}">
<Button.Content>
<Grid>
+3 -3
View File
@@ -14,7 +14,7 @@ namespace FileConverter
{
if (string.IsNullOrEmpty(path))
{
throw new ArgumentNullException("path");
throw new ArgumentNullException(nameof(path));
}
XmlRootAttribute xmlRoot = new XmlRootAttribute
@@ -55,12 +55,12 @@ namespace FileConverter
{
if (string.IsNullOrEmpty(path))
{
throw new ArgumentNullException("path");
throw new ArgumentNullException(nameof(path));
}
if (objectToSerialize == null)
{
throw new ArgumentNullException("objectToSerialize");
throw new ArgumentNullException(nameof(objectToSerialize));
}
XmlRootAttribute xmlRoot = new XmlRootAttribute
@@ -282,21 +282,22 @@ namespace FileConverterExtension
{
if (string.IsNullOrEmpty(this.FileConverterPath))
{
MessageBox.Show(string.Format("Can't retrieve the file converter executable path. You should try to reinstall the application."));
MessageBox.Show("Can't retrieve the file converter executable path. You should try to reinstall the application.");
return;
}
if (!File.Exists(this.FileConverterPath))
{
MessageBox.Show(string.Format("Can't find the file converter executable ({0}). You should try to reinstall the application.", this.FileConverterPath));
MessageBox.Show($"Can't find the file converter executable ({this.FileConverterPath}). You should try to reinstall the application.");
return;
}
ProcessStartInfo processStartInfo = new ProcessStartInfo(this.FileConverterPath);
processStartInfo.CreateNoWindow = false;
processStartInfo.UseShellExecute = false;
processStartInfo.RedirectStandardOutput = false;
ProcessStartInfo processStartInfo = new ProcessStartInfo(this.FileConverterPath)
{
CreateNoWindow = false,
UseShellExecute = false,
RedirectStandardOutput = false,
};
// Build arguments string.
StringBuilder stringBuilder = new StringBuilder();
@@ -310,21 +311,22 @@ namespace FileConverterExtension
{
if (string.IsNullOrEmpty(this.FileConverterPath))
{
MessageBox.Show(string.Format("Can't retrieve the file converter executable path. You should try to reinstall the application."));
MessageBox.Show("Can't retrieve the file converter executable path. You should try to reinstall the application.");
return;
}
if (!File.Exists(this.FileConverterPath))
{
MessageBox.Show(string.Format("Can't find the file converter executable ({0}). You should try to reinstall the application.", this.FileConverterPath));
MessageBox.Show($"Can't find the file converter executable ({this.FileConverterPath}). You should try to reinstall the application.");
return;
}
ProcessStartInfo processStartInfo = new ProcessStartInfo(this.FileConverterPath);
processStartInfo.CreateNoWindow = false;
processStartInfo.UseShellExecute = false;
processStartInfo.RedirectStandardOutput = false;
ProcessStartInfo processStartInfo = new ProcessStartInfo(this.FileConverterPath)
{
CreateNoWindow = false,
UseShellExecute = false,
RedirectStandardOutput = false,
};
// Build arguments string.
StringBuilder stringBuilder = new StringBuilder();
@@ -14,19 +14,16 @@ namespace FileConverterExtension
public string FullName
{
get;
private set;
}
public string Name
{
get;
private set;
}
public string[] Folders
{
get;
private set;
}
public bool Enabled
+4 -1
View File
@@ -4,6 +4,7 @@
- Added: Possibility to create custom command line preset for types converted with FFMPEG (video and audio).
- Added: Possibility to create preset folders in File Converter context menu.
- Added: Ability to drag and drop to move conversion presets.
- Added: Possibility to export and import conversion presets to share it with other users.
- Added: Brazilian Portuguese translation (thanks to Marhc).
- Added: Spanish translation (thanks to Chachak).
- Added: Italian translation (thanks to Davide).
@@ -17,7 +18,8 @@
- Added: Highlight in red elements that contains errors in the preset list.
- Added: "Say thanks" button if you can't donate and want to keep my motivation up :).
- Added: Messages logged from main thread are now displayed in the console standard output.
- Change: Replace Pledgie donation button by Itch.io donation button since Pledgie does not exist anymore.
- Change: Some UX improvements.
- Change: Replace Pledgie donation button by Paypal donation button since Pledgie does not exist anymore.
- Change: Correction of spell mistakes in the french translation (thanks to Sylvain Pollet-Villard).
- Change: Change output files timestamp to match original file (github issue #33) (thanks to Diego López Bugna).
- Fixed: Issue where File Converter version upgrade download was not working due to an issue with https encryption.
@@ -28,6 +30,7 @@
- Tech: Update SharpShell to v2.7.1.
- Tech: Update project to Visual Studio 2017 and installer Wix 3.11.
- Tech: Update project to .NET framework 4.6.1 (the last .NET version compatible with Windows Vista).
- Tech: Check for .NET framework version in installer and prompt the user if the required version is not installed.
- Tech: Remove sharpshell tools from installer dependencies. The shell extension is now registered by File Converter application (github issue #39 #46).
## Version 1.2.3
+1
View File
@@ -70,6 +70,7 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/UpdatesManger/IsDownloadUpdateDataAllowed/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=bindable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bitrate/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=FFMPEG/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mvvminpc/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unregister/@EntryIndexedValue">True</s:Boolean>
+1 -1
View File
@@ -11,7 +11,7 @@ You can find more information about what's in File converter and how to use it o
File Converter is a personal open source project started in 2014. I have put hundreds of hours adding, refining and tuning File Converter with the goal of making the conversion and compression of files an easy task for everyone.
You can help me by [contributing to the project](https://github.com/Tichau/FileConverter/wiki#contribute), by [making a donation](https://tichau.itch.io/file-converter) or just by [saying thanks​](https://saythanks.io/to/Tichau) :).
You can help me by [contributing to the project](https://github.com/Tichau/FileConverter/wiki#contribute), by [making a donation](https://www.paypal.com/donate/?cmd=_donations&business=3BDWQTYTTA3D8&item_name=File+Converter+Donations&currency_code=EUR&Z3JncnB0=) or just by [saying thanks​](https://saythanks.io/to/Tichau) :).
## Troubleshooting
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

File renamed without changes.
File renamed without changes.
+20 -19
View File
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -17,14 +15,14 @@
height="512"
viewBox="0 0 512 512"
xml:space="preserve"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="ApplicationIcon.svg"
inkscape:export-filename="D:\Users\Adrien.Adrien-PC\Documents\GitHub\FileConverter\Resources\ApplicationIcon.png"
inkscape:export-xdpi="8.6400003"
inkscape:export-ydpi="8.6400003"><metadata
inkscape:export-filename="C:\Users\adrie\Documents\file-converter.png"
inkscape:export-xdpi="49.152"
inkscape:export-ydpi="49.152"><metadata
id="metadata3385"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs3383" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
@@ -34,8 +32,8 @@
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2854"
inkscape:window-height="1955"
inkscape:window-width="2498"
inkscape:window-height="1417"
id="namedview3381"
showgrid="false"
showguides="true"
@@ -43,10 +41,11 @@
inkscape:zoom="1.28"
inkscape:cx="83.38705"
inkscape:cy="271.45551"
inkscape:window-x="133"
inkscape:window-y="-13"
inkscape:window-x="54"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="layer2"><sodipodi:guide
inkscape:current-layer="layer2"
inkscape:document-rotation="0"><sodipodi:guide
position="21.058654,403.40483"
orientation="0,1"
id="guide4315"
@@ -54,7 +53,8 @@
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Background"
transform="translate(0,-280)"><circle
transform="translate(0,-280)"
style="display:inline"><circle
style="opacity:1;fill:#0171bb;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4286"
cx="256.78796"
@@ -88,8 +88,9 @@
sodipodi:rx="164.15593"
sodipodi:ry="164.15593"
sodipodi:start="0.5814947"
sodipodi:end="6.2723665"
d="M 392.85391,621.79725 A 164.15593,164.15593 0 0 1 186.73705,680.6082 164.15593,164.15593 0 0 1 98.159678,485.42384 164.15593,164.15593 0 0 1 278.13951,369.01875 164.15593,164.15593 0 0 1 419.82455,529.8548"
sodipodi:end="0.0036139806"
d="M 392.85391,621.79725 A 164.15593,164.15593 0 0 1 186.19996,680.35848 164.15593,164.15593 0 0 1 98.497224,484.28834 164.15593,164.15593 0 0 1 279.89837,369.2714 164.15593,164.15593 0 0 1 419.83308,532.22399"
sodipodi:arc-type="arc"
sodipodi:open="true" /><path
style="fill:#ffffff;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 369.24024,529.2613 52.26457,89.16055 48.0834,-89.16055 z"
@@ -139,13 +140,13 @@
transform="translate(0,-280)"><g
transform="translate(358.94885,245.63935)"
id="g3"
style="fill:#ffffff;fill-opacity:0.94117647;stroke:#ffffff;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><g
style="fill:#ffffff;fill-opacity:0.941176;stroke:#ffffff;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><g
id="g5"
style="fill:#ffffff;fill-opacity:0.94117647;stroke:#ffffff;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path
style="fill:#ffffff;fill-opacity:0.941176;stroke:#ffffff;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"><path
inkscape:connector-curvature="0"
d="m -174.15384,386.14314 h 149.574394 c 4.183017,0 7.605485,-3.42247 7.605485,-7.60549 V 249.37146 c 0,-2.15503 -0.887157,-4.18301 -2.408254,-5.57751 l -58.815902,-54.63288 c -1.39404,-1.26743 -3.295411,-2.02798 -5.196783,-2.02798 h -90.75894 c -4.18302,0 -7.60548,3.42247 -7.60548,7.60549 v 183.79907 c 0,4.18302 3.42246,7.60549 7.60548,7.60549 z M -32.184931,252.66687 v 0.38028 H -84.155448 V 204.37204 Z M -166.54835,202.34406 h 67.181935 v 58.30857 c 0,4.18302 3.422465,7.60549 7.605481,7.60549 h 59.57645 V 370.93217 H -166.54835 Z"
id="path7"
style="fill:#ffffff;fill-opacity:0.94117647;stroke:#ffffff;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g></g><g
style="fill:#ffffff;fill-opacity:0.941176;stroke:#ffffff;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g></g><g
transform="translate(491.76135,105.01435)"
id="g9" /><g
transform="translate(491.76135,105.01435)"
@@ -175,4 +176,4 @@
transform="translate(491.76135,105.01435)"
id="g35" /><g
transform="translate(491.76135,105.01435)"
id="g37" /></g></svg>
id="g37" /></g></svg>

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

+16 -12
View File
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -14,11 +12,11 @@
viewBox="0 0 256.00001 256.00001"
id="svg2"
version="1.1"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="CancelIcon.svg"
inkscape:export-filename="C:\Users\aallard\Documents\GitHub\FileConverter\Resources\CancelIcon.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
inkscape:export-filename="D:\Users\adrie\Documents\GitHub\FileConverter\Resources\CancelIcon.png"
inkscape:export-xdpi="36"
inkscape:export-ydpi="36">
<defs
id="defs4" />
<sodipodi:namedview
@@ -35,11 +33,12 @@
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="2854"
inkscape:window-height="1955"
inkscape:window-x="133"
inkscape:window-y="-13"
inkscape:window-maximized="1" />
inkscape:window-width="2498"
inkscape:window-height="1417"
inkscape:window-x="54"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:document-rotation="0" />
<metadata
id="metadata7">
<rdf:RDF>
@@ -48,7 +47,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -62,5 +61,10 @@
d="M 128,803.1122 A 121.25,121.25 0 0 0 6.75,924.3622 121.25,121.25 0 0 0 128,1045.6122 121.25,121.25 0 0 0 249.25,924.3622 121.25,121.25 0 0 0 128,803.1122 Z m 0,20.20833 A 101.04167,101.04167 0 0 1 229.04167,924.3622 101.04167,101.04167 0 0 1 211.66526,980.96132 L 57.714866,851.77797 A 101.04167,101.04167 0 0 1 128,823.32053 Z M 44.334737,867.76308 198.28513,996.9464 A 101.04167,101.04167 0 0 1 128,1025.4039 101.04167,101.04167 0 0 1 26.958333,924.3622 101.04167,101.04167 0 0 1 44.334737,867.76308 Z"
id="path3338"
inkscape:connector-curvature="0" />
<path
style="fill:#ff5252;fill-opacity:1;stroke-width:0.5"
d="m 116.86763,248.4844 c -14.88741,-1.43081 -29.313565,-5.57993 -42.75,-12.29536 C 21.391233,209.83678 -4.8133375,149.35669 12.159977,93.190925 16.27553,79.572295 22.726845,66.8775 31.553261,55.02912 36.336082,48.608771 49.373805,35.670851 55.746361,31.021217 72.520045,18.782568 90.459055,11.352567 110.86763,8.1910246 c 8.0292,-1.2438223 26.47607,-1.2410092 34.35546,0.00524 29.62675,4.6859384 56.51351,19.5441464 74.7413,41.3036704 14.75761,17.616976 24.20945,38.138071 27.64894,60.029185 1.12939,7.1882 1.53745,22.81572 0.79064,30.27934 -2.75293,27.51286 -15.19011,53.79495 -34.78314,73.50331 -25.3223,25.47135 -61.36458,38.57378 -96.7532,35.17263 z m 31,-21.18387 c 13.08929,-2.77014 25.83559,-8.07348 36.5,-15.18652 5.69714,-3.79993 13.75,-10.51943 13.75,-11.47333 0,-0.57168 -153.696733,-129.850925 -153.98646,-129.522945 -0.921094,1.042705 -4.24579,6.885555 -6.665517,11.71404 -13.922835,27.782575 -14.23017,60.713425 -0.827204,88.634805 5.368904,11.18462 11.298786,19.60992 19.749831,28.06097 13.476625,13.47662 29.75522,22.5775 48.22935,26.96359 9.13861,2.16967 12.86591,2.51168 25.25,2.3169 10.35596,-0.16287 12.49151,-0.34173 18,-1.50751 z m 66.18521,-45.89641 c 3.29623,-5.29587 7.99534,-15.35193 9.98835,-21.375 10.4551,-31.59628 4.8019,-66.449715 -15.07502,-92.941345 -3.67796,-4.90193 -12.31075,-13.843747 -17.03243,-17.642142 -38.30865,-30.81773 -92.02129,-30.16288 -129.7335,1.581677 -4.76122,4.007797 -4.888255,4.168073 -4,5.046742 0.85925,0.849978 153.31301,128.904508 153.50687,128.939108 0.0492,0.009 1.1048,-1.61529 2.34573,-3.60904 z"
id="path24"
transform="translate(0,796.3622)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

+27 -21
View File
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -14,11 +12,11 @@
viewBox="0 0 256.00001 256.00001"
id="svg2"
version="1.1"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="FailIcon.svg"
inkscape:export-filename="C:\Users\Adrien\Documents\GitHub\FileConverter\Resources\FailIcon.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
inkscape:export-filename="D:\Users\adrie\Documents\GitHub\FileConverter\Resources\FailIcon.png"
inkscape:export-xdpi="36"
inkscape:export-ydpi="36">
<defs
id="defs4" />
<sodipodi:namedview
@@ -28,18 +26,19 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-147.28284"
inkscape:cy="-330.49423"
inkscape:zoom="2.8284271"
inkscape:cx="163.07811"
inkscape:cy="85.239641"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="2854"
inkscape:window-height="1955"
inkscape:window-x="133"
inkscape:window-y="-13"
inkscape:window-maximized="1" />
inkscape:window-width="2498"
inkscape:window-height="1417"
inkscape:window-x="54"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:document-rotation="0" />
<metadata
id="metadata7">
<rdf:RDF>
@@ -48,7 +47,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -70,20 +69,27 @@
y="2.625"
style="fill:#f44336;fill-opacity:1" /></flowRegion><flowPara
id="flowPara4354"
style="font-size:40px;line-height:1.25">!</flowPara></flowRoot> <flowRoot
style="font-size:40px;line-height:1.25">!</flowPara></flowRoot>
<flowRoot
xml:space="preserve"
id="flowRoot4356"
style="font-style:normal;font-weight:normal;line-height:0.01%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#d32f2f;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="matrix(7.6807018,0,0,7.6807018,87.676316,721.42366)"
style="font-style:normal;font-weight:normal;line-height:0.01%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ff5252;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="matrix(5.3949876,0,0,5.3949876,99.524316,781.6645)"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"><flowRegion
id="flowRegion4358"><rect
id="flowRegion4358"
style="fill:#ff5252;fill-opacity:1"><rect
id="rect4360"
width="49.5"
height="47.5"
x="0.875"
y="0.875"
style="fill:#d32f2f;fill-opacity:1" /></flowRegion><flowPara
style="fill:#ff5252;fill-opacity:1;" /></flowRegion><flowPara
id="flowPara4362"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'MS UI Gothic';-inkscape-font-specification:'MS UI Gothic';fill:#d32f2f;fill-opacity:1">!</flowPara></flowRoot> </g>
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:1.25;font-family:'MS UI Gothic';-inkscape-font-specification:'MS UI Gothic';fill:#ff5252;fill-opacity:1">!</flowPara></flowRoot>
<path
style="fill:#ff5252;fill-opacity:1;stroke:none;stroke-width:0.502957"
d="m 112.5261,1043.9007 c -12.866526,-1.7662 -25.64742,-5.7332 -37.981544,-11.7888 -13.03541,-6.4001 -23.007178,-13.6923 -33.463015,-24.4714 C 26.863216,992.98263 17.383636,976.57034 11.680434,956.73753 8.5148027,945.72908 7.7771728,940.61049 7.5131069,927.81941 7.1871658,912.0311 8.0202477,904.53852 11.490618,892.04646 c 10.684023,-38.45858 40.365081,-69.65987 78.145946,-82.14851 13.819816,-4.56821 23.191776,-6.08037 37.730016,-6.08771 13.97502,-0.007 20.41485,0.81246 32.19628,4.09727 44.66259,12.45249 78.63191,49.48676 86.79245,94.62343 0.55751,3.08363 1.27703,9.63974 1.59896,14.56913 1.16514,17.84103 -1.10216,32.95071 -7.40793,49.36767 -9.5307,24.81296 -24.72818,43.64446 -47.59328,58.97346 -11.17499,7.4919 -27.61806,14.1584 -42.44257,17.2072 -9.57177,1.9687 -28.27444,2.5852 -37.98439,1.2523 z m 31.44169,-18.5546 c 32.82651,-5.9748 58.57292,-24.2546 74.07517,-52.59278 4.05243,-7.40786 7.83265,-17.92464 10.48328,-29.1651 0.68972,-2.92487 0.93693,-6.67724 1.10142,-16.71811 0.23502,-14.34679 -0.0905,-17.99903 -2.42308,-27.19165 -9.59189,-37.80005 -37.35236,-65.4665 -75.32221,-75.06709 -7.7844,-1.96826 -14.62149,-2.71439 -24.76732,-2.70286 -9.81992,0.0112 -15.53168,0.67425 -23.79065,2.76186 -25.812087,6.52453 -46.441312,20.90699 -60.946704,42.49137 -3.8258,5.69288 -9.888357,18.09926 -12.037414,24.63329 -0.955112,2.90394 -2.373607,8.1084 -3.152212,11.56547 -1.367111,6.07008 -1.415941,6.76831 -1.424221,20.36529 -0.0077,12.73597 0.102399,14.62946 1.154213,19.84017 5.774211,28.60553 22.944969,53.29191 47.468923,68.24614 11.728558,7.1517 26.258885,12.191 40.954615,14.2034 5.29294,0.7248 23.27695,0.3043 28.62619,-0.6694 z"
id="path846" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+189
View File
@@ -0,0 +1,189 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="50mm"
height="50mm"
viewBox="0 0 50 50"
version="1.1"
id="svg3760"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="LogIcon.svg"
inkscape:export-filename="D:\Users\adrie\Documents\GitHub\FileConverter\Resources\LogIcon.png"
inkscape:export-xdpi="48.77"
inkscape:export-ydpi="48.77">
<defs
id="defs3754" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4.3748757"
inkscape:cx="85.122902"
inkscape:cy="67.683432"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="2498"
inkscape:window-height="1417"
inkscape:window-x="54"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:document-rotation="0" />
<metadata
id="metadata3757">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-247)">
<rect
id="rect3762"
width="3.96875"
height="36.88842"
x="7.8778019"
y="253.62828"
style="fill:#0171bb;fill-opacity:1;stroke-width:0.120997" />
<rect
id="rect3762-9"
width="3.96875"
height="35.383747"
x="38.488541"
y="253.65729"
style="fill:#0171bb;fill-opacity:1;stroke-width:0.118503" />
<rect
id="rect3762-93"
width="3.96875"
height="34.548386"
x="253.61607"
y="-42.444916"
style="fill:#0171bb;fill-opacity:1;stroke-width:0.117097"
transform="rotate(90)" />
<rect
id="rect3762-93-7"
width="3.96875"
height="34.577518"
x="286.58069"
y="-42.456921"
style="fill:#0171bb;fill-opacity:1;stroke-width:0.117146"
transform="rotate(90)" />
<g
id="g232"
transform="translate(-0.11779088,-0.12019703)">
<rect
id="rect3762-93-70"
width="1.984375"
height="16.243387"
x="261.49573"
y="-35.530304"
style="fill:#004b82;fill-opacity:1;stroke-width:0.056774"
transform="rotate(90)" />
<rect
id="rect3762-93-70-0"
width="1.984375"
height="1.9707552"
x="261.44177"
y="-16.984608"
style="fill:#004b82;fill-opacity:1;stroke-width:0.0197755"
transform="rotate(90)" />
</g>
<g
id="g236"
transform="translate(-0.06206197,-0.2562312)">
<rect
id="rect3762-93-70-8"
width="1.984375"
height="16.243387"
x="266.31354"
y="-35.474575"
style="fill:#004b82;fill-opacity:1;stroke-width:0.056774"
transform="rotate(90)" />
<rect
id="rect3762-93-70-0-3"
width="1.984375"
height="1.9707552"
x="266.25958"
y="-16.928879"
style="fill:#004b82;fill-opacity:1;stroke-width:0.0197755"
transform="rotate(90)" />
</g>
<g
id="g246"
transform="translate(-0.28862447,-0.47390316)">
<rect
id="rect3762-93-70-4"
width="1.984375"
height="16.243387"
x="271.21298"
y="-35.701138"
style="fill:#004b82;fill-opacity:1;stroke-width:0.056774"
transform="rotate(90)" />
<rect
id="rect3762-93-70-0-7"
width="1.984375"
height="1.9707552"
x="271.15903"
y="-17.155441"
style="fill:#004b82;fill-opacity:1;stroke-width:0.0197755"
transform="rotate(90)" />
</g>
<g
id="g250"
transform="translate(-0.27479237,-0.20701256)">
<rect
id="rect3762-93-70-6"
width="1.984375"
height="16.243387"
x="275.62787"
y="-35.687309"
style="fill:#004b82;fill-opacity:1;stroke-width:0.056774"
transform="rotate(90)" />
<rect
id="rect3762-93-70-0-1"
width="1.984375"
height="1.9707552"
x="275.57391"
y="-17.141605"
style="fill:#004b82;fill-opacity:1;stroke-width:0.0197755"
transform="rotate(90)" />
</g>
<g
id="g254"
transform="translate(-0.07933778)">
<rect
id="rect3762-93-70-05"
width="1.984375"
height="16.243387"
x="280.10263"
y="-35.491856"
style="fill:#004b82;fill-opacity:1;stroke-width:0.056774"
transform="rotate(90)" />
<rect
id="rect3762-93-70-0-8"
width="1.984375"
height="1.9707552"
x="280.04868"
y="-16.94615"
style="fill:#004b82;fill-opacity:1;stroke-width:0.0197755"
transform="rotate(90)" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

+22 -20
View File
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
@@ -14,11 +12,11 @@
viewBox="0 0 256.00001 256.00001"
id="svg2"
version="1.1"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
sodipodi:docname="SuccessIcon.svg"
inkscape:export-filename="C:\Users\Adrien\Documents\GitHub\FileConverter\Resources\SuccessIcon.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
inkscape:export-filename="D:\Users\adrie\Documents\GitHub\FileConverter\Resources\SuccessIcon.png"
inkscape:export-xdpi="36"
inkscape:export-ydpi="36">
<defs
id="defs4" />
<sodipodi:namedview
@@ -28,18 +26,19 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="3.6203867"
inkscape:cx="106.14858"
inkscape:cy="186.87105"
inkscape:zoom="2.56"
inkscape:cx="182.18715"
inkscape:cy="141.71904"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="2854"
inkscape:window-height="1955"
inkscape:window-x="133"
inkscape:window-y="-13"
inkscape:window-maximized="1" />
inkscape:window-width="2498"
inkscape:window-height="1417"
inkscape:window-x="54"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:document-rotation="0" />
<metadata
id="metadata7">
<rdf:RDF>
@@ -48,7 +47,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -58,10 +57,13 @@
id="layer1"
transform="translate(0,-796.3622)">
<path
style="fill:none;fill-rule:evenodd;stroke:#4caf50;stroke-width:19.13197517;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 23.971008,937.572 89.139299,1028.4489 232.03124,820.38864"
id="path3342"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
style="fill:#4caf50;fill-opacity:1;stroke-width:0.276214;stroke:none;stroke-opacity:1"
d="M 115.8966,247.76844 C 92.037607,245.16548 70.961645,236.48202 52.148824,221.50384 47.337244,217.67301 37.925702,208.26325 34.105231,203.46365 19.550222,185.17844 10.990369,164.82705 8.0734325,141.57202 7.4781319,136.82604 7.2387715,123.31805 7.6608429,118.28808 9.8590632,92.091114 20.178789,67.831797 37.502076,48.138163 57.112929,25.843955 83.579096,11.928435 113.88256,7.9784326 c 4.87576,-0.6355469 22.25024,-0.7269001 26.93083,-0.1415995 32.84719,4.1074939 61.01507,19.6162769 81.10718,44.6563059 13.2052,16.457149 21.61191,35.580766 25.08122,57.054871 0.98421,6.09203 1.25259,9.93152 1.25583,17.96606 0.004,10.34474 -0.65298,16.80146 -2.65369,26.07324 -6.49176,30.08454 -24.9727,57.11772 -50.79079,74.29472 -15.541,10.33956 -30.92258,16.29885 -49.58034,19.20891 -6.89914,1.07606 -22.40133,1.43408 -29.3362,0.6775 z m 21.87844,-18.91485 c 21.77463,-2.16331 42.99826,-11.6755 58.69538,-26.3066 17.96191,-16.74207 28.60783,-37.33845 32.08803,-62.07982 0.70687,-5.02526 0.71024,-19.87564 0.006,-25.13544 -3.02879,-22.611882 -12.51499,-42.358311 -28.00427,-58.293559 -16.05005,-16.51217 -36.5209,-26.75833 -59.88459,-29.973686 -4.38557,-0.603551 -16.9196,-0.849562 -21.61932,-0.424332 -24.237811,2.19303 -46.415441,12.599295 -63.465697,29.779595 -22.094016,22.26253 -32.649624,53.836832 -28.419543,85.009532 4.308413,31.74995 23.266565,59.50743 51.32295,75.14424 12.757976,7.11047 27.36342,11.44907 42.24138,12.54797 3.91126,0.28889 12.85026,0.14835 17.03999,-0.2679 z"
id="path843"
transform="translate(0,796.3622)" />
<path
style="fill:#4caf50;fill-opacity:1;stroke:none;stroke-width:0.195312;stroke-opacity:1"
d="M 93.007026,947.25718 C 81.49719,935.53762 72.106459,925.89162 72.138739,925.82164 c 0.03228,-0.07 3.048803,-3.09036 6.703385,-6.71194 l 6.644694,-6.5847 1.147664,1.2136 c 0.631215,0.66748 2.914544,3.01593 5.074054,5.21877 2.15952,2.20284 6.12366,6.2472 8.809214,8.98747 12.25124,12.50086 14.45443,14.67713 14.69418,14.51457 0.19377,-0.1314 34.00785,-34.23964 54.50534,-54.97951 l 4.37372,-4.42543 6.53847,7.04317 6.53848,7.04316 -0.454,0.43736 c -0.2497,0.24055 -16.65849,16.3111 -36.46398,35.71234 -19.80549,19.40124 -36.07882,35.27499 -36.16296,35.27499 -0.0841,0 -9.57012,-9.58874 -21.079974,-21.30831 z"
id="path865" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

File renamed without changes.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB