From 8dbf692855e78638b7e14efb6e2de2a30e92d4ca Mon Sep 17 00:00:00 2001 From: Tichau Date: Fri, 6 Nov 2015 18:19:54 +0100 Subject: [PATCH] Add add/remove input type functions. --- .../ConversionPreset/ConversionPreset.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Application/FileConverter/ConversionPreset/ConversionPreset.cs b/Application/FileConverter/ConversionPreset/ConversionPreset.cs index 6f576c7..8e3cd64 100644 --- a/Application/FileConverter/ConversionPreset/ConversionPreset.cs +++ b/Application/FileConverter/ConversionPreset/ConversionPreset.cs @@ -229,6 +229,25 @@ namespace FileConverter } } + public void AddInputType(string inputType) + { + if (this.inputTypes.Contains(inputType)) + { + return; + } + + this.inputTypes.Add(inputType); + this.OnPropertyChanged("InputTypes"); + } + + public void RemoveInputType(string inputType) + { + if (this.inputTypes.Remove(inputType)) + { + this.OnPropertyChanged("InputTypes"); + } + } + public string GenerateOutputFilePath(string inputFilePath) { return (string)this.outputFileNameConverter.Convert(new object[] {inputFilePath, this.OutputType, this.OutputFileNameTemplate}, typeof (string), null, null);