File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,19 @@ public static WOFCompressionAlgorithm WOFConvertCompressionLevel(int level)
2222 } ;
2323 }
2424
25+ public static CompressionMode CompressionModeFromWOFMode ( WOFCompressionAlgorithm mode )
26+ {
27+ return mode switch
28+ {
29+ WOFCompressionAlgorithm . XPRESS4K => CompressionMode . XPRESS4K ,
30+ WOFCompressionAlgorithm . XPRESS8K => CompressionMode . XPRESS8K ,
31+ WOFCompressionAlgorithm . XPRESS16K => CompressionMode . XPRESS16K ,
32+ WOFCompressionAlgorithm . LZX => CompressionMode . LZX ,
33+ _ => CompressionMode . None
34+ } ;
35+ }
36+
37+
2538 public static WOFCompressionAlgorithm WOFConvertCompressionLevel ( CompressionMode mode )
2639 {
2740 return mode switch
Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ Partial Public Class HomeViewModel : Inherits ObservableObject : Implements IRec
121121 End If
122122
123123 If _watcher.WatchedFolders.Any( Function (w) w.Folder = newFolder.FolderName) Then
124+ Dim watchedFolder = _watcher.WatchedFolders.First( Function (w) w.Folder = newFolder.FolderName)
124125 newFolder.CompressionOptions.WatchFolderForChanges = True
126+ newFolder.CompressionOptions.SelectedCompressionMode = Core.WOFHelper.CompressionModeFromWOFMode(watchedFolder.CompressionLevel)
125127 End If
126128
127129
You can’t perform that action at this time.
0 commit comments