├── .github
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── .gitignore
├── Application
├── FileConverter
│ ├── Application.xaml
│ ├── Application.xaml.cs
│ ├── ApplicationTerminateArgs.cs
│ ├── Controls
│ │ ├── ConversionJobControl.xaml
│ │ ├── ConversionJobControl.xaml.cs
│ │ ├── EncodingMode.cs
│ │ ├── EncodingQualitySliderControl.xaml
│ │ ├── EncodingQualitySliderControl.xaml.cs
│ │ └── IconButton.cs
│ ├── ConversionJobs
│ │ ├── ConversionFlags.cs
│ │ ├── ConversionJob.cs
│ │ ├── ConversionJobFactory.cs
│ │ ├── ConversionJob_Excel.cs
│ │ ├── ConversionJob_ExtractCDA.cs
│ │ ├── ConversionJob_FFMPEG.Converters.cs
│ │ ├── ConversionJob_FFMPEG.cs
│ │ ├── ConversionJob_Gif.cs
│ │ ├── ConversionJob_Ico.cs
│ │ ├── ConversionJob_ImageMagick.cs
│ │ ├── ConversionJob_Office.cs
│ │ ├── ConversionJob_PowerPoint.cs
│ │ ├── ConversionJob_Word.cs
│ │ ├── ConversionState.cs
│ │ └── VideoEncodingSpeed.cs
│ ├── ConversionPreset
│ │ ├── ConversionPreset.cs
│ │ ├── ConversionSettings.cs
│ │ ├── ConversionSettingsOverride.cs
│ │ └── IConversionSettings.cs
│ ├── Diagnostics
│ │ ├── Debug.cs
│ │ └── DiagnosticsData.cs
│ ├── FileConverter.csproj
│ ├── Helpers.cs
│ ├── IXmlSerializable.cs
│ ├── InputPostConversionAction.cs
│ ├── OutputType.cs
│ ├── Pages.cs
│ ├── PathHelpers.cs
│ ├── Properties
│ │ ├── Annotations.cs
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.ar-EG.resx
│ │ ├── Resources.cs-CZ.resx
│ │ ├── Resources.de-DE.resx
│ │ ├── Resources.el-GR.resx
│ │ ├── Resources.en.Designer.cs
│ │ ├── Resources.en.resx
│ │ ├── Resources.es-ES.resx
│ │ ├── Resources.fa-IR.resx
│ │ ├── Resources.fr-FR.resx
│ │ ├── Resources.he-IL.resx
│ │ ├── Resources.hi-IN.resx
│ │ ├── Resources.it-IT.resx
│ │ ├── Resources.ja-jp.resx
│ │ ├── Resources.ko-KR.resx
│ │ ├── Resources.pt-BR.resx
│ │ ├── Resources.pt-PT.resx
│ │ ├── Resources.resx
│ │ ├── Resources.ru-RU.resx
│ │ ├── Resources.ru.resx
│ │ ├── Resources.sr-Cyrl.resx
│ │ ├── Resources.sr-Latn.resx
│ │ ├── Resources.tr-TR.resx
│ │ ├── Resources.vi-VN.resx
│ │ ├── Resources.zh-CN.resx
│ │ ├── Resources.zh-TW.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── Registry.cs
│ ├── Resources
│ │ ├── ApplicationIcon.ico
│ │ ├── CancelIcon.png
│ │ ├── DeleteIcon.ico
│ │ ├── DownIcon.ico
│ │ ├── DownloadIcon.png
│ │ ├── DuplicatePresetIcon.ico
│ │ ├── ExportIcon.ico
│ │ ├── FailIcon.png
│ │ ├── FileConverterUsage.gif
│ │ ├── FolderIcon.ico
│ │ ├── GitHub-Documentation-Icon.png
│ │ ├── GitHub-Icon.png
│ │ ├── GitHub-Issue-Icon.png
│ │ ├── ImportIcon.ico
│ │ ├── LogIcon.png
│ │ ├── PaypalIcon.png
│ │ ├── PresetIcon.ico
│ │ ├── SettingsIcon.ico
│ │ ├── SuccessIcon.png
│ │ ├── UpIcon.ico
│ │ └── WebSite-Icon.png
│ ├── Services
│ │ ├── ConversionJobsTerminatedEventArgs.cs
│ │ ├── ConversionService.cs
│ │ ├── IConversionService.cs
│ │ ├── INavigationService.cs
│ │ ├── ISettingsService.cs
│ │ ├── IUpgradeService.cs
│ │ ├── NavigationService.cs
│ │ ├── SettingsService.Migration.cs
│ │ ├── SettingsService.cs
│ │ ├── UpgradeService.cs
│ │ └── UpgradeVersionDescription.cs
│ ├── Settings.StyleCop
│ ├── Settings.cs
│ ├── Settings.default.xml
│ ├── ValueConverters
│ │ ├── ApplicationVersionToApplicationName.cs
│ │ ├── BitrateToString.cs
│ │ ├── ChangelogConverter.cs
│ │ ├── ConversionJobToEstimatedRemainingDuration.cs
│ │ ├── ConversionJobsToProgressState.cs
│ │ ├── ConversionJobsToProgressValue.cs
│ │ ├── ConversionSettingsRelevant.cs
│ │ ├── ConversionSettingsToString.cs
│ │ ├── ConversionStateToBrush.cs
│ │ ├── FileNameConverter.cs
│ │ ├── Generic
│ │ │ ├── BoolInverterConverter.cs
│ │ │ ├── BoolToVisibility.cs
│ │ │ ├── CollectionContainsElementToBool.cs
│ │ │ ├── CultureInfoToStringConverter.cs
│ │ │ ├── DoubleToTimeString.cs
│ │ │ ├── EqualsConverter.cs
│ │ │ ├── FormatStringConverter.cs
│ │ │ ├── IcoFileSizeSelectorConverter.cs
│ │ │ ├── ObjectToLocalizedString.cs
│ │ │ ├── StringToEnum.cs
│ │ │ ├── StringToValueType.cs
│ │ │ ├── ValueConverterGroup.cs
│ │ │ └── ValueToString.cs
│ │ ├── HardwareAccelerationModeToString.cs
│ │ ├── InputTypesToBool.cs
│ │ ├── OutputTypeEnumToViewModel.cs
│ │ └── OutputTypeToVisibility.cs
│ ├── Version.cs
│ ├── ViewModels
│ │ ├── DiagnosticsViewModel.cs
│ │ ├── HelpViewModel.cs
│ │ ├── InputExtension.cs
│ │ ├── InputExtensionCategory.cs
│ │ ├── MainViewModel.cs
│ │ ├── OutputTypeViewModel.cs
│ │ ├── PresetNode.cs
│ │ ├── SettingsViewModel.cs
│ │ ├── UpgradeViewModel.cs
│ │ └── ViewModelLocator.cs
│ ├── Views
│ │ ├── BindableSelectedItemBehavior.cs
│ │ ├── DiagnosticsWindow.xaml
│ │ ├── DiagnosticsWindow.xaml.cs
│ │ ├── DragDropExtension.cs
│ │ ├── HelpWindow.xaml
│ │ ├── HelpWindow.xaml.cs
│ │ ├── MainWindow.xaml
│ │ ├── MainWindow.xaml.cs
│ │ ├── Resources
│ │ │ ├── Colors.xaml
│ │ │ ├── ConversionPresetTemplates.xaml
│ │ │ └── CustomStyles.xaml
│ │ ├── SettingsWindow.xaml
│ │ ├── SettingsWindow.xaml.cs
│ │ ├── UpgradeWindow.xaml
│ │ └── UpgradeWindow.xaml.cs
│ └── XmlHelpers.cs
└── FileConverterExtension
│ ├── ConversionPresetReference.cs
│ ├── FileConverterExtension.cs
│ ├── FileConverterExtension.csproj
│ ├── FileConverterExtensionKey.snk
│ ├── PathHelpers.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
│ ├── Resources
│ ├── ApplicationIcon.ico
│ ├── FolderIcon.ico
│ ├── PresetIcon.ico
│ └── SettingsIcon.ico
│ ├── Settings.StyleCop
│ ├── XmlHelpers.cs
│ └── app.manifest
├── CHANGELOG.md
├── FileConverter.sln
├── FileConverter.sln.DotSettings
├── Installer
├── DebugInstaller.bat
├── Installer.wixproj
├── License.rtf
└── Product.wxs
├── LICENSE.md
├── Middleware
├── Markdown.Xaml.dll
├── Ripper.dll
├── ffmpeg
│ ├── LICENSE
│ └── ffmpeg.exe
├── gs
│ ├── gsdll64.dll
│ └── gswin64c.exe
└── yeti.mmedia.dll
├── PresetSamples
├── To24fpsMp4.xml
├── To48kSampleRateWav.xml
└── ToLowBitrateMp3.xml
├── README.md
├── Resources
├── Colors.md
├── CompatibleFileFormats.svg
├── FFMPEG retro engineering.ods
├── FileConverterUsage.gif
├── Icons
│ ├── ApplicationIcon-256x256.ico
│ ├── ApplicationIcon.ico
│ ├── ApplicationIcon.png
│ ├── ApplicationIcon.svg
│ ├── CancelIcon.png
│ ├── CancelIcon.svg
│ ├── DeleteIcon.ico
│ ├── DeleteIcon.svg
│ ├── DownIcon.ico
│ ├── DownIcon.svg
│ ├── DownloadIcon.png
│ ├── DownloadIcon.svg
│ ├── DuplicatePresetIcon.ico
│ ├── DuplicatePresetIcon.svg
│ ├── ExportIcon.ico
│ ├── FailIcon.png
│ ├── FailIcon.svg
│ ├── FolderIcon.ico
│ ├── FolderIcon.svg
│ ├── ImportIcon.ico
│ ├── LogIcon.png
│ ├── LogIcon.svg
│ ├── PresetIcon.ico
│ ├── SettingsIcon.ico
│ ├── SettingsIcon.svg
│ ├── SuccessIcon.png
│ ├── SuccessIcon.svg
│ ├── UpIcon.ico
│ └── UpIcon.svg
├── Installer
│ ├── Banner.bmp
│ ├── Banner.pdn
│ ├── ErrorIcon.ico
│ ├── ErrorIcon.svg
│ ├── UI.bmp
│ ├── UI.pdn
│ ├── WarningIcon.ico
│ └── WarningIcon.svg
└── Screenshots
│ ├── Screenshot1.png
│ ├── Screenshot2.png
│ └── Screenshot3.png
├── version (x86).xml
└── version.xml
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots and Logs**
24 | If applicable, add the following informations to help explain your problem.
25 | - Registry.xml
26 | - Settings.user.xml
27 | - The Diagnostics folder of the session that encountered the issue.
28 | - A screenshot (if possible)
29 |
30 | You will find the xml files and diagnostics folder in `%localappdata%\FileConverter`.
31 |
32 | **Desktop (please complete the following information):**
33 | - OS: [e.g. Windows 11 64bits]
34 |
35 | **Additional context**
36 | Add any other context about the problem here.
37 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | build/
19 | bld/
20 | [Bb]in/
21 | [Oo]bj/
22 |
23 | # Visual Studo 2015 cache/options directory
24 | .vs/
25 |
26 | # MSTest test Results
27 | [Tt]est[Rr]esult*/
28 | [Bb]uild[Ll]og.*
29 | TestData/*
30 |
31 | # NUNIT
32 | *.VisualState.xml
33 | TestResult.xml
34 |
35 | # Build Results of an ATL Project
36 | [Dd]ebugPS/
37 | [Rr]eleasePS/
38 | dlldata.c
39 |
40 | *_i.c
41 | *_p.c
42 | *_i.h
43 | *.ilk
44 | *.meta
45 | *.obj
46 | *.pch
47 | *.pdb
48 | *.pgc
49 | *.pgd
50 | *.rsp
51 | *.sbr
52 | *.tlb
53 | *.tli
54 | *.tlh
55 | *.tmp
56 | *.tmp_proj
57 | *.log
58 | *.vspscc
59 | *.vssscc
60 | .builds
61 | *.pidb
62 | *.svclog
63 | *.scc
64 |
65 | # Chutzpah Test files
66 | _Chutzpah*
67 |
68 | # Visual C++ cache files
69 | ipch/
70 | *.aps
71 | *.ncb
72 | *.opensdf
73 | *.sdf
74 | *.cachefile
75 |
76 | # Visual Studio profiler
77 | *.psess
78 | *.vsp
79 | *.vspx
80 |
81 | # TFS 2012 Local Workspace
82 | $tf/
83 |
84 | # Guidance Automation Toolkit
85 | *.gpState
86 |
87 | # ReSharper is a .NET coding add-in
88 | _ReSharper*/
89 | *.[Rr]e[Ss]harper
90 | *.DotSettings.user
91 |
92 | # JustCode is a .NET coding addin-in
93 | .JustCode
94 |
95 | # TeamCity is a build add-in
96 | _TeamCity*
97 |
98 | # DotCover is a Code Coverage Tool
99 | *.dotCover
100 |
101 | # NCrunch
102 | _NCrunch_*
103 | .*crunch*.local.xml
104 |
105 | # MightyMoose
106 | *.mm.*
107 | AutoTest.Net/
108 |
109 | # Web workbench (sass)
110 | .sass-cache/
111 |
112 | # Installshield output folder
113 | [Ee]xpress/
114 |
115 | # DocProject is a documentation generator add-in
116 | DocProject/buildhelp/
117 | DocProject/Help/*.HxT
118 | DocProject/Help/*.HxC
119 | DocProject/Help/*.hhc
120 | DocProject/Help/*.hhk
121 | DocProject/Help/*.hhp
122 | DocProject/Help/Html2
123 | DocProject/Help/html
124 |
125 | # Click-Once directory
126 | publish/
127 |
128 | # Publish Web Output
129 | *.[Pp]ublish.xml
130 | *.azurePubxml
131 | # TODO: Comment the next line if you want to checkin your web deploy settings
132 | # but database connection strings (with potential passwords) will be unencrypted
133 | *.pubxml
134 | *.publishproj
135 |
136 | # NuGet Packages
137 | *.nupkg
138 | # The packages folder can be ignored because of Package Restore
139 | **/packages/*
140 | # except build/, which is used as an MSBuild target.
141 | !**/packages/build/
142 | # Uncomment if necessary however generally it will be regenerated when needed
143 | #!**/packages/repositories.config
144 |
145 | # Windows Azure Build Output
146 | csx/
147 | *.build.csdef
148 |
149 | # Windows Store app package directory
150 | AppPackages/
151 |
152 | # Others
153 | *.[Cc]ache
154 | ClientBin/
155 | [Ss]tyle[Cc]op.*
156 | ~$*
157 | *~
158 | *.dbmdl
159 | *.dbproj.schemaview
160 | *.pfx
161 | *.publishsettings
162 | node_modules/
163 | bower_components/
164 |
165 | # RIA/Silverlight projects
166 | Generated_Code/
167 |
168 | # Backup & report files from converting an old project file
169 | # to a newer Visual Studio version. Backup files are not needed,
170 | # because we have git ;-)
171 | _UpgradeReport_Files/
172 | Backup*/
173 | UpgradeLog*.XML
174 | UpgradeLog*.htm
175 |
176 | # SQL Server files
177 | *.mdf
178 | *.ldf
179 |
180 | # Business Intelligence projects
181 | *.rdl.data
182 | *.bim.layout
183 | *.bim_*.settings
184 |
185 | # Microsoft Fakes
186 | FakesAssemblies/
187 |
188 | # Node.js Tools for Visual Studio
189 | .ntvs_analysis.dat
190 |
191 | # Visual Studio 6 build log
192 | *.plg
193 |
194 | # Visual Studio 6 workspace options file
195 | *.opt
196 |
197 | # Ignore the installer signing commands file
198 | Installer/Installer.sign
199 | Certificate/*
200 |
--------------------------------------------------------------------------------
/Application/FileConverter/Application.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
33 |
34 |
35 |
36 |
40 |
41 |
42 |
43 |
47 |
48 |
49 |
50 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/Application/FileConverter/ApplicationTerminateArgs.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | public class ApplicationTerminateArgs : System.EventArgs
6 | {
7 | public ApplicationTerminateArgs(float remainingTimeBeforeTermination)
8 | {
9 | this.RemainingTimeBeforeTermination = remainingTimeBeforeTermination;
10 | }
11 |
12 | public float RemainingTimeBeforeTermination
13 | {
14 | get;
15 | private set;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/Application/FileConverter/Controls/ConversionJobControl.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
62 |
64 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/Application/FileConverter/Controls/ConversionJobControl.xaml.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Controls
4 | {
5 | using System.Windows.Controls;
6 |
7 | ///
8 | /// Interaction logic for ConversionJobControl.xaml
9 | ///
10 | public partial class ConversionJobControl : UserControl
11 | {
12 | public ConversionJobControl()
13 | {
14 | this.InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Application/FileConverter/Controls/EncodingMode.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Controls
4 | {
5 | public enum EncodingMode
6 | {
7 | Wav8,
8 | Wav16,
9 | Wav24,
10 | Wav32,
11 |
12 | Mp3VBR,
13 | Mp3CBR,
14 |
15 | OggVBR,
16 |
17 | AacVBR,
18 | }
19 | }
--------------------------------------------------------------------------------
/Application/FileConverter/Controls/EncodingQualitySliderControl.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Application/FileConverter/Controls/IconButton.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Controls
4 | {
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Media;
8 |
9 | public class IconButton : Button
10 | {
11 | public static readonly DependencyProperty IconSourceProperty = DependencyProperty.Register("IconSource", typeof(ImageSource), typeof(IconButton));
12 | public static readonly DependencyProperty MouseOverBrushProperty = DependencyProperty.Register("MouseOverBrush", typeof(Brush), typeof(IconButton));
13 | public static readonly DependencyProperty PressedBrushProperty = DependencyProperty.Register("PressedBrush", typeof(Brush), typeof(IconButton));
14 |
15 | static IconButton()
16 | {
17 | FrameworkElement.DefaultStyleKeyProperty.OverrideMetadata(typeof(IconButton), new FrameworkPropertyMetadata(typeof(IconButton)));
18 | }
19 |
20 | public ImageSource IconSource
21 | {
22 | get => (ImageSource)this.GetValue(IconButton.IconSourceProperty);
23 | set => this.SetValue(IconButton.IconSourceProperty, value);
24 | }
25 |
26 | public Brush MouseOverBrush
27 | {
28 | get => (Brush)this.GetValue(IconButton.MouseOverBrushProperty);
29 | set => this.SetValue(IconButton.MouseOverBrushProperty, value);
30 | }
31 |
32 | public Brush PressedBrush
33 | {
34 | get => (Brush)this.GetValue(IconButton.PressedBrushProperty);
35 | set => this.SetValue(IconButton.PressedBrushProperty, value);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Application/FileConverter/ConversionJobs/ConversionFlags.cs:
--------------------------------------------------------------------------------
1 | // // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 | namespace FileConverter.ConversionJobs
3 | {
4 | ///
5 | /// This enum describe the special conversion state that need to be multi-threads prerequisites.
6 | ///
7 | [System.Flags]
8 | public enum ConversionFlags
9 | {
10 | None = 0x00,
11 |
12 | CdDriveExtraction = 0x01,
13 | }
14 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ConversionJobs/ConversionJobFactory.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ConversionJobs
4 | {
5 | public static class ConversionJobFactory
6 | {
7 | public static ConversionJob Create(ConversionPreset conversionPreset, string inputFilePath)
8 | {
9 | string inputFileExtension = System.IO.Path.GetExtension(inputFilePath);
10 | inputFileExtension = inputFileExtension.ToLowerInvariant().Substring(1, inputFileExtension.Length - 1);
11 | if (inputFileExtension == "cda")
12 | {
13 | return new ConversionJob_ExtractCDA(conversionPreset, inputFilePath);
14 | }
15 |
16 | if (inputFileExtension == "docx" || inputFileExtension == "odt" || inputFileExtension == "doc")
17 | {
18 | return new ConversionJob_Word(conversionPreset, inputFilePath);
19 | }
20 |
21 | if (inputFileExtension == "xlsx" || inputFileExtension == "ods" || inputFileExtension == "xls")
22 | {
23 | return new ConversionJob_Excel(conversionPreset, inputFilePath);
24 | }
25 |
26 | if (inputFileExtension == "pptx" || inputFileExtension == "odp" || inputFileExtension == "ppt")
27 | {
28 | return new ConversionJob_PowerPoint(conversionPreset, inputFilePath);
29 | }
30 |
31 | if (conversionPreset.OutputType == OutputType.Ico)
32 | {
33 | return new ConversionJob_Ico(conversionPreset, inputFilePath);
34 | }
35 |
36 | if (conversionPreset.OutputType == OutputType.Gif)
37 | {
38 | return new ConversionJob_Gif(conversionPreset, inputFilePath);
39 | }
40 |
41 | if (conversionPreset.OutputType == OutputType.Pdf)
42 | {
43 | return new ConversionJob_ImageMagick(conversionPreset, inputFilePath);
44 | }
45 |
46 | if (conversionPreset.OutputType == OutputType.Jpg ||
47 | conversionPreset.OutputType == OutputType.Png ||
48 | conversionPreset.OutputType == OutputType.Webp)
49 | {
50 | return new ConversionJob_ImageMagick(conversionPreset, inputFilePath);
51 | }
52 |
53 | return new ConversionJob_FFMPEG(conversionPreset, inputFilePath);
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Application/FileConverter/ConversionJobs/ConversionJob_Ico.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ConversionJobs
4 | {
5 | using System;
6 | using System.IO;
7 |
8 | public class ConversionJob_Ico : ConversionJob
9 | {
10 | private string intermediateFilePath;
11 | private ConversionJob pngConversionJob;
12 | private ConversionJob icoConversionJob;
13 |
14 | public ConversionJob_Ico(ConversionPreset conversionPreset, string inputFilePath) : base(conversionPreset, inputFilePath)
15 | {
16 | }
17 |
18 | public override void Cancel()
19 | {
20 | base.Cancel();
21 |
22 | this.pngConversionJob.Cancel();
23 | this.icoConversionJob.Cancel();
24 | }
25 |
26 | protected override void Initialize()
27 | {
28 | base.Initialize();
29 |
30 | if (this.ConversionPreset == null)
31 | {
32 | throw new Exception("The conversion preset must be valid.");
33 | }
34 |
35 | // Generate intermediate file path.
36 | string fileName = Path.GetFileName(this.OutputFilePath);
37 | string tempPath = Path.GetTempPath();
38 | this.intermediateFilePath = PathHelpers.GenerateUniquePath(tempPath + fileName + ".png");
39 |
40 | // Convert input in png file to send it to ffmpeg for the ico conversion.
41 | ConversionPreset intermediatePreset = new ConversionPreset("To compatible image", OutputType.Png, this.ConversionPreset.InputTypes.ToArray());
42 | intermediatePreset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageClampSizePowerOf2, "True");
43 | intermediatePreset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageMaximumSize, "256");
44 | this.pngConversionJob = ConversionJobFactory.Create(intermediatePreset, this.InputFilePath);
45 | this.pngConversionJob.PrepareConversion(this.intermediateFilePath);
46 |
47 | // Convert png file into ico.
48 | this.icoConversionJob = new ConversionJob_FFMPEG(this.ConversionPreset, this.intermediateFilePath);
49 | this.icoConversionJob.PrepareConversion(this.OutputFilePath);
50 | }
51 |
52 | protected override void Convert()
53 | {
54 | if (this.ConversionPreset == null)
55 | {
56 | throw new Exception("The conversion preset must be valid.");
57 | }
58 |
59 | Diagnostics.Debug.Log(string.Empty);
60 | Diagnostics.Debug.Log("Convert image to PNG (intermediate format).");
61 | this.pngConversionJob.StartConversion();
62 |
63 | if (this.pngConversionJob.State != ConversionState.Done)
64 | {
65 | this.ConversionFailed(this.pngConversionJob.ErrorMessage);
66 | return;
67 | }
68 |
69 | Diagnostics.Debug.Log(string.Empty);
70 | Diagnostics.Debug.Log("Convert png intermediate image to ICO.");
71 | this.icoConversionJob.StartConversion();
72 |
73 | if (this.icoConversionJob.State != ConversionState.Done)
74 | {
75 | this.ConversionFailed(this.icoConversionJob.ErrorMessage);
76 | return;
77 | }
78 |
79 | Diagnostics.Debug.Log($"Delete intermediate file {this.intermediateFilePath}.");
80 |
81 | File.Delete(this.intermediateFilePath);
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Application/FileConverter/ConversionJobs/ConversionJob_Office.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ConversionJobs
4 | {
5 | public abstract class ConversionJob_Office : ConversionJob
6 | {
7 | protected ConversionJob_Office() : base()
8 | {
9 | }
10 |
11 | protected ConversionJob_Office(ConversionPreset conversionPreset, string inputFilePath) : base(conversionPreset, inputFilePath)
12 | {
13 | }
14 |
15 | public enum ApplicationName
16 | {
17 | None,
18 |
19 | Word,
20 | Excel,
21 | PowerPoint
22 | }
23 |
24 | protected abstract ApplicationName Application
25 | {
26 | get;
27 | }
28 |
29 | protected override bool IsCancelable() => false;
30 |
31 | protected override void Initialize()
32 | {
33 | base.Initialize();
34 |
35 | if (!Helpers.IsMicrosoftOfficeApplicationAvailable(this.Application))
36 | {
37 | switch (this.Application)
38 | {
39 | case ApplicationName.Word:
40 | this.ConversionFailed(Properties.Resources.ErrorMicrosoftWordIsNotAvailable);
41 | return;
42 |
43 | case ApplicationName.PowerPoint:
44 | this.ConversionFailed(Properties.Resources.ErrorMicrosoftPowerPointIsNotAvailable);
45 | return;
46 |
47 | case ApplicationName.Excel:
48 | this.ConversionFailed(Properties.Resources.ErrorMicrosoftExcelIsNotAvailable);
49 | return;
50 |
51 | default:
52 | this.ConversionFailed(Properties.Resources.ErrorMicrosoftOfficeIsNotAvailable);
53 | return;
54 | }
55 | }
56 | }
57 |
58 | protected override void OnConversionFailed()
59 | {
60 | base.OnConversionFailed();
61 |
62 | this.ReleaseOfficeApplicationInstanceIfNeeded();
63 | }
64 |
65 | protected abstract void InitializeOfficeApplicationInstanceIfNecessary();
66 |
67 | protected abstract void ReleaseOfficeApplicationInstanceIfNeeded();
68 | }
69 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ConversionJobs/ConversionState.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ConversionJobs
4 | {
5 | public enum ConversionState
6 | {
7 | Unknown,
8 |
9 | Ready,
10 | InProgress,
11 | Done,
12 | Failed,
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Application/FileConverter/ConversionJobs/VideoEncodingSpeed.cs:
--------------------------------------------------------------------------------
1 | // // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ConversionJobs
4 | {
5 | public enum VideoEncodingSpeed
6 | {
7 | UltraFast,
8 | SuperFast,
9 | VeryFast,
10 | Faster,
11 | Fast,
12 | Medium,
13 | Slow,
14 | Slower,
15 | VerySlow,
16 | }
17 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ConversionPreset/ConversionSettings.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | using System.Collections.Generic;
6 |
7 | public class ConversionSettings : Dictionary, IConversionSettings
8 | {
9 | }
10 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ConversionPreset/ConversionSettingsOverride.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | using System.Collections;
6 | using System.Collections.Generic;
7 |
8 | public struct ConversionSettingsOverride : IConversionSettings
9 | {
10 | private string key;
11 | private string value;
12 |
13 | public ConversionSettingsOverride(string key, string value)
14 | {
15 | this.key = key;
16 | this.value = value;
17 | }
18 |
19 | public int Count => 1;
20 |
21 | public IEnumerable Keys
22 | {
23 | get
24 | {
25 | yield return this.key;
26 | }
27 | }
28 |
29 | public IEnumerable Values
30 | {
31 | get
32 | {
33 | yield return this.value;
34 | }
35 | }
36 |
37 | public string this[string key]
38 | {
39 | get
40 | {
41 | if (key == this.key)
42 | {
43 | return this.value;
44 | }
45 |
46 | throw new KeyNotFoundException();
47 | }
48 | }
49 |
50 | public IEnumerator> GetEnumerator()
51 | {
52 | yield return new KeyValuePair(this.key, this.value);
53 | }
54 |
55 | public bool ContainsKey(string key)
56 | {
57 | return key == this.key;
58 | }
59 |
60 | public bool TryGetValue(string key, out string value)
61 | {
62 | value = null;
63 |
64 | if (key == this.key)
65 | {
66 | value = this.value;
67 | return true;
68 | }
69 |
70 | return false;
71 | }
72 |
73 | IEnumerator IEnumerable.GetEnumerator()
74 | {
75 | return this.GetEnumerator();
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/Application/FileConverter/ConversionPreset/IConversionSettings.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | using System.Collections.Generic;
6 |
7 | public interface IConversionSettings : IReadOnlyDictionary
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Application/FileConverter/Diagnostics/DiagnosticsData.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Diagnostics
4 | {
5 | using System.Collections.Generic;
6 | using System.Collections.ObjectModel;
7 | using System.ComponentModel;
8 | using System.IO;
9 | using System.Runtime.CompilerServices;
10 | using System.Text;
11 |
12 | using FileConverter.Annotations;
13 |
14 | public class DiagnosticsData : INotifyPropertyChanged
15 | {
16 | private readonly List logMessages = new List();
17 | private readonly StringBuilder stringBuilder = new StringBuilder();
18 | private System.IO.TextWriter logFileWriter;
19 | private string name;
20 |
21 | public DiagnosticsData(string name)
22 | {
23 | this.Name = name;
24 | this.LogMessages = new ReadOnlyCollection(this.logMessages);
25 | }
26 |
27 | public event PropertyChangedEventHandler PropertyChanged;
28 |
29 | public string Name
30 | {
31 | get => this.name;
32 |
33 | private set
34 | {
35 | this.name = value;
36 | this.OnPropertyChanged();
37 | }
38 | }
39 |
40 | public string Content
41 | {
42 | get
43 | {
44 | this.stringBuilder.Clear();
45 | for (int index = 0; index < this.LogMessages.Count; index++)
46 | {
47 | this.stringBuilder.AppendLine(this.LogMessages[index]);
48 | }
49 |
50 | return this.stringBuilder.ToString();
51 | }
52 | }
53 |
54 | public ReadOnlyCollection LogMessages
55 | {
56 | get;
57 | private set;
58 | }
59 |
60 | public void Initialize(string diagnosticsFolderPath, int id)
61 | {
62 | string path = Path.Combine(diagnosticsFolderPath, $"Diagnostics{id}.log");
63 | path = PathHelpers.GenerateUniquePath(path);
64 | this.logFileWriter = new StreamWriter(File.Open(path, FileMode.Create));
65 |
66 | this.Log($"{System.DateTime.Now.ToLongDateString()} {System.DateTime.Now.ToLongTimeString()}\n");
67 | }
68 |
69 | public void Release()
70 | {
71 | this.logFileWriter.Close();
72 | this.logFileWriter = null;
73 | }
74 |
75 | public void Log(string log)
76 | {
77 | this.logMessages.Add(log);
78 | this.logFileWriter.WriteLine(log);
79 | this.logFileWriter.Flush();
80 |
81 | this.OnPropertyChanged(nameof(this.Content));
82 | }
83 |
84 | [NotifyPropertyChangedInvocator]
85 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
86 | {
87 | PropertyChangedEventHandler handler = this.PropertyChanged;
88 | if (handler != null)
89 | {
90 | handler(this, new PropertyChangedEventArgs(propertyName));
91 | }
92 | }
93 | }
94 | }
--------------------------------------------------------------------------------
/Application/FileConverter/IXmlSerializable.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | public interface IXmlSerializable
6 | {
7 | void OnDeserializationComplete();
8 | }
9 | }
--------------------------------------------------------------------------------
/Application/FileConverter/InputPostConversionAction.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | public enum InputPostConversionAction
6 | {
7 | None,
8 | MoveInArchiveFolder,
9 | Delete,
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Application/FileConverter/OutputType.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | public enum OutputType
6 | {
7 | None,
8 |
9 | Aac,
10 | Avi,
11 | Flac,
12 | Gif,
13 | Ico,
14 | Jpg,
15 | Mkv,
16 | Mp3,
17 | Mp4,
18 | Ogg,
19 | Ogv,
20 | Pdf,
21 | Png,
22 | Wav,
23 | Webm,
24 | Webp,
25 | }
26 | }
--------------------------------------------------------------------------------
/Application/FileConverter/Pages.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | public static class Pages
6 | {
7 | public const string Help = "Help";
8 | public const string Main = "Main";
9 | public const string Settings = "Settings";
10 | public const string Diagnostics = "Diagnostics";
11 | public const string Upgrade = "Upgrade";
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Application/FileConverter/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 | using System.Windows;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("FileConverter")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("FileConverter")]
13 | [assembly: AssemblyCopyright("Copyright © 2025")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // In order to begin building localizable applications, set
23 | // CultureYouAreCodingWith in your .csproj file
24 | // inside a . For example, if you are using US english
25 | // in your source files, set the to en-US. Then uncomment
26 | // the NeutralResourceLanguage attribute below. Update the "en-US" in
27 | // the line below to match the UICulture setting in the project file.
28 |
29 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
30 |
31 |
32 | [assembly: ThemeInfo(
33 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
34 | //(used if a resource is not found in the page,
35 | // or application resource dictionaries)
36 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
37 | //(used if a resource is not found in the page,
38 | // app, or any theme specific resource dictionaries)
39 | )]
40 |
41 |
42 | // Version information for an assembly consists of the following four values:
43 | //
44 | // Major Version
45 | // Minor Version
46 | // Build Number
47 | // Revision
48 | //
49 | // You can specify all the values or you can default the Build and Revision Numbers
50 | // by using the '*' as shown below:
51 | // [assembly: AssemblyVersion("1.0.*")]
52 | [assembly: AssemblyVersion("2.1.0.0")]
53 | [assembly: AssemblyFileVersion("2.1.0.0")]
54 |
--------------------------------------------------------------------------------
/Application/FileConverter/Properties/Resources.en.Designer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Properties/Resources.en.Designer.cs
--------------------------------------------------------------------------------
/Application/FileConverter/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FileConverter.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Application/FileConverter/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/ApplicationIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/ApplicationIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/CancelIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/CancelIcon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/DeleteIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/DeleteIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/DownIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/DownIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/DownloadIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/DownloadIcon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/DuplicatePresetIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/DuplicatePresetIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/ExportIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/ExportIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/FailIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/FailIcon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/FileConverterUsage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/FileConverterUsage.gif
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/FolderIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/FolderIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/GitHub-Documentation-Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/GitHub-Documentation-Icon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/GitHub-Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/GitHub-Icon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/GitHub-Issue-Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/GitHub-Issue-Icon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/ImportIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/ImportIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/LogIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/LogIcon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/PaypalIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/PaypalIcon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/PresetIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/PresetIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/SettingsIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/SettingsIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/SuccessIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/SuccessIcon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/UpIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/UpIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverter/Resources/WebSite-Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverter/Resources/WebSite-Icon.png
--------------------------------------------------------------------------------
/Application/FileConverter/Services/ConversionJobsTerminatedEventArgs.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Services
4 | {
5 | using System;
6 |
7 | public class ConversionJobsTerminatedEventArgs : EventArgs
8 | {
9 | public ConversionJobsTerminatedEventArgs(bool allConversionsSucceed)
10 | {
11 | this.AllConversionsSucceed = allConversionsSucceed;
12 | }
13 |
14 | public bool AllConversionsSucceed
15 | {
16 | get;
17 | private set;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Application/FileConverter/Services/IConversionService.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Services
4 | {
5 | using System.Collections.ObjectModel;
6 |
7 | using FileConverter.ConversionJobs;
8 |
9 | public interface IConversionService
10 | {
11 | event System.EventHandler ConversionJobsTerminated;
12 |
13 | ReadOnlyCollection ConversionJobs
14 | {
15 | get;
16 | }
17 |
18 | void ConvertFilesAsync();
19 |
20 | void RegisterConversionJob(ConversionJob conversionJob);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Application/FileConverter/Services/INavigationService.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Services
4 | {
5 | using System.Windows;
6 |
7 | public interface INavigationService
8 | {
9 | void RegisterPage(string pageKey, bool cancelAutoExit, bool mainWindow) where T : Window;
10 |
11 | void Show(string pageKey);
12 |
13 | void Close(string pageKey, bool alreadyClosing);
14 | }
15 | }
--------------------------------------------------------------------------------
/Application/FileConverter/Services/ISettingsService.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Services
4 | {
5 | public interface ISettingsService
6 | {
7 | Settings Settings
8 | {
9 | get;
10 | }
11 |
12 | bool PostInstallationInitialization();
13 |
14 | void SaveSettings();
15 |
16 | void RevertSettings();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Application/FileConverter/Services/IUpgradeService.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Services
4 | {
5 | using System.Threading.Tasks;
6 |
7 | public interface IUpgradeService
8 | {
9 | event System.EventHandler NewVersionAvailable;
10 |
11 | UpgradeVersionDescription UpgradeVersionDescription
12 | {
13 | get;
14 | }
15 |
16 | Task CheckForUpgrade();
17 |
18 | Task DownloadChangeLog();
19 |
20 | Task StartUpgrade();
21 |
22 | void CancelUpgrade();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Application/FileConverter/Services/SettingsService.Migration.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Services
4 | {
5 | using System;
6 | using FileConverter.ConversionJobs;
7 |
8 | public partial class SettingsService
9 | {
10 | private void MigrateSettingsToCurrentVersion(Settings settings)
11 | {
12 | int settingsVersion = settings.SerializationVersion;
13 |
14 | // Migrate conversion settings.
15 | if (settings.ConversionPresets != null)
16 | {
17 | foreach (ConversionPreset conversionPreset in settings.ConversionPresets)
18 | {
19 | this.MigrateConversionPresetToCurrentVersion(conversionPreset, settingsVersion);
20 | }
21 | }
22 | }
23 |
24 | private void MigrateConversionPresetToCurrentVersion(ConversionPreset preset, int settingsVersion)
25 | {
26 | if (settingsVersion <= 2)
27 | {
28 | // Migrate video encoding speed.
29 | string videoEncodingSpeed = preset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed);
30 | if (videoEncodingSpeed != null)
31 | {
32 | VideoEncodingSpeed encodingSpeed;
33 | if (!Enum.TryParse(videoEncodingSpeed, out encodingSpeed))
34 | {
35 | switch (videoEncodingSpeed)
36 | {
37 | case "Ultra Fast":
38 | preset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, VideoEncodingSpeed.UltraFast.ToString());
39 | break;
40 |
41 | case "Super Fast":
42 | preset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, VideoEncodingSpeed.SuperFast.ToString());
43 | break;
44 |
45 | case "Very Fast":
46 | preset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, VideoEncodingSpeed.VeryFast.ToString());
47 | break;
48 |
49 | case "Very Slow":
50 | preset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.VideoEncodingSpeed, VideoEncodingSpeed.VerySlow.ToString());
51 | break;
52 | }
53 | }
54 | }
55 | }
56 |
57 | if (settingsVersion <= 3)
58 | {
59 | // Try to fix corrupted settings (GitHub issue #5).
60 | string scale = preset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale);
61 | if (scale != null)
62 | {
63 | preset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.ImageScale, scale.Replace(',', '.'));
64 | }
65 |
66 | scale = preset.GetSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale);
67 | if (scale != null)
68 | {
69 | preset.SetSettingsValue(ConversionPreset.ConversionSettingKeys.VideoScale, scale.Replace(',', '.'));
70 | }
71 | }
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/Application/FileConverter/Services/UpgradeVersionDescription.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Services
4 | {
5 | using System.Xml.Serialization;
6 |
7 | using CommunityToolkit.Mvvm.ComponentModel;
8 |
9 | public class UpgradeVersionDescription : ObservableObject
10 | {
11 | private int installerDownloadProgress;
12 | private bool installerDownloadInProgress;
13 |
14 | private string changeLog;
15 |
16 | [XmlElement("Latest")]
17 | public Version LatestVersion
18 | {
19 | get;
20 | set;
21 | }
22 |
23 | [XmlElement("URL")]
24 | public string InstallerURL
25 | {
26 | get;
27 | set;
28 | }
29 |
30 | [XmlIgnore]
31 | public string ChangeLog
32 | {
33 | get => this.changeLog;
34 | set
35 | {
36 | this.changeLog = value;
37 | this.OnPropertyChanged();
38 | }
39 | }
40 |
41 | [XmlIgnore]
42 | public string InstallerPath
43 | {
44 | get;
45 | set;
46 | }
47 |
48 | [XmlIgnore]
49 | public bool InstallerDownloadInProgress
50 | {
51 | get => this.installerDownloadInProgress;
52 |
53 | set
54 | {
55 | this.installerDownloadInProgress = value;
56 | this.OnPropertyChanged();
57 | this.OnPropertyChanged(nameof(this.InstallerDownloadDone));
58 | this.OnPropertyChanged(nameof(this.InstallerDownloadNotStarted));
59 | }
60 | }
61 |
62 | [XmlIgnore]
63 | public int InstallerDownloadProgress
64 | {
65 | get => this.installerDownloadProgress;
66 |
67 | set
68 | {
69 | this.installerDownloadProgress = value;
70 | this.OnPropertyChanged();
71 | this.OnPropertyChanged(nameof(this.InstallerDownloadDone));
72 | this.OnPropertyChanged(nameof(this.InstallerDownloadNotStarted));
73 | }
74 | }
75 |
76 | [XmlIgnore]
77 | public bool InstallerDownloadDone => !this.InstallerDownloadInProgress && this.InstallerDownloadProgress == 100;
78 |
79 | [XmlIgnore]
80 | public bool InstallerDownloadNotStarted => !this.InstallerDownloadInProgress && this.InstallerDownloadProgress == 0;
81 |
82 | [XmlIgnore]
83 | public bool NeedToUpgrade
84 | {
85 | get;
86 | set;
87 | }
88 | }
89 | }
--------------------------------------------------------------------------------
/Application/FileConverter/Settings.StyleCop:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | False
8 |
9 |
10 |
11 |
12 | False
13 |
14 |
15 |
16 |
17 | False
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/ApplicationVersionToApplicationName.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class ApplicationVersionToApplicationName : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (!(value is FileConverter.Version))
14 | {
15 | return "File Converter";
16 | }
17 |
18 | FileConverter.Version version = (FileConverter.Version)value;
19 |
20 | return $"File Converter v{version}";
21 | }
22 |
23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24 | {
25 | throw new NotImplementedException();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/BitrateToString.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class BitrateToString : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (!(value is double))
14 | {
15 | throw new ArgumentException("The value must be a double value.");
16 | }
17 |
18 | double bitrate = (double)value;
19 |
20 | return $"{bitrate:0} kbit/s";
21 | }
22 |
23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24 | {
25 | throw new NotImplementedException();
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/ChangelogConverter.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | using FileConverter.Diagnostics;
10 |
11 | public class ChangelogConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | bool header = false;
16 | if (parameter != null)
17 | {
18 | switch (parameter)
19 | {
20 | case string s:
21 | {
22 | if (!bool.TryParse(s, out header))
23 | {
24 | Debug.LogError($"Invalid parameter {s}");
25 | }
26 |
27 | break;
28 | }
29 |
30 | case bool b:
31 | header = b;
32 | break;
33 |
34 | default:
35 | Debug.LogError($"Invalid parameter {parameter}");
36 | break;
37 | }
38 | }
39 |
40 | string content = string.Empty;
41 | if (header)
42 | {
43 | content += Properties.Resources.LicenceHeader1 + "\n";
44 | content += Properties.Resources.LicenceHeader2 + "\n\n";
45 | content += Properties.Resources.LicenceHeader3 + "\n\n";
46 | }
47 |
48 | string changelog = (string)value;
49 | content += changelog;
50 |
51 | return content;
52 | }
53 |
54 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
55 | {
56 | throw new NotImplementedException();
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/ConversionJobToEstimatedRemainingDuration.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | using ConversionJobs;
10 |
11 | public class ConversionJobToEstimatedRemainingDuration : IMultiValueConverter
12 | {
13 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | if (values.Length != 3)
16 | {
17 | return string.Empty;
18 | }
19 |
20 | ConversionState state = (ConversionState)values[0];
21 | DateTime startTime = (DateTime)values[1];
22 | float progress = (float)values[2];
23 | if (progress <= 0f)
24 | {
25 | return string.Empty;
26 | }
27 |
28 | if (state == ConversionState.Unknown ||
29 | state == ConversionState.Ready ||
30 | state == ConversionState.Failed ||
31 | state == ConversionState.Done)
32 | {
33 | return string.Empty;
34 | }
35 |
36 | TimeSpan elapsedTime = DateTime.Now - startTime;
37 | if (elapsedTime.TotalSeconds < 10f)
38 | {
39 | return string.Empty;
40 | }
41 |
42 | double remainingTimeInSeconds = (1 - progress) * elapsedTime.TotalSeconds / progress;
43 | TimeSpan remainingTime = TimeSpan.FromSeconds(Math.Floor(remainingTimeInSeconds));
44 | return "~" + remainingTime.ToString("g");
45 | }
46 |
47 | public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
48 | {
49 | throw new NotImplementedException();
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/ConversionJobsToProgressState.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Globalization;
8 | using System.Windows.Data;
9 | using System.Windows.Shell;
10 |
11 | using FileConverter.ConversionJobs;
12 |
13 | public class ConversionJobsToProgressState : IValueConverter
14 | {
15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | if (!(value is IEnumerable))
18 | {
19 | return TaskbarItemProgressState.None;
20 | }
21 |
22 | IEnumerable jobs = (IEnumerable)value;
23 |
24 | TaskbarItemProgressState progressState = TaskbarItemProgressState.None;
25 | foreach (ConversionJob job in jobs)
26 | {
27 | if (job.State == ConversionState.Failed)
28 | {
29 | progressState = TaskbarItemProgressState.Error;
30 | break;
31 | }
32 |
33 | if (job.State == ConversionState.InProgress)
34 | {
35 | progressState = TaskbarItemProgressState.Normal;
36 | break;
37 | }
38 | }
39 |
40 | return progressState;
41 | }
42 |
43 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
44 | {
45 | throw new NotImplementedException();
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/ConversionJobsToProgressValue.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Globalization;
8 | using System.Windows.Data;
9 | using System.Windows.Shell;
10 |
11 | using FileConverter.ConversionJobs;
12 |
13 | public class ConversionJobsToProgressValue : IValueConverter
14 | {
15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | if (!(value is IEnumerable))
18 | {
19 | return TaskbarItemProgressState.None;
20 | }
21 |
22 | IEnumerable jobs = (IEnumerable)value;
23 |
24 | int jobCount = 0;
25 | float progressValue = 0f;
26 | foreach (ConversionJob job in jobs)
27 | {
28 | progressValue += job.Progress;
29 | jobCount++;
30 | }
31 |
32 | return jobCount > 0 ? progressValue / jobCount : 0f;
33 | }
34 |
35 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
36 | {
37 | throw new NotImplementedException();
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/ConversionSettingsRelevant.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class ConversionSettingsRelevant : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (value == null)
14 | {
15 | return null;
16 | }
17 |
18 | if (!(value is IConversionSettings))
19 | {
20 | throw new ArgumentException("The value must be a conversion preset array.");
21 | }
22 |
23 | IConversionSettings settings = (IConversionSettings)value;
24 |
25 | string key = parameter as string;
26 | if (key == null)
27 | {
28 | throw new ArgumentException("The parameter must be a string value.");
29 | }
30 |
31 | return settings.ContainsKey(key);
32 | }
33 |
34 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
35 | {
36 | throw new NotImplementedException();
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/ConversionSettingsToString.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class ConversionSettingsToString : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (value == null)
14 | {
15 | return null;
16 | }
17 |
18 | if (!(value is IConversionSettings))
19 | {
20 | throw new ArgumentException("The value must be a conversion preset array.");
21 | }
22 |
23 | IConversionSettings settings = (IConversionSettings)value;
24 |
25 | string parameterString = parameter as string;
26 | if (parameterString == null)
27 | {
28 | throw new ArgumentException("The parameter must be a string value.");
29 | }
30 |
31 | string[] parameters = parameterString.Split(',');
32 | if (parameters.Length < 1 || parameters.Length > 2)
33 | {
34 | throw new ArgumentException("The parameter format must be 'SettingsKey[,DefaultValue]'.");
35 | }
36 |
37 | string key = parameters[0];
38 | string setting;
39 | if (settings.TryGetValue(key, out setting))
40 | {
41 | return setting;
42 | }
43 |
44 | if (parameters.Length >= 2)
45 | {
46 | return parameters[1];
47 | }
48 |
49 | return null;
50 | }
51 |
52 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
53 | {
54 | if (value == null)
55 | {
56 | return null;
57 | }
58 |
59 | if (!(value is string))
60 | {
61 | throw new ArgumentException("value");
62 | }
63 |
64 | string settingsValue = (string)value;
65 |
66 | if (!(parameter is string))
67 | {
68 | throw new ArgumentException("parameter");
69 | }
70 |
71 | string settingsKey = (string)parameter;
72 |
73 | return new ConversionSettingsOverride(settingsKey, settingsValue);
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/ConversionStateToBrush.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | using FileConverter.ConversionJobs;
10 |
11 | public class ConversionStateToBrush : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | if (!(value is ConversionState))
16 | {
17 | throw new ArgumentException("The value must be a conversion state.");
18 | }
19 |
20 | ConversionState conversionState = (ConversionState)value;
21 | string type = parameter as string;
22 |
23 | return Application.Current.Resources[$"{conversionState}{type}Brush"];
24 | }
25 |
26 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
27 | {
28 | throw new NotImplementedException();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/FileNameConverter.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class FileNameConverter : IMultiValueConverter
10 | {
11 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (values == null || values.Length != 3)
14 | {
15 | throw new ArgumentException("The values must contains the input file path, the output file extension and the ouput file template.");
16 | }
17 |
18 | if (!(values[1] is OutputType))
19 | {
20 | return "Invalid output file extension (argument 1).";
21 | }
22 |
23 | string inputFilePath = values[0] as string;
24 | OutputType outputFileExtension = (OutputType)values[1];
25 | string outputFileTemplate = values[2] as string;
26 |
27 | return PathHelpers.GenerateFilePathFromTemplate(inputFilePath, outputFileExtension, outputFileTemplate, 1, 3);
28 | }
29 |
30 | public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture)
31 | {
32 | throw new NotImplementedException();
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/BoolInverterConverter.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class BoolInverterConverter : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (!(value is bool))
14 | {
15 | throw new System.ArgumentException("The object must be a boolean value.");
16 | }
17 |
18 | bool boolValue = (bool)value;
19 |
20 | return !boolValue;
21 | }
22 |
23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24 | {
25 | throw new NotImplementedException();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/BoolToVisibility.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class BoolToVisibility : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (value != null && !(value is bool))
14 | {
15 | throw new ArgumentException("The value must be a boolean.");
16 | }
17 |
18 | bool booleanValue = (bool?) value ?? false;
19 |
20 | string stringParameter = parameter as string;
21 |
22 | string trueResult = "Visible";
23 | string falseResult = "Hidden";
24 | if (!string.IsNullOrEmpty(stringParameter))
25 | {
26 | string[] results = stringParameter.Split(';');
27 | Diagnostics.Debug.Assert(results.Length <= 2, "results.Length <= 2");
28 |
29 | if (results.Length >= 1)
30 | {
31 | falseResult = results[0];
32 | }
33 |
34 | if (results.Length >= 2)
35 | {
36 | trueResult = results[1];
37 | }
38 | }
39 |
40 |
41 | return booleanValue ? trueResult : falseResult;
42 | }
43 |
44 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
45 | {
46 | throw new NotImplementedException();
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/CollectionContainsElementToBool.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Globalization;
8 | using System.Windows.Data;
9 |
10 | public class CollectionContainsElementToBool : IMultiValueConverter
11 | {
12 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | if (values == null || values.Length != 2)
15 | {
16 | throw new ArgumentException("The values must contains the collection of elements and the researched element.");
17 | }
18 |
19 | //// TODO: Make this converter generic.
20 |
21 | if (!(values[0] is ICollection))
22 | {
23 | return false;
24 | }
25 |
26 | bool? result = null;
27 | if (values[1] is IEnumerable)
28 | {
29 | ICollection collection = values[0] as ICollection;
30 | IEnumerable objectsToFind = values[1] as IEnumerable;
31 |
32 | bool all = true;
33 | bool none = true;
34 | foreach (string objectToFind in objectsToFind)
35 | {
36 | bool contains = collection.Contains(objectToFind);
37 | all &= contains;
38 | none &= !contains;
39 | }
40 |
41 | if (all)
42 | {
43 | result = true;
44 | }
45 | else if (none)
46 | {
47 | result = false;
48 | }
49 | }
50 | else
51 | {
52 | ICollection collection = values[0] as ICollection;
53 | string objectToFind = values[1] as string;
54 |
55 | result = collection.Contains(objectToFind);
56 | }
57 |
58 | return result;
59 | }
60 |
61 | public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture)
62 | {
63 | throw new NotImplementedException();
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/CultureInfoToStringConverter.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class CultureInfoToStringConverter : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | CultureInfo cultureInfo = value as CultureInfo;
14 | if (cultureInfo == null)
15 | {
16 | throw new System.ArgumentException("The object must be a culture info instance.");
17 | }
18 |
19 | string nativeName = cultureInfo.NativeName;
20 | if (string.IsNullOrEmpty(nativeName))
21 | {
22 | return cultureInfo.Name;
23 | }
24 |
25 | if (nativeName.Length == 1)
26 | {
27 | return nativeName.ToUpper(cultureInfo);
28 | }
29 |
30 | return nativeName.Substring(0, 1).ToUpper(cultureInfo) + nativeName.Substring(1, nativeName.Length - 1);
31 | }
32 |
33 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
34 | {
35 | throw new NotImplementedException();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/DoubleToTimeString.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class DoubleToTimeString : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (!(value is double))
14 | {
15 | throw new ArgumentException("The value must be a boolean.");
16 | }
17 |
18 | double doubleValue = (double)value;
19 |
20 | return $"{doubleValue:0.#} second{(doubleValue >= 2 ? "s" : string.Empty)}";
21 | }
22 |
23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24 | {
25 | throw new NotImplementedException();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/EqualsConverter.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class EqualsConverter : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (value == null)
14 | {
15 | return parameter == null;
16 | }
17 |
18 | return value.Equals(parameter);
19 | }
20 |
21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
22 | {
23 | if (!(value is bool))
24 | {
25 | throw new ArgumentException("value");
26 | }
27 |
28 | bool equals = (bool)value;
29 | if (equals)
30 | {
31 | return parameter;
32 | }
33 |
34 | return null;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/FormatStringConverter.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class FormatStringConverter : IMultiValueConverter
10 | {
11 | public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (values == null)
14 | {
15 | throw new ArgumentException("The values must not be null.");
16 | }
17 |
18 | string format = parameter as string;
19 | if (format == null)
20 | {
21 | return string.Empty;
22 | }
23 |
24 | return string.Format(format, values);
25 | }
26 |
27 | public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture)
28 | {
29 | throw new NotImplementedException();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/IcoFileSizeSelectorConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Linq;
4 | using System.Reflection;
5 | using System.Windows.Data;
6 | using System.Windows.Media.Imaging;
7 |
8 | namespace FileConverter.ValueConverters.Generic
9 | {
10 | ///
11 | /// Forces the selection of a given size from the ICO file/resource.
12 | /// If the exact size does not exists, selects the closest smaller if possible otherwise closest higher resolution.
13 | /// If no parameter is given, the smallest frame available will be selected
14 | ///
15 | public class IcoFileSizeSelectorConverter : IValueConverter
16 | {
17 | public virtual object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
18 | {
19 | var size = string.IsNullOrWhiteSpace(parameter?.ToString()) ? 0 : System.Convert.ToInt32(parameter);
20 |
21 | var uri = value?.ToString()?.Trim();
22 | if (string.IsNullOrWhiteSpace(uri))
23 | {
24 | return null;
25 | }
26 |
27 | if (!uri.StartsWith("pack:"))
28 | {
29 | uri = $"pack://application:,,,{uri}";
30 | }
31 |
32 | var decoder = BitmapDecoder.Create(new Uri(uri), BitmapCreateOptions.DelayCreation, BitmapCacheOption.OnDemand);
33 |
34 | var result = decoder.Frames.Where(f => f.Width <= size).OrderByDescending(f => f.Width).FirstOrDefault()
35 | ?? decoder.Frames.OrderBy(f => f.Width).FirstOrDefault();
36 |
37 | return result;
38 | }
39 |
40 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
41 | {
42 | throw new NotImplementedException();
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/ObjectToLocalizedString.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class ObjectToLocalizedString : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (value == null)
14 | {
15 | throw new System.ArgumentNullException(nameof(value));
16 | }
17 |
18 | string stringValue = value.ToString();
19 | string typeName = value.GetType().Name;
20 |
21 | string localizationKey = $"{typeName}{stringValue}Name";
22 | localizationKey = localizationKey.Replace(" ", string.Empty);
23 |
24 | string resource = Properties.Resources.ResourceManager.GetString(localizationKey);
25 | if (resource == null)
26 | {
27 | return localizationKey;
28 | }
29 |
30 | return resource;
31 | }
32 |
33 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
34 | {
35 | throw new NotImplementedException();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/StringToEnum.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class StringToEnum : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | string stringValue = value as string;
14 | if (value == null)
15 | {
16 | // TODO default value ?
17 | return null;
18 | }
19 |
20 | string typeName = parameter as string;
21 | if (typeName == null)
22 | {
23 | throw new ArgumentNullException(nameof(parameter), "The parameter must contains the enum type.");
24 | }
25 |
26 | Type enumType = Type.GetType(typeName);
27 | if (enumType == null)
28 | {
29 | throw new Exception("Invalid enum type " + typeName + ".");
30 | }
31 |
32 | return Enum.Parse(enumType, stringValue);
33 | }
34 |
35 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
36 | {
37 | return value?.ToString();
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/StringToValueType.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class StringToValueType : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (value == null)
14 | {
15 | return null;
16 | }
17 |
18 | string typeName = parameter as string;
19 | if (typeName == null)
20 | {
21 | throw new ArgumentNullException(nameof(parameter), "The parameter must contains a convertible type.");
22 | }
23 |
24 | Type type = Type.GetType(typeName);
25 | if (type == null)
26 | {
27 | throw new Exception("Invalid enum type " + typeName + ".");
28 | }
29 |
30 | return System.Convert.ChangeType(value, type, culture);
31 | }
32 |
33 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
34 | {
35 | if (value == null)
36 | {
37 | return null;
38 | }
39 |
40 | return System.Convert.ChangeType(value, typeof(string), culture);
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/ValueConverterGroup.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Linq;
8 | using System.Windows.Data;
9 |
10 | public class ValueConverterGroup : List, IValueConverter
11 | {
12 | public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
13 | {
14 | string[] parameters = null;
15 | if (parameter == null)
16 | {
17 | parameters = new string[this.Count];
18 | }
19 | else
20 | {
21 | string parameterString = parameter as string;
22 | if (parameterString == null)
23 | {
24 | throw new ArgumentException("The parameter must be a string value.");
25 | }
26 |
27 | parameters = parameterString.Split('|');
28 | if (parameters.Length != this.Count)
29 | {
30 | throw new ArgumentException("The parameter format must be 'Converter1Parameters|Converter2Parameters|...'.");
31 | }
32 | }
33 |
34 | object result = value;
35 | for (int index = 0; index < this.Count; index++)
36 | {
37 | IValueConverter converter = this[index];
38 | result = converter.Convert(result, targetType, parameters[index], culture);
39 | }
40 |
41 | return result;
42 | }
43 |
44 | public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
45 | {
46 | string parameterString = parameter as string;
47 | if (parameterString == null)
48 | {
49 | throw new ArgumentException("The parameter must be a string value.");
50 | }
51 |
52 | string[] parameters = parameterString.Split('|');
53 | if (parameters.Length != this.Count)
54 | {
55 | throw new ArgumentException("The parameter format must be 'Converter1Parameters|Converter2Parameters|...'.");
56 | }
57 |
58 | object result = value;
59 | for (int index = this.Count - 1; index >= 0; index--)
60 | {
61 | IValueConverter converter = this[index];
62 | result = converter.ConvertBack(result, targetType, parameters[index], culture);
63 | }
64 |
65 | return result;
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/Generic/ValueToString.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters.Generic
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class ValueToString : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | return value?.ToString();
14 | }
15 |
16 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
17 | {
18 | throw new NotImplementedException();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/HardwareAccelerationModeToString.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class HardwareAccelerationModeToString : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | switch (value) {
14 | case Helpers.HardwareAccelerationMode.Off:
15 | return Properties.Resources.HardwareAccelerationModeOffName;
16 | case Helpers.HardwareAccelerationMode.CUDA:
17 | return Properties.Resources.HardwareAccelerationModeCUDAName;
18 | }
19 | return "Unknown";
20 | }
21 |
22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
23 | {
24 | throw new NotImplementedException();
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/InputTypesToBool.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Collections.Generic;
7 | using System.Globalization;
8 | using System.Windows.Data;
9 |
10 | public class InputTypesToBool : IValueConverter
11 | {
12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | List intputTypes = value as List;
15 | if (intputTypes == null)
16 | {
17 | throw new ArgumentException("The value must be an list of string.");
18 | }
19 |
20 | string referenceTypeName = parameter as string;
21 | if (string.IsNullOrEmpty(referenceTypeName))
22 | {
23 | return false;
24 | }
25 |
26 | return intputTypes.Contains(referenceTypeName);
27 | }
28 |
29 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
30 | {
31 | throw new NotImplementedException();
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/OutputTypeEnumToViewModel.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Linq;
8 | using System.Windows.Data;
9 |
10 | using CommunityToolkit.Mvvm.DependencyInjection;
11 |
12 | using FileConverter.ViewModels;
13 |
14 | public class OutputTypeEnumToViewModel : IValueConverter
15 | {
16 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
17 | {
18 | if (!(value is OutputType))
19 | {
20 | throw new ArgumentException("The value must be an output type value.");
21 | }
22 |
23 | OutputType outputType = (OutputType)value;
24 |
25 | SettingsViewModel settingsViewModel = Ioc.Default.GetRequiredService();
26 |
27 | return settingsViewModel.OutputTypes.Cast()
28 | .FirstOrDefault(match => match.Type == outputType);
29 | }
30 |
31 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
32 | {
33 | OutputTypeViewModel outputTypeViewModel = value as OutputTypeViewModel;
34 | if (outputTypeViewModel == null)
35 | {
36 | return OutputType.None;
37 | }
38 |
39 | return outputTypeViewModel.Type;
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ValueConverters/OutputTypeToVisibility.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ValueConverters
4 | {
5 | using System;
6 | using System.Globalization;
7 | using System.Windows.Data;
8 |
9 | public class OutputTypeToVisibility : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
12 | {
13 | if (!(value is OutputType))
14 | {
15 | throw new ArgumentException("The value must be an output type enum value.");
16 | }
17 |
18 | OutputType outputType = (OutputType)value;
19 |
20 | string referenceTypeName = parameter as string;
21 | if (string.IsNullOrEmpty(referenceTypeName))
22 | {
23 | return "Hidden";
24 | }
25 |
26 | if (!Enum.TryParse(referenceTypeName, out OutputType referenceType))
27 | {
28 | return "Hidden";
29 | }
30 |
31 | return outputType == referenceType ? "Visible" : "Hidden";
32 | }
33 |
34 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
35 | {
36 | throw new NotImplementedException();
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Application/FileConverter/Version.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | using System.Xml.Serialization;
6 |
7 | public struct Version : System.IComparable
8 | {
9 | [XmlAttribute]
10 | public int Major;
11 |
12 | [XmlAttribute]
13 | public int Minor;
14 |
15 | [XmlAttribute]
16 | public int Patch;
17 |
18 | public static bool operator !=(Version a, Version b)
19 | {
20 | return a.CompareTo(b) != 0;
21 | }
22 |
23 | public static bool operator ==(Version a, Version b)
24 | {
25 | return a.CompareTo(b) == 0;
26 | }
27 |
28 | public static bool operator <=(Version a, Version b)
29 | {
30 | return a.CompareTo(b) <= 0;
31 | }
32 |
33 | public static bool operator >=(Version a, Version b)
34 | {
35 | return a.CompareTo(b) >= 0;
36 | }
37 |
38 | public static bool operator <(Version a, Version b)
39 | {
40 | return a.CompareTo(b) < 0;
41 | }
42 |
43 | public static bool operator >(Version a, Version b)
44 | {
45 | return a.CompareTo(b) > 0;
46 | }
47 |
48 | public override string ToString()
49 | {
50 | if (this.Patch == 0)
51 | {
52 | return $"{this.Major}.{this.Minor}";
53 | }
54 |
55 | return $"{this.Major}.{this.Minor}.{this.Patch}";
56 | }
57 |
58 | public override bool Equals(object obj)
59 | {
60 | if (!(obj is Version))
61 | {
62 | return false;
63 | }
64 |
65 | Version other = (Version)obj;
66 |
67 | return this.Major == other.Major && this.Minor == other.Minor && this.Patch == other.Patch;
68 | }
69 |
70 | public override int GetHashCode()
71 | {
72 | return base.GetHashCode();
73 | }
74 |
75 | public int CompareTo(Version other)
76 | {
77 | if (this.Major == other.Major && this.Minor == other.Minor && this.Patch == other.Patch)
78 | {
79 | return 0;
80 | }
81 |
82 | if (this.Major > other.Major ||
83 | (this.Major == other.Major && this.Minor > other.Minor) ||
84 | (this.Major == other.Major && this.Minor == other.Minor && this.Patch > other.Patch))
85 | {
86 | return 1;
87 | }
88 |
89 | return -1;
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/Application/FileConverter/ViewModels/DiagnosticsViewModel.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ViewModels
4 | {
5 | using System.ComponentModel;
6 | using System.Windows.Input;
7 |
8 | using CommunityToolkit.Mvvm.ComponentModel;
9 | using CommunityToolkit.Mvvm.DependencyInjection;
10 | using CommunityToolkit.Mvvm.Input;
11 |
12 | using FileConverter.Services;
13 |
14 | ///
15 | /// This class contains properties that the diagnostics View can data bind to.
16 | ///
17 | public class DiagnosticsViewModel : ObservableRecipient
18 | {
19 | private RelayCommand closeCommand;
20 |
21 | ///
22 | /// Initializes a new instance of the DiagnosticsViewModel class.
23 | ///
24 | public DiagnosticsViewModel()
25 | {
26 | }
27 |
28 | public ICommand CloseCommand
29 | {
30 | get
31 | {
32 | if (this.closeCommand == null)
33 | {
34 | this.closeCommand = new RelayCommand(this.Close);
35 | }
36 |
37 | return this.closeCommand;
38 | }
39 | }
40 |
41 | private void Close(CancelEventArgs args)
42 | {
43 | INavigationService navigationService = Ioc.Default.GetRequiredService();
44 | navigationService.Close(Pages.Diagnostics, args != null);
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Application/FileConverter/ViewModels/HelpViewModel.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ViewModels
4 | {
5 | using System.ComponentModel;
6 | using System.Windows.Input;
7 |
8 | using CommunityToolkit.Mvvm.ComponentModel;
9 | using CommunityToolkit.Mvvm.DependencyInjection;
10 | using CommunityToolkit.Mvvm.Input;
11 |
12 | using FileConverter.Services;
13 |
14 | ///
15 | /// This class contains properties that the main View can data bind to.
16 | ///
17 | public class HelpViewModel : ObservableRecipient
18 | {
19 | private RelayCommand closeCommand;
20 |
21 | ///
22 | /// Initializes a new instance of the HelpViewModel class.
23 | ///
24 | public HelpViewModel()
25 | {
26 | }
27 |
28 | public ICommand CloseCommand
29 | {
30 | get
31 | {
32 | if (this.closeCommand == null)
33 | {
34 | this.closeCommand = new RelayCommand(this.Close);
35 | }
36 |
37 | return this.closeCommand;
38 | }
39 | }
40 |
41 | private void Close(CancelEventArgs args)
42 | {
43 | INavigationService navigationService = Ioc.Default.GetRequiredService();
44 | navigationService.Close(Pages.Help, args != null);
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Application/FileConverter/ViewModels/InputExtension.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ViewModels
4 | {
5 | using System.Windows.Media;
6 |
7 | using CommunityToolkit.Mvvm.ComponentModel;
8 | using CommunityToolkit.Mvvm.DependencyInjection;
9 |
10 | using FileConverter.ConversionJobs;
11 |
12 | public class InputExtension : ObservableObject
13 | {
14 | private readonly Brush defaultBrush = new SolidColorBrush(Color.FromRgb(0, 0, 0));
15 | private readonly Brush errorBrush = new SolidColorBrush(Color.FromRgb(255, 65, 0));
16 |
17 | private string name;
18 | private Brush foregroundBrush;
19 | private string toolTip;
20 |
21 | public InputExtension(string name)
22 | {
23 | this.Name = name;
24 |
25 | ConversionJob_Office.ApplicationName officeApplication = Helpers.GetOfficeApplicationCompatibleWithExtension(name);
26 |
27 | if (officeApplication == ConversionJob_Office.ApplicationName.None || Helpers.IsMicrosoftOfficeApplicationAvailable(officeApplication))
28 | {
29 | this.ForegroundBrush = this.defaultBrush;
30 | }
31 | else
32 | {
33 | this.ForegroundBrush = this.errorBrush;
34 | switch (officeApplication)
35 | {
36 | case ConversionJob_Office.ApplicationName.Word:
37 | this.ToolTip = Properties.Resources.ErrorMicrosoftWordIsNotAvailable;
38 | break;
39 |
40 | case ConversionJob_Office.ApplicationName.PowerPoint:
41 | this.ToolTip = Properties.Resources.ErrorMicrosoftPowerPointIsNotAvailable;
42 | break;
43 |
44 | case ConversionJob_Office.ApplicationName.Excel:
45 | this.ToolTip = Properties.Resources.ErrorMicrosoftExcelIsNotAvailable;
46 | break;
47 | }
48 | }
49 | }
50 |
51 | public string Name
52 | {
53 | get => this.name;
54 |
55 | set
56 | {
57 | this.name = value;
58 | this.OnPropertyChanged();
59 | }
60 | }
61 |
62 | public Brush ForegroundBrush
63 | {
64 | get => this.foregroundBrush;
65 |
66 | set
67 | {
68 | this.foregroundBrush = value;
69 | this.OnPropertyChanged();
70 | }
71 | }
72 |
73 | public string ToolTip
74 | {
75 | get => this.toolTip;
76 |
77 | set
78 | {
79 | this.toolTip = value;
80 | this.OnPropertyChanged();
81 | }
82 | }
83 |
84 | public bool IsChecked
85 | {
86 | get
87 | {
88 | SettingsViewModel settingsViewModel = Ioc.Default.GetRequiredService();
89 | PresetNode selectedPreset = settingsViewModel.SelectedPreset;
90 | if (selectedPreset == null)
91 | {
92 | return false;
93 | }
94 |
95 | return selectedPreset.Preset.InputTypes.Contains(this.name.ToLowerInvariant());
96 | }
97 |
98 | set
99 | {
100 | SettingsViewModel settingsViewModel = Ioc.Default.GetRequiredService();
101 | PresetNode selectedPreset = settingsViewModel.SelectedPreset;
102 |
103 | if (value)
104 | {
105 | selectedPreset?.Preset.AddInputType(this.name.ToLowerInvariant());
106 | }
107 | else
108 | {
109 | selectedPreset?.Preset.RemoveInputType(this.name.ToLowerInvariant());
110 | }
111 |
112 | this.OnPropertyChanged(nameof(this.IsChecked));
113 | }
114 | }
115 |
116 | internal void OnCategoryChanged()
117 | {
118 | this.OnPropertyChanged(nameof(this.IsChecked));
119 | }
120 | }
121 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ViewModels/InputExtensionCategory.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ViewModels
4 | {
5 | using System.ComponentModel;
6 | using System.Collections.Generic;
7 |
8 | using CommunityToolkit.Mvvm.ComponentModel;
9 | using CommunityToolkit.Mvvm.DependencyInjection;
10 |
11 | public class InputExtensionCategory : ObservableObject
12 | {
13 | private readonly List inputExtensions = new List();
14 | private string name;
15 |
16 | public InputExtensionCategory(string name)
17 | {
18 | this.Name = name;
19 | }
20 |
21 | public string Name
22 | {
23 | get => this.name;
24 |
25 | set
26 | {
27 | this.name = value;
28 | this.OnPropertyChanged();
29 | }
30 | }
31 |
32 | public IEnumerable InputExtensions => this.inputExtensions;
33 |
34 | public IEnumerable InputExtensionNames
35 | {
36 | get
37 | {
38 | foreach (InputExtension inputExtension in this.inputExtensions)
39 | {
40 | yield return inputExtension.Name;
41 | }
42 | }
43 | }
44 |
45 | public void AddExtension(string extension)
46 | {
47 | InputExtension inputExtension = this.inputExtensions.Find(match => match.Name == extension);
48 | if (inputExtension == null)
49 | {
50 | inputExtension = new InputExtension(extension);
51 | this.inputExtensions.Add(inputExtension);
52 |
53 | inputExtension.PropertyChanged += this.OnExtensionPropertyChange;
54 |
55 | this.OnPropertyChanged(nameof(this.InputExtensions));
56 | this.OnPropertyChanged(nameof(this.InputExtensionNames));
57 | this.OnPropertyChanged(nameof(this.IsChecked));
58 | }
59 | }
60 |
61 | public bool? IsChecked
62 | {
63 | get
64 | {
65 | SettingsViewModel settingsViewModel = Ioc.Default.GetRequiredService();
66 | PresetNode selectedPreset = settingsViewModel.SelectedPreset;
67 | if (selectedPreset == null)
68 | {
69 | return false;
70 | }
71 |
72 | bool all = true;
73 | bool none = true;
74 | foreach (string extension in this.InputExtensionNames)
75 | {
76 | bool contains = selectedPreset.Preset.InputTypes.Contains(extension);
77 | all &= contains;
78 | none &= !contains;
79 | }
80 |
81 | if (all)
82 | {
83 | return true;
84 | }
85 | else if (none)
86 | {
87 | return false;
88 | }
89 |
90 | return null;
91 | }
92 |
93 | set
94 | {
95 | SettingsViewModel settingsViewModel = Ioc.Default.GetRequiredService();
96 | PresetNode selectedPreset = settingsViewModel.SelectedPreset;
97 |
98 | foreach (string extension in this.InputExtensionNames)
99 | {
100 | if (value == true)
101 | {
102 | selectedPreset?.Preset.AddInputType(extension);
103 | }
104 | else
105 | {
106 | selectedPreset?.Preset.RemoveInputType(extension);
107 | }
108 | }
109 |
110 | // Raise property change for extensions.
111 | foreach (InputExtension inputExtension in this.InputExtensions)
112 | {
113 | inputExtension.OnCategoryChanged();
114 | }
115 |
116 | this.OnPropertyChanged(nameof(this.IsChecked));
117 | }
118 | }
119 |
120 | private void OnExtensionPropertyChange(object sender, PropertyChangedEventArgs e)
121 | {
122 | this.OnPropertyChanged(nameof(this.IsChecked));
123 | }
124 | }
125 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ViewModels/OutputTypeViewModel.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ViewModels
4 | {
5 | public class OutputTypeViewModel
6 | {
7 | public OutputTypeViewModel(OutputType type)
8 | {
9 | this.Type = type;
10 | this.Category = Helpers.GetExtensionCategory(type.ToString().ToLowerInvariant());
11 | }
12 |
13 | public OutputType Type
14 | {
15 | get;
16 | private set;
17 | }
18 |
19 | public string Category
20 | {
21 | get;
22 | set;
23 | }
24 |
25 | public override bool Equals(object other)
26 | {
27 | OutputTypeViewModel outputTypeViewModel = other as OutputTypeViewModel;
28 |
29 | return outputTypeViewModel?.Type == this.Type;
30 | }
31 |
32 | public override int GetHashCode()
33 | {
34 | return this.Type.GetHashCode();
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/Application/FileConverter/ViewModels/UpgradeViewModel.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.ViewModels
4 | {
5 | using System.ComponentModel;
6 | using System.Windows.Input;
7 |
8 | using CommunityToolkit.Mvvm.ComponentModel;
9 | using CommunityToolkit.Mvvm.DependencyInjection;
10 | using CommunityToolkit.Mvvm.Input;
11 |
12 | using FileConverter.Services;
13 |
14 | ///
15 | /// This class contains properties that the upgrade View can data bind to.
16 | ///
17 | public class UpgradeViewModel : ObservableRecipient
18 | {
19 | private readonly IUpgradeService upgradeService;
20 |
21 | private RelayCommand downloadInstallerCommand;
22 | private RelayCommand launchInstallerCommand;
23 | private RelayCommand closeCommand;
24 |
25 | ///
26 | /// Initializes a new instance of the UpgradeViewModel class.
27 | ///
28 | public UpgradeViewModel()
29 | {
30 | this.upgradeService = Ioc.Default.GetRequiredService();
31 | this.upgradeService.DownloadChangeLog();
32 | }
33 |
34 | public ICommand DownloadInstallerCommand
35 | {
36 | get
37 | {
38 | if (this.downloadInstallerCommand == null)
39 | {
40 | this.downloadInstallerCommand = new RelayCommand(this.ExecuteDownloadInstallerCommand);
41 | }
42 |
43 | return this.downloadInstallerCommand;
44 | }
45 | }
46 |
47 | public ICommand LaunchInstallerCommand
48 | {
49 | get
50 | {
51 | if (this.launchInstallerCommand == null)
52 | {
53 | this.launchInstallerCommand = new RelayCommand(this.ExecuteLaunchInstallerCommand);
54 | }
55 |
56 | return this.launchInstallerCommand;
57 | }
58 | }
59 |
60 | public ICommand CloseCommand
61 | {
62 | get
63 | {
64 | if (this.closeCommand == null)
65 | {
66 | this.closeCommand = new RelayCommand(this.Close);
67 | }
68 |
69 | return this.closeCommand;
70 | }
71 | }
72 |
73 | private void ExecuteDownloadInstallerCommand()
74 | {
75 | this.upgradeService.StartUpgrade();
76 |
77 | INavigationService navigationService = Ioc.Default.GetRequiredService();
78 | navigationService.Close(Pages.Upgrade, false);
79 | }
80 |
81 | private void ExecuteLaunchInstallerCommand()
82 | {
83 | INavigationService navigationService = Ioc.Default.GetRequiredService();
84 | navigationService.Close(Pages.Upgrade, false);
85 | }
86 |
87 | private void Close(CancelEventArgs args)
88 | {
89 | INavigationService navigationService = Ioc.Default.GetRequiredService();
90 | navigationService.Close(Pages.Upgrade, args != null);
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/Application/FileConverter/ViewModels/ViewModelLocator.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | /*
4 | In App.xaml:
5 |
6 |
8 |
9 |
10 | In the View:
11 | DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}"
12 | */
13 |
14 | namespace FileConverter.ViewModels
15 | {
16 | using CommunityToolkit.Mvvm.DependencyInjection;
17 | using Microsoft.Extensions.DependencyInjection;
18 |
19 | ///
20 | /// This class contains static references to all the view models in the
21 | /// application and provides an entry point for the bindings.
22 | ///
23 | public class ViewModelLocator
24 | {
25 | ///
26 | /// Initializes a new instance of the ViewModelLocator class.
27 | ///
28 | public ViewModelLocator()
29 | {
30 | }
31 |
32 | public HelpViewModel Help => Ioc.Default.GetRequiredService();
33 |
34 | public MainViewModel Main => Ioc.Default.GetRequiredService();
35 |
36 | public UpgradeViewModel Upgrade => Ioc.Default.GetRequiredService();
37 |
38 | public SettingsViewModel Settings => Ioc.Default.GetRequiredService();
39 |
40 | public DiagnosticsViewModel Diagnostics => Ioc.Default.GetRequiredService();
41 |
42 | internal void RegisterViewModels(ServiceCollection services)
43 | {
44 | services
45 | .AddSingleton()
46 | .AddSingleton()
47 | .AddSingleton()
48 | .AddSingleton()
49 | .AddSingleton();
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/Application/FileConverter/Views/DiagnosticsWindow.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/Application/FileConverter/Views/DiagnosticsWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Views
4 | {
5 | using System.Windows;
6 |
7 | ///
8 | /// Interaction logic for DiagnosticsWindow.
9 | ///
10 | public partial class DiagnosticsWindow : Window
11 | {
12 | public DiagnosticsWindow()
13 | {
14 | this.InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Application/FileConverter/Views/DragDropExtension.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Views
4 | {
5 | using System;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Media;
9 |
10 | ///
11 | /// Provides extended support for drag drop operation
12 | ///
13 | public static class DragDropExtension
14 | {
15 | public static readonly DependencyProperty ScrollOnDragDropProperty = DependencyProperty.RegisterAttached("ScrollOnDragDrop", typeof(bool), typeof(DragDropExtension), new PropertyMetadata(false, HandleScrollOnDragDropChanged));
16 |
17 | public static bool GetScrollOnDragDrop(DependencyObject element)
18 | {
19 | if (element == null)
20 | {
21 | throw new ArgumentNullException(nameof(element));
22 | }
23 |
24 | return (bool)element.GetValue(ScrollOnDragDropProperty);
25 | }
26 |
27 | public static void SetScrollOnDragDrop(DependencyObject element, bool value)
28 | {
29 | if (element == null)
30 | {
31 | throw new ArgumentNullException(nameof(element));
32 | }
33 |
34 | element.SetValue(ScrollOnDragDropProperty, value);
35 | }
36 |
37 | private static void HandleScrollOnDragDropChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
38 | {
39 | if (dependencyObject == null)
40 | {
41 | Diagnostics.Debug.LogError("Invalid types!");
42 | return;
43 | }
44 |
45 | FrameworkElement container = dependencyObject as FrameworkElement;
46 |
47 | Unsubscribe(container);
48 |
49 | if (true.Equals(args.NewValue))
50 | {
51 | Subscribe(container);
52 | }
53 | }
54 |
55 | private static void Subscribe(FrameworkElement container)
56 | {
57 | container.PreviewDragOver += OnContainerPreviewDragOver;
58 | }
59 |
60 | private static void OnContainerPreviewDragOver(object sender, DragEventArgs args)
61 | {
62 | const double Tolerance = 60;
63 | const double Offset = 20;
64 |
65 | FrameworkElement container = sender as FrameworkElement;
66 | if (container == null)
67 | {
68 | return;
69 | }
70 |
71 | ScrollViewer scrollViewer = GetFirstVisualChild(container);
72 | if (scrollViewer == null)
73 | {
74 | return;
75 | }
76 |
77 | double verticalPos = args.GetPosition(container).Y;
78 |
79 | if (verticalPos < Tolerance) // Top of visible list?
80 | {
81 | scrollViewer.ScrollToVerticalOffset(scrollViewer.VerticalOffset - Offset); //Scroll up.
82 | }
83 | else if (verticalPos > container.ActualHeight - Tolerance) // Bottom of visible list?
84 | {
85 | scrollViewer.ScrollToVerticalOffset(scrollViewer.VerticalOffset + Offset); //Scroll down.
86 | }
87 | }
88 |
89 | private static void Unsubscribe(FrameworkElement container)
90 | {
91 | container.PreviewDragOver -= OnContainerPreviewDragOver;
92 | }
93 |
94 | public static T GetFirstVisualChild(DependencyObject dependencyObject) where T : DependencyObject
95 | {
96 | if (dependencyObject != null)
97 | {
98 | for (int i = 0; i < VisualTreeHelper.GetChildrenCount(dependencyObject); i++)
99 | {
100 | DependencyObject child = VisualTreeHelper.GetChild(dependencyObject, i);
101 | if (child is T visualChild)
102 | {
103 | return visualChild;
104 | }
105 |
106 | T childItem = GetFirstVisualChild(child);
107 | if (childItem != null)
108 | {
109 | return childItem;
110 | }
111 | }
112 | }
113 |
114 | return null;
115 | }
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/Application/FileConverter/Views/HelpWindow.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Application/FileConverter/Views/HelpWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Views
4 | {
5 | using System.Windows;
6 |
7 | public partial class HelpWindow : Window
8 | {
9 | public HelpWindow()
10 | {
11 | this.InitializeComponent();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Application/FileConverter/Views/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
51 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/Application/FileConverter/Views/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Views
4 | {
5 | using System.Windows;
6 |
7 | public partial class MainWindow : Window
8 | {
9 | public MainWindow()
10 | {
11 | this.InitializeComponent();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Application/FileConverter/Views/UpgradeWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter.Views
4 | {
5 | using System.Windows;
6 |
7 | public partial class UpgradeWindow : Window
8 | {
9 | public UpgradeWindow()
10 | {
11 | this.InitializeComponent();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Application/FileConverter/XmlHelpers.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverter
4 | {
5 | public class XmlHelpers
6 | {
7 | public static void LoadFromFile(string root, string path, out T deserializedObject)
8 | {
9 | FileConverterExtension.XmlHelpers.LoadFromFile(root, path, out deserializedObject);
10 |
11 | if (deserializedObject is IXmlSerializable xmlSerializableObject)
12 | {
13 | xmlSerializableObject.OnDeserializationComplete();
14 | }
15 | }
16 |
17 | public static void SaveToFile(string root, string path, T objectToSerialize)
18 | {
19 | try
20 | {
21 | FileConverterExtension.XmlHelpers.SaveToFile(root, path, objectToSerialize);
22 | }
23 | catch (System.Exception exception)
24 | {
25 | Diagnostics.Debug.LogError("Fail to save asset of type '" + typeof(T) + "'. The following exception was raised:\n " + exception.Message);
26 | }
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/Application/FileConverterExtension/ConversionPresetReference.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverterExtension
4 | {
5 | using System.Xml.Serialization;
6 |
7 | [XmlRoot("ConversionPreset")]
8 | [XmlType("ConversionPreset")]
9 | public class PresetReference
10 | {
11 | private string fullName;
12 |
13 | private PresetReference()
14 | {
15 | }
16 |
17 | [XmlAttribute("Name")]
18 | public string FullName
19 | {
20 | get => this.fullName;
21 | set
22 | {
23 | this.fullName = value;
24 |
25 | if (!string.IsNullOrEmpty(this.fullName))
26 | {
27 | string[] folders = this.fullName.Split('/');
28 | if (folders.Length > 0)
29 | {
30 | this.Name = folders[folders.Length - 1];
31 | System.Array.Resize(ref folders, folders.Length - 1);
32 | this.Folders = folders;
33 | }
34 | }
35 | }
36 | }
37 |
38 | [XmlElement]
39 | public string[] InputTypes
40 | {
41 | get;
42 | set;
43 | }
44 |
45 | [XmlIgnore]
46 | public string Name
47 | {
48 | get;
49 | private set;
50 | }
51 |
52 | [XmlIgnore]
53 | public string[] Folders
54 | {
55 | get;
56 | private set;
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Application/FileConverterExtension/FileConverterExtension.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {0C44CA69-42D6-4357-BDFD-83069D1ABA2F}
8 | Library
9 | Properties
10 | FileConverterExtension
11 | FileConverterExtension
12 | v4.8
13 | 512
14 |
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 | true
35 |
36 |
37 | FileConverterExtensionKey.snk
38 |
39 |
40 | x64
41 | bin\x64\Debug\
42 |
43 |
44 | x64
45 | bin\x64\Release\
46 |
47 |
48 |
49 |
50 | app.manifest
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | true
66 |
67 |
68 | True
69 | True
70 | Resources.resx
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | ResXFileCodeGenerator
81 | Designer
82 | Resources.Designer.cs
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | 2.7.2
94 |
95 |
96 |
97 |
104 |
--------------------------------------------------------------------------------
/Application/FileConverterExtension/FileConverterExtensionKey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverterExtension/FileConverterExtensionKey.snk
--------------------------------------------------------------------------------
/Application/FileConverterExtension/PathHelpers.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverterExtension
4 | {
5 | using System.IO;
6 | using System;
7 | using Microsoft.Win32;
8 |
9 | public static class PathHelpers
10 | {
11 | private static RegistryKey fileConverterRegistryKey;
12 | private static string fileConverterPath;
13 |
14 | public static string UserSettingsFilePath => Path.Combine(PathHelpers.GetUserDataFolderPath, "Settings.user.xml");
15 |
16 | public static string DefaultSettingsFilePath
17 | {
18 | get
19 | {
20 | string pathToFileConverterExecutable = PathHelpers.FileConverterPath;
21 | if (string.IsNullOrEmpty(pathToFileConverterExecutable))
22 | {
23 | return null;
24 | }
25 |
26 | return Path.Combine(Path.GetDirectoryName(pathToFileConverterExecutable), "Settings.default.xml");
27 | }
28 | }
29 |
30 | public static RegistryKey FileConverterRegistryKey
31 | {
32 | get
33 | {
34 | if (PathHelpers.fileConverterRegistryKey == null)
35 | {
36 | PathHelpers.fileConverterRegistryKey = Registry.CurrentUser.OpenSubKey(@"Software\FileConverter");
37 | if (PathHelpers.fileConverterRegistryKey == null)
38 | {
39 | throw new Exception("Can't retrieve file converter registry entry.");
40 | }
41 | }
42 |
43 | return PathHelpers.fileConverterRegistryKey;
44 | }
45 | }
46 |
47 | public static string FileConverterPath
48 | {
49 | get
50 | {
51 | if (string.IsNullOrEmpty(PathHelpers.fileConverterPath))
52 | {
53 | PathHelpers.fileConverterPath = PathHelpers.FileConverterRegistryKey.GetValue("Path") as string;
54 | }
55 |
56 | return PathHelpers.fileConverterPath;
57 | }
58 | }
59 |
60 | public static string GetUserDataFolderPath
61 | {
62 | get
63 | {
64 | string path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData);
65 | path = Path.Combine(path, "FileConverter");
66 |
67 | if (!Directory.Exists(path))
68 | {
69 | Directory.CreateDirectory(path);
70 | }
71 |
72 | return path;
73 | }
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Application/FileConverterExtension/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("FileConverterExtension")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("FileConverterExtension")]
12 | [assembly: AssemblyCopyright("Copyright © 2025")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("86f3928d-94ef-4d27-8235-1074894e9b5f")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.2.0.0")]
35 | [assembly: AssemblyFileVersion("1.2.0.0")]
36 |
--------------------------------------------------------------------------------
/Application/FileConverterExtension/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace FileConverterExtension.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FileConverterExtension.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
65 | ///
66 | internal static System.Drawing.Icon ApplicationIcon {
67 | get {
68 | object obj = ResourceManager.GetObject("ApplicationIcon", resourceCulture);
69 | return ((System.Drawing.Icon)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
75 | ///
76 | internal static System.Drawing.Icon FolderIcon {
77 | get {
78 | object obj = ResourceManager.GetObject("FolderIcon", resourceCulture);
79 | return ((System.Drawing.Icon)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
85 | ///
86 | internal static System.Drawing.Icon PresetIcon {
87 | get {
88 | object obj = ResourceManager.GetObject("PresetIcon", resourceCulture);
89 | return ((System.Drawing.Icon)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
95 | ///
96 | internal static System.Drawing.Icon SettingsIcon {
97 | get {
98 | object obj = ResourceManager.GetObject("SettingsIcon", resourceCulture);
99 | return ((System.Drawing.Icon)(obj));
100 | }
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/Application/FileConverterExtension/Resources/ApplicationIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverterExtension/Resources/ApplicationIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverterExtension/Resources/FolderIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverterExtension/Resources/FolderIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverterExtension/Resources/PresetIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverterExtension/Resources/PresetIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverterExtension/Resources/SettingsIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Application/FileConverterExtension/Resources/SettingsIcon.ico
--------------------------------------------------------------------------------
/Application/FileConverterExtension/Settings.StyleCop:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | False
8 |
9 |
10 |
11 |
12 | False
13 |
14 |
15 |
16 |
17 | False
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Application/FileConverterExtension/XmlHelpers.cs:
--------------------------------------------------------------------------------
1 | // License: http://www.gnu.org/licenses/gpl.html GPL version 3.
2 |
3 | namespace FileConverterExtension
4 | {
5 | using System;
6 | using System.IO;
7 | using System.Xml;
8 | using System.Xml.Serialization;
9 |
10 | public class XmlHelpers
11 | {
12 | public static void LoadFromFile(string root, string path, out T deserializedObject)
13 | {
14 | if (string.IsNullOrEmpty(path))
15 | {
16 | throw new ArgumentNullException(nameof(path));
17 | }
18 |
19 | XmlRootAttribute xmlRoot = new XmlRootAttribute
20 | {
21 | ElementName = root
22 | };
23 |
24 | XmlSerializer serializer = new XmlSerializer(typeof(T), xmlRoot);
25 |
26 | using (StreamReader reader = new StreamReader(path))
27 | {
28 | XmlReaderSettings xmlReaderSettings = new XmlReaderSettings
29 | {
30 | IgnoreWhitespace = true,
31 | IgnoreComments = true
32 | };
33 |
34 | using (XmlReader xmlReader = XmlReader.Create(reader, xmlReaderSettings))
35 | {
36 | deserializedObject = (T)serializer.Deserialize(xmlReader);
37 | }
38 | }
39 | }
40 |
41 | public static void SaveToFile(string root, string path, T objectToSerialize)
42 | {
43 | if (string.IsNullOrEmpty(path))
44 | {
45 | throw new ArgumentNullException(nameof(path));
46 | }
47 |
48 | if (objectToSerialize == null)
49 | {
50 | throw new ArgumentNullException(nameof(objectToSerialize));
51 | }
52 |
53 | XmlRootAttribute xmlRoot = new XmlRootAttribute
54 | {
55 | ElementName = root
56 | };
57 |
58 | XmlSerializer serializer = new XmlSerializer(typeof(T), xmlRoot);
59 |
60 | using (StreamWriter writer = new StreamWriter(path))
61 | {
62 | XmlWriterSettings xmlWriterSettings = new XmlWriterSettings
63 | {
64 | Indent = true,
65 | IndentChars = " "
66 | };
67 |
68 | using (XmlWriter xmlWriter = XmlWriter.Create(writer, xmlWriterSettings))
69 | {
70 | serializer.Serialize(xmlWriter, objectToSerialize);
71 | }
72 | }
73 | }
74 | }
75 | }
--------------------------------------------------------------------------------
/Application/FileConverterExtension/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
52 |
53 |
54 |
55 | true
56 |
57 |
58 |
59 |
60 |
61 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/FileConverter.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.7.34003.232
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileConverterExtension", "Application\FileConverterExtension\FileConverterExtension.csproj", "{0C44CA69-42D6-4357-BDFD-83069D1ABA2F}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileConverter", "Application\FileConverter\FileConverter.csproj", "{D27A76D2-43E4-43CC-9DA3-334B0B46F4E5}"
9 | EndProject
10 | Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "Installer", "Installer\Installer.wixproj", "{F14673DF-DF38-44B4-AB1D-99A59182C24C}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|x64 = Debug|x64
15 | Release|x64 = Release|x64
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {0C44CA69-42D6-4357-BDFD-83069D1ABA2F}.Debug|x64.ActiveCfg = Debug|x64
19 | {0C44CA69-42D6-4357-BDFD-83069D1ABA2F}.Debug|x64.Build.0 = Debug|x64
20 | {0C44CA69-42D6-4357-BDFD-83069D1ABA2F}.Release|x64.ActiveCfg = Release|x64
21 | {0C44CA69-42D6-4357-BDFD-83069D1ABA2F}.Release|x64.Build.0 = Release|x64
22 | {D27A76D2-43E4-43CC-9DA3-334B0B46F4E5}.Debug|x64.ActiveCfg = Debug|x64
23 | {D27A76D2-43E4-43CC-9DA3-334B0B46F4E5}.Debug|x64.Build.0 = Debug|x64
24 | {D27A76D2-43E4-43CC-9DA3-334B0B46F4E5}.Release|x64.ActiveCfg = Release|x64
25 | {D27A76D2-43E4-43CC-9DA3-334B0B46F4E5}.Release|x64.Build.0 = Release|x64
26 | {F14673DF-DF38-44B4-AB1D-99A59182C24C}.Debug|x64.ActiveCfg = Debug|x64
27 | {F14673DF-DF38-44B4-AB1D-99A59182C24C}.Debug|x64.Build.0 = Debug|x64
28 | {F14673DF-DF38-44B4-AB1D-99A59182C24C}.Release|x64.ActiveCfg = Release|x64
29 | {F14673DF-DF38-44B4-AB1D-99A59182C24C}.Release|x64.Build.0 = Release|x64
30 | EndGlobalSection
31 | GlobalSection(SolutionProperties) = preSolution
32 | HideSolutionNode = FALSE
33 | EndGlobalSection
34 | GlobalSection(ExtensibilityGlobals) = postSolution
35 | SolutionGuid = {25886AE7-2150-459F-A25D-9BF3026508B3}
36 | EndGlobalSection
37 | EndGlobal
38 |
--------------------------------------------------------------------------------
/Installer/DebugInstaller.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | setlocal EnableDelayedExpansion
4 |
5 | REM Analyse command arguments
6 | set quiet="false"
7 | for %%x in (%*) do (
8 | if %%x==--debug (
9 | set msi="bin\x64\Debug\FileConverter-setup.msi"
10 | )
11 | if %%x==-d (
12 | set msi="bin\x64\Debug\FileConverter-setup.msi"
13 | )
14 |
15 | if %%x==--release (
16 | set msi="bin\x64\Release\FileConverter-setup.msi"
17 | )
18 | if %%x==-r (
19 | set msi="bin\x64\Release\FileConverter-setup.msi"
20 | )
21 |
22 | if %%x==--install (
23 | set action="install"
24 | )
25 | if %%x==-i (
26 | set action="install"
27 | )
28 |
29 | if %%x==--uninstall (
30 | set action="uninstall"
31 | )
32 | if %%x==-u (
33 | set action="uninstall"
34 | )
35 |
36 | if %%x==--quiet (
37 | set quiet="true"
38 | )
39 | if %%x==-q (
40 | set quiet="true"
41 | )
42 | )
43 |
44 | if "%msi%"=="" (
45 | echo "Target not defined. Format: DebugInstaller.bat -install|-uninstall -release|-debug"
46 | exit
47 | )
48 |
49 | if "%action%"=="" (
50 | echo "Action not defined. Format: DebugInstaller.bat -install|-uninstall -release|-debug"
51 | exit
52 | )
53 |
54 | REM Execute action.
55 | REM msiexec documentation: https://www.advancedinstaller.com/user-guide/msiexec.html
56 | if %action%=="install" (
57 | echo "Install File Converter using %MSI%..."
58 |
59 | if %quiet%=="true" (
60 | msiexec /i %MSI% /l*v %TEMP%\vmmsi.log /quiet
61 | ) else (
62 | msiexec /i %MSI% /l*v %TEMP%\vmmsi.log
63 | )
64 |
65 | echo "Open install logs"
66 | code "%TEMP%\vmmsi.log"
67 | exit
68 | )
69 | if %action%=="uninstall" (
70 | echo "Uninstall File Converter using %MSI%..."
71 |
72 | if %quiet%=="true" (
73 | msiexec /x %MSI% /l*v %TEMP%\vmmsi.log /quiet
74 | ) else (
75 | msiexec /x %MSI% /l*v %TEMP%\vmmsi.log
76 | )
77 |
78 | echo "Open install logs"
79 | code "%TEMP%\vmmsi.log"
80 | exit
81 | )
82 |
83 | echo "Invalid action " %action%
84 |
--------------------------------------------------------------------------------
/Installer/Installer.wixproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 2.1.0
4 | FileConverter-setup
5 | bin\$(Platform)\$(Configuration)\
6 | obj\$(Platform)\$(Configuration)\
7 |
8 |
9 |
10 | Debug
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | FileConverterExtension
20 | {0c44ca69-42d6-4357-bdfd-83069d1aba2f}
21 | True
22 | True
23 | Binaries;Content;Satellites
24 | INSTALLFOLDER
25 |
26 |
27 | FileConverter
28 | {d27a76d2-43e4-43cc-9da3-334b0b46f4e5}
29 | True
30 | True
31 | Binaries;Content;Satellites
32 | INSTALLFOLDER
33 |
34 |
35 |
36 |
37 | Languages
38 | INSTALLFOLDER
39 | var.FileConverter.TargetDir
40 | true
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/Middleware/Markdown.Xaml.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Middleware/Markdown.Xaml.dll
--------------------------------------------------------------------------------
/Middleware/Ripper.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Middleware/Ripper.dll
--------------------------------------------------------------------------------
/Middleware/ffmpeg/ffmpeg.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Middleware/ffmpeg/ffmpeg.exe
--------------------------------------------------------------------------------
/Middleware/gs/gsdll64.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Middleware/gs/gsdll64.dll
--------------------------------------------------------------------------------
/Middleware/gs/gswin64c.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Middleware/gs/gswin64c.exe
--------------------------------------------------------------------------------
/Middleware/yeti.mmedia.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Middleware/yeti.mmedia.dll
--------------------------------------------------------------------------------
/PresetSamples/To24fpsMp4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | (p)(f) (24fps)
5 | None
6 | avi
7 | bik
8 | flv
9 | mkv
10 | mov
11 | mp4
12 | 3gp
13 | webm
14 | wmv
15 | m4v
16 | mpeg
17 | ogv
18 | gif
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PresetSamples/To48kSampleRateWav.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | (p)(f)
5 | None
6 | 3gp
7 | 3gpp
8 | avi
9 | bik
10 | flv
11 | m4v
12 | mkv
13 | mov
14 | mp4
15 | mpg
16 | mpeg
17 | ogv
18 | rm
19 | ts
20 | vob
21 | webm
22 | wmv
23 | aac
24 | aiff
25 | ape
26 | cda
27 | flac
28 | m4a
29 | m4b
30 | mp3
31 | oga
32 | ogg
33 | opus
34 | wav
35 | wma
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/PresetSamples/ToLowBitrateMp3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 3gp
5 | 3gpp
6 | avi
7 | bik
8 | flv
9 | m4v
10 | mkv
11 | mov
12 | mp4
13 | mpg
14 | mpeg
15 | ogv
16 | rm
17 | ts
18 | vob
19 | webm
20 | wmv
21 | aac
22 | aiff
23 | ape
24 | cda
25 | flac
26 | m4a
27 | m4b
28 | mp3
29 | oga
30 | ogg
31 | opus
32 | wav
33 | wma
34 | None
35 |
36 |
37 |
38 |
39 |
40 | (p)(f)
41 |
42 |
--------------------------------------------------------------------------------
/Resources/Colors.md:
--------------------------------------------------------------------------------
1 | # File Converter Colors
2 |
3 | Color | Code | Description
4 | ------------|-----------|-------------------------------
5 | Blue | #0171BB | File Converter main color
6 | Dark Blue | #004B82 | File Converter main dark color
7 | Red | #FF4100 | Error
8 | Red | #DF3900 | Title
9 | Grey | #786C71 | Light text
--------------------------------------------------------------------------------
/Resources/FFMPEG retro engineering.ods:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/FFMPEG retro engineering.ods
--------------------------------------------------------------------------------
/Resources/FileConverterUsage.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/FileConverterUsage.gif
--------------------------------------------------------------------------------
/Resources/Icons/ApplicationIcon-256x256.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/ApplicationIcon-256x256.ico
--------------------------------------------------------------------------------
/Resources/Icons/ApplicationIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/ApplicationIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/ApplicationIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/ApplicationIcon.png
--------------------------------------------------------------------------------
/Resources/Icons/CancelIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/CancelIcon.png
--------------------------------------------------------------------------------
/Resources/Icons/CancelIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
74 |
--------------------------------------------------------------------------------
/Resources/Icons/DeleteIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/DeleteIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/DeleteIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
93 |
--------------------------------------------------------------------------------
/Resources/Icons/DownIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/DownIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/DownIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
91 |
--------------------------------------------------------------------------------
/Resources/Icons/DownloadIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/DownloadIcon.png
--------------------------------------------------------------------------------
/Resources/Icons/DuplicatePresetIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/DuplicatePresetIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/DuplicatePresetIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
106 |
--------------------------------------------------------------------------------
/Resources/Icons/ExportIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/ExportIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/FailIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/FailIcon.png
--------------------------------------------------------------------------------
/Resources/Icons/FolderIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/FolderIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/FolderIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
79 |
--------------------------------------------------------------------------------
/Resources/Icons/ImportIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/ImportIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/LogIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/LogIcon.png
--------------------------------------------------------------------------------
/Resources/Icons/PresetIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/PresetIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/SettingsIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/SettingsIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/SettingsIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Resources/Icons/SuccessIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/SuccessIcon.png
--------------------------------------------------------------------------------
/Resources/Icons/SuccessIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
73 |
--------------------------------------------------------------------------------
/Resources/Icons/UpIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Icons/UpIcon.ico
--------------------------------------------------------------------------------
/Resources/Icons/UpIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
87 |
--------------------------------------------------------------------------------
/Resources/Installer/Banner.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Installer/Banner.bmp
--------------------------------------------------------------------------------
/Resources/Installer/Banner.pdn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Installer/Banner.pdn
--------------------------------------------------------------------------------
/Resources/Installer/ErrorIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Installer/ErrorIcon.ico
--------------------------------------------------------------------------------
/Resources/Installer/UI.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Installer/UI.bmp
--------------------------------------------------------------------------------
/Resources/Installer/UI.pdn:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Installer/UI.pdn
--------------------------------------------------------------------------------
/Resources/Installer/WarningIcon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Installer/WarningIcon.ico
--------------------------------------------------------------------------------
/Resources/Installer/WarningIcon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
--------------------------------------------------------------------------------
/Resources/Screenshots/Screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Screenshots/Screenshot1.png
--------------------------------------------------------------------------------
/Resources/Screenshots/Screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Screenshots/Screenshot2.png
--------------------------------------------------------------------------------
/Resources/Screenshots/Screenshot3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Tichau/FileConverter/892c8cbceff7461d68c28fc5e18990bda08f901f/Resources/Screenshots/Screenshot3.png
--------------------------------------------------------------------------------
/version (x86).xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | https://github.com/Tichau/FileConverter/releases/download/v1.2.3/FileConverter-1.2.3-x86-setup.msi
4 |
5 |
--------------------------------------------------------------------------------
/version.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | https://github.com/Tichau/FileConverter/releases/download/v1.2.3/FileConverter-1.2.3-x64-setup.msi
4 |
5 |
--------------------------------------------------------------------------------