From 5e7761938c52ec7ca43b058d1a288554e24d8555 Mon Sep 17 00:00:00 2001 From: Adrien Allard Date: Sun, 15 Nov 2020 23:08:03 +0100 Subject: [PATCH] Clean code Clean code --- .../ConversionJobs/ConversionJob.cs | 29 +++++------------- .../ConversionJobs/ConversionJob_Excel.cs | 8 +---- .../ConversionJob_FFMPEG.Converters.cs | 2 +- .../ConversionJobs/ConversionJob_FFMPEG.cs | 15 +++++----- .../ConversionJob_PowerPoint.cs | 8 +---- .../ConversionJobs/ConversionJob_Word.cs | 8 +---- .../ConversionPreset/ConversionPreset.cs | 12 +++----- .../ConversionSettingsOverride.cs | 8 +---- .../FileConverter/Diagnostics/Debug.cs | 14 +++------ .../Diagnostics/DiagnosticsData.cs | 13 ++++---- Application/FileConverter/PathHelpers.cs | 6 ++-- .../Services/NavigationService.cs | 3 -- .../Services/UpgradeVersionDescription.cs | 30 +++---------------- .../ApplicationVersionToApplicationName.cs | 2 +- .../ValueConverters/BitrateToString.cs | 2 +- .../Generic/DoubleToTimeString.cs | 2 +- .../Generic/ObjectToLocalizedString.cs | 2 +- .../ValueConverters/Generic/StringToEnum.cs | 2 +- .../Generic/StringToValueType.cs | 2 +- .../ValueConverters/OutputTypeToVisibility.cs | 3 +- Application/FileConverter/Version.cs | 4 +-- .../ViewModels/InputExtension.cs | 2 -- .../ViewModels/InputExtensionCategory.cs | 9 ++---- .../FileConverter/ViewModels/MainViewModel.cs | 10 ++----- .../FileConverter/ViewModels/PresetNode.cs | 6 +--- .../ViewModels/UpgradeViewModel.cs | 1 - .../FileConverter/Views/MainWindow.xaml | 6 ++-- Application/FileConverter/XmlHelpers.cs | 6 ++-- .../FileConverterExtension.cs | 30 ++++++++++--------- .../PresetDefinition.cs | 3 -- 30 files changed, 77 insertions(+), 171 deletions(-) diff --git a/Application/FileConverter/ConversionJobs/ConversionJob.cs b/Application/FileConverter/ConversionJobs/ConversionJob.cs index 1374e64..9c51027 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob.cs @@ -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 { diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_Excel.cs b/Application/FileConverter/ConversionJobs/ConversionJob_Excel.cs index 356e0bb..f900a85 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_Excel.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_Excel.cs @@ -26,13 +26,7 @@ namespace FileConverter.ConversionJobs { } - protected override ApplicationName Application - { - get - { - return ApplicationName.Excel; - } - } + protected override ApplicationName Application => ApplicationName.Excel; protected override bool IsCancelable => false; diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_FFMPEG.Converters.cs b/Application/FileConverter/ConversionJobs/ConversionJob_FFMPEG.Converters.cs index 14012ab..934d102 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_FFMPEG.Converters.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_FFMPEG.Converters.cs @@ -16,7 +16,7 @@ namespace FileConverter.ConversionJobs return string.Empty; } - return string.Format("{0} \"{1}\"", optionName, args); + return $"{optionName} \"{args}\""; } /// diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_FFMPEG.cs b/Application/FileConverter/ConversionJobs/ConversionJob_FFMPEG.cs index cac27bb..dd84eb2 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_FFMPEG.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_FFMPEG.cs @@ -21,7 +21,7 @@ namespace FileConverter.ConversionJobs private ProcessStartInfo ffmpegProcessStartInfo; - private List ffmpegArgumentStringByPass = new List(); + private readonly List ffmpegArgumentStringByPass = new List(); 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(); } diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_PowerPoint.cs b/Application/FileConverter/ConversionJobs/ConversionJob_PowerPoint.cs index f799237..dc88f0c 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_PowerPoint.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_PowerPoint.cs @@ -27,13 +27,7 @@ namespace FileConverter.ConversionJobs { } - protected override ApplicationName Application - { - get - { - return ApplicationName.PowerPoint; - } - } + protected override ApplicationName Application => ApplicationName.PowerPoint; protected override bool IsCancelable => false; diff --git a/Application/FileConverter/ConversionJobs/ConversionJob_Word.cs b/Application/FileConverter/ConversionJobs/ConversionJob_Word.cs index 544eaef..36d3e54 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob_Word.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob_Word.cs @@ -26,13 +26,7 @@ namespace FileConverter.ConversionJobs { } - protected override ApplicationName Application - { - get - { - return ApplicationName.Word; - } - } + protected override ApplicationName Application => ApplicationName.Word; protected override bool IsCancelable => false; diff --git a/Application/FileConverter/ConversionPreset/ConversionPreset.cs b/Application/FileConverter/ConversionPreset/ConversionPreset.cs index 59a4c6e..693892d 100644 --- a/Application/FileConverter/ConversionPreset/ConversionPreset.cs +++ b/Application/FileConverter/ConversionPreset/ConversionPreset.cs @@ -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) diff --git a/Application/FileConverter/ConversionPreset/ConversionSettingsOverride.cs b/Application/FileConverter/ConversionPreset/ConversionSettingsOverride.cs index 22eb066..1c4b383 100644 --- a/Application/FileConverter/ConversionPreset/ConversionSettingsOverride.cs +++ b/Application/FileConverter/ConversionPreset/ConversionSettingsOverride.cs @@ -16,13 +16,7 @@ namespace FileConverter this.value = value; } - public int Count - { - get - { - return 1; - } - } + public int Count => 1; public IEnumerable Keys { diff --git a/Application/FileConverter/Diagnostics/Debug.cs b/Application/FileConverter/Diagnostics/Debug.cs index fc538f8..603f636 100644 --- a/Application/FileConverter/Diagnostics/Debug.cs +++ b/Application/FileConverter/Diagnostics/Debug.cs @@ -12,10 +12,10 @@ namespace FileConverter.Diagnostics public static class Debug { - private static string diagnosticsFolderPath; - private static Dictionary diagnosticsDataById = new Dictionary(); + private static readonly string diagnosticsFolderPath; + private static readonly Dictionary diagnosticsDataById = new Dictionary(); 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 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) { diff --git a/Application/FileConverter/Diagnostics/DiagnosticsData.cs b/Application/FileConverter/Diagnostics/DiagnosticsData.cs index a5b0fb8..5353367 100644 --- a/Application/FileConverter/Diagnostics/DiagnosticsData.cs +++ b/Application/FileConverter/Diagnostics/DiagnosticsData.cs @@ -13,8 +13,8 @@ namespace FileConverter.Diagnostics public class DiagnosticsData : INotifyPropertyChanged { - private List logMessages = new List(); - private StringBuilder stringBuilder = new StringBuilder(); + private readonly List logMessages = new List(); + 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] diff --git a/Application/FileConverter/PathHelpers.cs b/Application/FileConverter/PathHelpers.cs index bf8a484..6d49641 100644 --- a/Application/FileConverter/PathHelpers.cs +++ b/Application/FileConverter/PathHelpers.cs @@ -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()); diff --git a/Application/FileConverter/Services/NavigationService.cs b/Application/FileConverter/Services/NavigationService.cs index b4e7a7a..e3c832a 100644 --- a/Application/FileConverter/Services/NavigationService.cs +++ b/Application/FileConverter/Services/NavigationService.cs @@ -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; diff --git a/Application/FileConverter/Services/UpgradeVersionDescription.cs b/Application/FileConverter/Services/UpgradeVersionDescription.cs index 6457ce0..673bf8a 100644 --- a/Application/FileConverter/Services/UpgradeVersionDescription.cs +++ b/Application/FileConverter/Services/UpgradeVersionDescription.cs @@ -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 diff --git a/Application/FileConverter/ValueConverters/ApplicationVersionToApplicationName.cs b/Application/FileConverter/ValueConverters/ApplicationVersionToApplicationName.cs index 514c818..cc93d8c 100644 --- a/Application/FileConverter/ValueConverters/ApplicationVersionToApplicationName.cs +++ b/Application/FileConverter/ValueConverters/ApplicationVersionToApplicationName.cs @@ -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) diff --git a/Application/FileConverter/ValueConverters/BitrateToString.cs b/Application/FileConverter/ValueConverters/BitrateToString.cs index 213b843..acea132 100644 --- a/Application/FileConverter/ValueConverters/BitrateToString.cs +++ b/Application/FileConverter/ValueConverters/BitrateToString.cs @@ -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) diff --git a/Application/FileConverter/ValueConverters/Generic/DoubleToTimeString.cs b/Application/FileConverter/ValueConverters/Generic/DoubleToTimeString.cs index 30d0800..d7e533b 100644 --- a/Application/FileConverter/ValueConverters/Generic/DoubleToTimeString.cs +++ b/Application/FileConverter/ValueConverters/Generic/DoubleToTimeString.cs @@ -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) diff --git a/Application/FileConverter/ValueConverters/Generic/ObjectToLocalizedString.cs b/Application/FileConverter/ValueConverters/Generic/ObjectToLocalizedString.cs index e7e6edd..5fae50d 100644 --- a/Application/FileConverter/ValueConverters/Generic/ObjectToLocalizedString.cs +++ b/Application/FileConverter/ValueConverters/Generic/ObjectToLocalizedString.cs @@ -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(); diff --git a/Application/FileConverter/ValueConverters/Generic/StringToEnum.cs b/Application/FileConverter/ValueConverters/Generic/StringToEnum.cs index d11984f..66b64ba 100644 --- a/Application/FileConverter/ValueConverters/Generic/StringToEnum.cs +++ b/Application/FileConverter/ValueConverters/Generic/StringToEnum.cs @@ -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); diff --git a/Application/FileConverter/ValueConverters/Generic/StringToValueType.cs b/Application/FileConverter/ValueConverters/Generic/StringToValueType.cs index 650a959..2a29ba0 100644 --- a/Application/FileConverter/ValueConverters/Generic/StringToValueType.cs +++ b/Application/FileConverter/ValueConverters/Generic/StringToValueType.cs @@ -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); diff --git a/Application/FileConverter/ValueConverters/OutputTypeToVisibility.cs b/Application/FileConverter/ValueConverters/OutputTypeToVisibility.cs index eded1f2..4e8b742 100644 --- a/Application/FileConverter/ValueConverters/OutputTypeToVisibility.cs +++ b/Application/FileConverter/ValueConverters/OutputTypeToVisibility.cs @@ -23,8 +23,7 @@ namespace FileConverter.ValueConverters return "Hidden"; } - OutputType referenceType; - if (!Enum.TryParse(referenceTypeName, out referenceType)) + if (!Enum.TryParse(referenceTypeName, out OutputType referenceType)) { return "Hidden"; } diff --git a/Application/FileConverter/Version.cs b/Application/FileConverter/Version.cs index 08b9f2d..97303bc 100644 --- a/Application/FileConverter/Version.cs +++ b/Application/FileConverter/Version.cs @@ -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) diff --git a/Application/FileConverter/ViewModels/InputExtension.cs b/Application/FileConverter/ViewModels/InputExtension.cs index d3dcd51..4299f1c 100644 --- a/Application/FileConverter/ViewModels/InputExtension.cs +++ b/Application/FileConverter/ViewModels/InputExtension.cs @@ -2,8 +2,6 @@ namespace FileConverter.ViewModels { - using System.ComponentModel; - using System.Runtime.CompilerServices; using System.Windows.Media; using CommonServiceLocator; diff --git a/Application/FileConverter/ViewModels/InputExtensionCategory.cs b/Application/FileConverter/ViewModels/InputExtensionCategory.cs index f5c483b..8affdbe 100644 --- a/Application/FileConverter/ViewModels/InputExtensionCategory.cs +++ b/Application/FileConverter/ViewModels/InputExtensionCategory.cs @@ -1,14 +1,11 @@ // License: http://www.gnu.org/licenses/gpl.html GPL version 3. -using System.ComponentModel; -using CommonServiceLocator; -using FileConverter.Services; -using GalaSoft.MvvmLight.Ioc; - namespace FileConverter.ViewModels { - using System.Collections.Generic; + using CommonServiceLocator; using GalaSoft.MvvmLight; + using System.ComponentModel; + using System.Collections.Generic; public class InputExtensionCategory : ObservableObject { diff --git a/Application/FileConverter/ViewModels/MainViewModel.cs b/Application/FileConverter/ViewModels/MainViewModel.cs index beee5c2..8c0e50f 100644 --- a/Application/FileConverter/ViewModels/MainViewModel.cs +++ b/Application/FileConverter/ViewModels/MainViewModel.cs @@ -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 ConversionJobs { - get - { - return this.conversionJobs; - } + get => this.conversionJobs; private set { diff --git a/Application/FileConverter/ViewModels/PresetNode.cs b/Application/FileConverter/ViewModels/PresetNode.cs index a3d25e5..1ee5c55 100644 --- a/Application/FileConverter/ViewModels/PresetNode.cs +++ b/Application/FileConverter/ViewModels/PresetNode.cs @@ -1,6 +1,5 @@ // License: http://www.gnu.org/licenses/gpl.html GPL version 3. -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 { diff --git a/Application/FileConverter/ViewModels/UpgradeViewModel.cs b/Application/FileConverter/ViewModels/UpgradeViewModel.cs index 63cdaa4..2250525 100644 --- a/Application/FileConverter/ViewModels/UpgradeViewModel.cs +++ b/Application/FileConverter/ViewModels/UpgradeViewModel.cs @@ -3,7 +3,6 @@ namespace FileConverter.ViewModels { using System.ComponentModel; - using System.Threading.Tasks; using System.Windows.Input; using FileConverter.Services; diff --git a/Application/FileConverter/Views/MainWindow.xaml b/Application/FileConverter/Views/MainWindow.xaml index 748469b..cf0e0e8 100644 --- a/Application/FileConverter/Views/MainWindow.xaml +++ b/Application/FileConverter/Views/MainWindow.xaml @@ -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}}"> @@ -46,10 +46,10 @@