diff --git a/Setup/AdvancedInstaller/ImageGlass_9_x64.aip b/Setup/AdvancedInstaller/ImageGlass_9_x64.aip index d648509d9..9fbda9007 100644 --- a/Setup/AdvancedInstaller/ImageGlass_9_x64.aip +++ b/Setup/AdvancedInstaller/ImageGlass_9_x64.aip @@ -1,5 +1,5 @@ - + @@ -8,7 +8,7 @@ - + @@ -19,10 +19,10 @@ - + - + @@ -36,8 +36,8 @@ - - + + @@ -411,13 +411,13 @@ + - @@ -445,7 +445,7 @@ - + @@ -460,16 +460,12 @@ - - - - - - - - - + + + + + @@ -489,12 +485,13 @@ + - - + + @@ -546,6 +543,7 @@ + @@ -556,9 +554,10 @@ + - + @@ -589,7 +588,7 @@ - + diff --git a/Setup/Assets/Themes/Kobe-Light/ZoomIn.svg b/Setup/Assets/Themes/Kobe-Light/ZoomIn.svg index 1310f2821..f3ab294a5 100644 --- a/Setup/Assets/Themes/Kobe-Light/ZoomIn.svg +++ b/Setup/Assets/Themes/Kobe-Light/ZoomIn.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Setup/Assets/Themes/Kobe-Light/ZoomOut.svg b/Setup/Assets/Themes/Kobe-Light/ZoomOut.svg index f3ab294a5..1310f2821 100644 --- a/Setup/Assets/Themes/Kobe-Light/ZoomOut.svg +++ b/Setup/Assets/Themes/Kobe-Light/ZoomOut.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Setup/Assets/Themes/Kobe/ZoomIn.svg b/Setup/Assets/Themes/Kobe/ZoomIn.svg index 304a3b31c..61a1ea83a 100644 --- a/Setup/Assets/Themes/Kobe/ZoomIn.svg +++ b/Setup/Assets/Themes/Kobe/ZoomIn.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Setup/Assets/Themes/Kobe/ZoomOut.svg b/Setup/Assets/Themes/Kobe/ZoomOut.svg index 61a1ea83a..304a3b31c 100644 --- a/Setup/Assets/Themes/Kobe/ZoomOut.svg +++ b/Setup/Assets/Themes/Kobe/ZoomOut.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/cacheIndex.txt b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/cacheIndex.txt index 7f611fa3d..4e2a1e829 100644 Binary files a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/cacheIndex.txt and b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/cacheIndex.txt differ diff --git a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part1/output-info.ini b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part1/output-info.ini deleted file mode 100644 index 24a51592f..000000000 Binary files a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part1/output-info.ini and /dev/null differ diff --git a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part1/disk1.cab b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part2/disk1.cab similarity index 67% rename from Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part1/disk1.cab rename to Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part2/disk1.cab index 8bc24b00d..c8e5f3221 100644 Binary files a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part1/disk1.cab and b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part2/disk1.cab differ diff --git a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part2/output-info.ini b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part2/output-info.ini new file mode 100644 index 000000000..2a9d1a25b Binary files /dev/null and b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64-cache/part2/output-info.ini differ diff --git a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.aip b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.aip index dbef439f1..9c4dbd3d6 100644 --- a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.aip +++ b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.aip @@ -1,5 +1,5 @@ - + @@ -19,10 +19,10 @@ - + - + @@ -54,48 +54,14 @@ - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - + - - - - - - - - @@ -106,53 +72,15 @@ - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - @@ -162,16 +90,6 @@ - - - - - - - - - - @@ -184,161 +102,158 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -348,12 +263,11 @@ + - - @@ -370,164 +284,73 @@ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - + + + + - + - - - + + + + + - + - + + - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - + @@ -538,12 +361,12 @@ + - @@ -554,8 +377,6 @@ - - @@ -566,7 +387,7 @@ - + @@ -579,18 +400,12 @@ - + - - - - - - - - + + @@ -599,9 +414,6 @@ - - - @@ -610,268 +422,28 @@ - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -907,86 +479,10 @@ - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -994,23 +490,17 @@ - - + + - - - - - - - + @@ -1026,130 +516,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -1158,88 +543,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.back (1).aip b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.back(21.0.1).aip similarity index 98% rename from Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.back (1).aip rename to Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.back(21.0.1).aip index 0715dfc81..dbef439f1 100644 --- a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.back (1).aip +++ b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.back(21.0.1).aip @@ -1,5 +1,5 @@ - + @@ -19,10 +19,10 @@ - + - + @@ -495,6 +495,13 @@ + + + + + + + diff --git a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.back.aip b/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.back.aip deleted file mode 100644 index 26d1b225b..000000000 --- a/Setup/v8/AdvancedInstaller/x64/ImageGlass-x64.back.aip +++ /dev/null @@ -1,1246 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/cacheIndex.txt b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/cacheIndex.txt index 7f611fa3d..4e2a1e829 100644 Binary files a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/cacheIndex.txt and b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/cacheIndex.txt differ diff --git a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part1/output-info.ini b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part1/output-info.ini deleted file mode 100644 index 44778869d..000000000 Binary files a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part1/output-info.ini and /dev/null differ diff --git a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part1/disk1.cab b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part2/disk1.cab similarity index 66% rename from Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part1/disk1.cab rename to Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part2/disk1.cab index 4ed11a4d5..d10295953 100644 Binary files a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part1/disk1.cab and b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part2/disk1.cab differ diff --git a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part2/output-info.ini b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part2/output-info.ini new file mode 100644 index 000000000..b65301693 Binary files /dev/null and b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86-cache/part2/output-info.ini differ diff --git a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.aip b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.aip index 2f289e83c..920cd3824 100644 --- a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.aip +++ b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.aip @@ -1,5 +1,5 @@ - + @@ -12,17 +12,17 @@ - + - + - + @@ -83,7 +83,6 @@ - @@ -183,7 +182,7 @@ - + @@ -197,9 +196,7 @@ - - @@ -343,73 +340,72 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -418,13 +414,19 @@ - + + + + + + + - + @@ -435,12 +437,12 @@ + - @@ -461,7 +463,7 @@ - + @@ -476,16 +478,10 @@ - - - - - - - - + + + - @@ -632,10 +628,9 @@ - - + diff --git a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back (1).aip b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back (1).aip deleted file mode 100644 index d6d099486..000000000 --- a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back (1).aip +++ /dev/null @@ -1,697 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back (2).aip b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back(21.0.1).aip similarity index 99% rename from Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back (2).aip rename to Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back(21.0.1).aip index 07b01d281..2f289e83c 100644 --- a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back (2).aip +++ b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back(21.0.1).aip @@ -1,5 +1,5 @@ - + @@ -19,10 +19,10 @@ - + - + @@ -83,6 +83,7 @@ + @@ -417,6 +418,7 @@ + @@ -630,6 +632,7 @@ + diff --git a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back.aip b/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back.aip deleted file mode 100644 index 24767dc29..000000000 --- a/Setup/v8/AdvancedInstaller/x86/ImageGlass-x86.back.aip +++ /dev/null @@ -1,461 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Setup/v8/Assets/Languages/Asturian.iglang b/Setup/v8/Assets/Languages/Asturian.iglang new file mode 100644 index 000000000..6ff3d00bf --- /dev/null +++ b/Setup/v8/Assets/Languages/Asturian.iglang @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Setup/v8/Assets/Languages/Azerbaijani.iglang b/Setup/v8/Assets/Languages/Azerbaijani.iglang new file mode 100644 index 000000000..23d14f231 --- /dev/null +++ b/Setup/v8/Assets/Languages/Azerbaijani.iglang @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Setup/v8/Assets/Languages/Belarusian.iglang b/Setup/v8/Assets/Languages/Belarusian.iglang new file mode 100644 index 000000000..44bef8e46 --- /dev/null +++ b/Setup/v8/Assets/Languages/Belarusian.iglang @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Setup/v8/Assets/Languages/Bulgarian.iglang b/Setup/v8/Assets/Languages/Bulgarian.iglang index acbbdf228..11f78f4b6 100644 --- a/Setup/v8/Assets/Languages/Bulgarian.iglang +++ b/Setup/v8/Assets/Languages/Bulgarian.iglang @@ -1,42 +1,42 @@ - + - + - - - + + + - - - - - - - - - - + + + + + + + + + + - - - - - - - - + + + + + + + + @@ -75,12 +75,12 @@ - + - + @@ -127,17 +127,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -146,7 +146,7 @@ - + @@ -359,7 +359,7 @@ - + diff --git a/Setup/v8/Assets/Languages/Dutch.iglang b/Setup/v8/Assets/Languages/Dutch.iglang index eb2280423..69cd74eeb 100644 --- a/Setup/v8/Assets/Languages/Dutch.iglang +++ b/Setup/v8/Assets/Languages/Dutch.iglang @@ -129,9 +129,9 @@ - - - + + + diff --git a/Setup/v8/Assets/Languages/Esperanto.iglang b/Setup/v8/Assets/Languages/Esperanto.iglang index c92179a12..8935b1bcb 100644 --- a/Setup/v8/Assets/Languages/Esperanto.iglang +++ b/Setup/v8/Assets/Languages/Esperanto.iglang @@ -4,24 +4,24 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + diff --git a/Setup/v8/Assets/Languages/Finnish.iglang b/Setup/v8/Assets/Languages/Finnish.iglang index 2fd703030..c1e7a9ba3 100644 --- a/Setup/v8/Assets/Languages/Finnish.iglang +++ b/Setup/v8/Assets/Languages/Finnish.iglang @@ -44,8 +44,8 @@ - - + + @@ -106,11 +106,11 @@ - - + + - + @@ -129,9 +129,9 @@ - + - + @@ -143,7 +143,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -200,19 +200,19 @@ - + - + - + @@ -247,7 +247,7 @@ - + diff --git a/Setup/v8/Assets/Languages/Greek.iglang b/Setup/v8/Assets/Languages/Greek.iglang index 02f9ec901..2b53db2d1 100644 --- a/Setup/v8/Assets/Languages/Greek.iglang +++ b/Setup/v8/Assets/Languages/Greek.iglang @@ -18,29 +18,29 @@ - - + + - - + + - - - - + + + + - - - - + + + + @@ -60,7 +60,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -120,7 +120,7 @@ - + @@ -153,7 +153,7 @@ - + @@ -322,11 +322,11 @@ - + - - + + diff --git a/Setup/v8/Assets/Languages/Korean.iglang b/Setup/v8/Assets/Languages/Korean.iglang index f13d1afbb..a5a699534 100644 --- a/Setup/v8/Assets/Languages/Korean.iglang +++ b/Setup/v8/Assets/Languages/Korean.iglang @@ -35,7 +35,7 @@ - + @@ -44,7 +44,7 @@ - + @@ -182,7 +182,7 @@ - + diff --git a/Setup/v8/Assets/Languages/Malay.iglang b/Setup/v8/Assets/Languages/Malay.iglang index a1fb74204..86d5d09de 100644 --- a/Setup/v8/Assets/Languages/Malay.iglang +++ b/Setup/v8/Assets/Languages/Malay.iglang @@ -61,7 +61,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -122,10 +122,10 @@ - + - + @@ -236,10 +236,10 @@ - - - - + + + + @@ -248,7 +248,7 @@ - + diff --git a/Setup/v8/Assets/Languages/Mongolian.iglang b/Setup/v8/Assets/Languages/Mongolian.iglang new file mode 100644 index 000000000..1c5ba3643 --- /dev/null +++ b/Setup/v8/Assets/Languages/Mongolian.iglang @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Setup/v8/Assets/Languages/Portuguese.iglang b/Setup/v8/Assets/Languages/Portuguese.iglang index ed5484ffd..9bb7d02df 100644 --- a/Setup/v8/Assets/Languages/Portuguese.iglang +++ b/Setup/v8/Assets/Languages/Portuguese.iglang @@ -1,7 +1,7 @@ - + @@ -20,7 +20,7 @@ - + diff --git a/Setup/v8/Assets/Languages/Russian.iglang b/Setup/v8/Assets/Languages/Russian.iglang index a298bbda4..f58d29447 100644 --- a/Setup/v8/Assets/Languages/Russian.iglang +++ b/Setup/v8/Assets/Languages/Russian.iglang @@ -1,7 +1,7 @@ - + @@ -152,7 +152,7 @@ - + diff --git a/Setup/v8/Assets/Languages/Serbian (Cyrillic).iglang b/Setup/v8/Assets/Languages/Serbian (Cyrillic).iglang index 8c4f2aa83..1b50ed62e 100644 --- a/Setup/v8/Assets/Languages/Serbian (Cyrillic).iglang +++ b/Setup/v8/Assets/Languages/Serbian (Cyrillic).iglang @@ -1,12 +1,12 @@ - + - - - + + + @@ -37,15 +37,15 @@ - - - - + + + + - + @@ -70,7 +70,7 @@ - + @@ -83,7 +83,7 @@ - + @@ -93,27 +93,27 @@ - + - + - + - - + + - + - + - - + + @@ -136,8 +136,8 @@ - - + + @@ -154,7 +154,7 @@ - + @@ -164,57 +164,57 @@ - + - + - + - - + + - - + + - - - + + + - + - - - + + + - - + + - - - + + + - + - + - - - + + + @@ -226,14 +226,14 @@ - - - - - - - - + + + + + + + + @@ -241,14 +241,14 @@ - + - - + + @@ -257,10 +257,10 @@ - - + + - + @@ -270,10 +270,10 @@ - - - - + + + + @@ -293,12 +293,12 @@ - - - + + + - + @@ -306,60 +306,60 @@ - + - + - + - + - - + + - + - + - + - - - + + + - + - - + + - + - + - + - + diff --git a/Setup/v8/Assets/Languages/Slovenian.iglang b/Setup/v8/Assets/Languages/Slovenian.iglang index 54f0a37fe..6625a5581 100644 --- a/Setup/v8/Assets/Languages/Slovenian.iglang +++ b/Setup/v8/Assets/Languages/Slovenian.iglang @@ -129,9 +129,9 @@ - - - + + + diff --git a/Setup/v8/Assets/Languages/Spanish.iglang b/Setup/v8/Assets/Languages/Spanish.iglang index d20ba29d2..be9ff5dcb 100644 --- a/Setup/v8/Assets/Languages/Spanish.iglang +++ b/Setup/v8/Assets/Languages/Spanish.iglang @@ -297,8 +297,8 @@ - - + + diff --git a/Setup/v8/Assets/Languages/Turkish.iglang b/Setup/v8/Assets/Languages/Turkish.iglang index 4b953bd79..88903fec3 100644 --- a/Setup/v8/Assets/Languages/Turkish.iglang +++ b/Setup/v8/Assets/Languages/Turkish.iglang @@ -129,9 +129,9 @@ - - - + + + diff --git a/Setup/v8/Assets/Languages/Vietnamese.iglang b/Setup/v8/Assets/Languages/Vietnamese.iglang index 73837d4b7..49f9852ea 100644 --- a/Setup/v8/Assets/Languages/Vietnamese.iglang +++ b/Setup/v8/Assets/Languages/Vietnamese.iglang @@ -215,10 +215,10 @@ - - - - + + + + diff --git a/Source/Components/ImageGlass.Base/App.cs b/Source/Components/ImageGlass.Base/App.cs index 8b90cd824..3658db534 100644 --- a/Source/Components/ImageGlass.Base/App.cs +++ b/Source/Components/ImageGlass.Base/App.cs @@ -35,13 +35,6 @@ public class App public static string AppName => FileVersionInfo.GetVersionInfo(IGExePath).ProductName; - /// - /// Gets the application name after removing all space characters. - /// Example: ImageGlass Kobe => ImageGlassKobe - /// - public static string AppNameCode => FileVersionInfo.GetVersionInfo(IGExePath).ProductName.Replace(" ", "", StringComparison.InvariantCultureIgnoreCase); - - /// /// Gets the product version /// @@ -89,7 +82,7 @@ public static string ConfigDir(PathType type, params string[] paths) } // else, use AppData dir - var appDataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), AppNameCode); + var appDataDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), AppName); // create the directory if not exists Directory.CreateDirectory(appDataDir); diff --git a/Source/Components/ImageGlass.Base/BHelper/Extensions/ExpandoObjectExtensions.cs b/Source/Components/ImageGlass.Base/BHelper/Extensions/ExpandoObjectExtensions.cs index 9d0b31b0e..057de57ee 100644 --- a/Source/Components/ImageGlass.Base/BHelper/Extensions/ExpandoObjectExtensions.cs +++ b/Source/Components/ImageGlass.Base/BHelper/Extensions/ExpandoObjectExtensions.cs @@ -30,7 +30,7 @@ public static class ExpandoObjectExtensions public static T GetValue(this ExpandoObject? expObj, string keyName, T defaultValue) { if (expObj == null) return defaultValue; - var dict = expObj.ToDictionary(i => i.Key, i => i.Value); + var dict = expObj as IDictionary; try { @@ -50,7 +50,7 @@ public static T GetValue(this ExpandoObject? expObj, string keyName, T defaul public static object? GetValue(this ExpandoObject? expObj, string keyName) { if (expObj == null) return null; - var dict = expObj.ToDictionary(i => i.Key, i => i.Value); + var dict = expObj as IDictionary; try { @@ -70,7 +70,7 @@ public static T GetValue(this ExpandoObject? expObj, string keyName, T defaul public static bool Remove(this ExpandoObject? expObj, string keyName) { if (expObj == null) return false; - var dict = expObj.ToDictionary(i => i.Key, i => i.Value); + var dict = expObj as IDictionary; return dict.Remove(keyName); } @@ -82,7 +82,7 @@ public static bool Remove(this ExpandoObject? expObj, string keyName) public static void Set(this ExpandoObject? expObj, string keyName, object value) { if (expObj == null) return; - var dict = expObj.ToDictionary(i => i.Key, i => i.Value); + var dict = expObj as IDictionary; if (dict.ContainsKey(keyName)) { diff --git a/Source/Components/ImageGlass.Base/BHelper/JsonEx.cs b/Source/Components/ImageGlass.Base/BHelper/JsonEx.cs index bca4dfe05..26acb1511 100644 --- a/Source/Components/ImageGlass.Base/BHelper/JsonEx.cs +++ b/Source/Components/ImageGlass.Base/BHelper/JsonEx.cs @@ -32,7 +32,7 @@ public partial class BHelper AllowTrailingCommas = true, WriteIndented = true, Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping, - NumberHandling = JsonNumberHandling.AllowReadingFromString, + NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.AllowNamedFloatingPointLiterals, Converters = { diff --git a/Source/Components/ImageGlass.Base/BHelper/Photoing.cs b/Source/Components/ImageGlass.Base/BHelper/Photoing.cs index d950623b6..34c624df8 100644 --- a/Source/Components/ImageGlass.Base/BHelper/Photoing.cs +++ b/Source/Components/ImageGlass.Base/BHelper/Photoing.cs @@ -386,10 +386,10 @@ public static Bitmap ToGdiPlusBitmap(string filePath, bool useICM = true) } -#if NET7_0_OR_GREATER + [GeneratedRegex(@"(^data\:(?image\/[a-z\+\-]*);base64,)?(?[a-zA-Z0-9\+\/\=]+)$", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.Compiled, "en-US")] private static partial Regex Base64DataUriRegex(); -#endif + /// /// Converts base64 string to byte array, returns MIME type and raw data in byte array. @@ -405,11 +405,7 @@ public static (string MimeType, byte[] ByteData) ConvertBase64ToBytes(string? co // data:image/svg-xml;base64,xxxxxxxx // type is optional -#if NET7_0_OR_GREATER var base64DataUri = Base64DataUriRegex(); -#else - var base64DataUri = new Regex(@"(^data\:(?image\/[a-z\+\-]*);base64,)?(?[a-zA-Z0-9\+\/\=]+)$", RegexOptions.Compiled | RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase); -#endif var match = base64DataUri.Match(content); if (!match.Success) diff --git a/Source/Components/ImageGlass.Base/BHelper/ThemeUtils.cs b/Source/Components/ImageGlass.Base/BHelper/ThemeUtils.cs index f0dbb89cc..aa42138d9 100644 --- a/Source/Components/ImageGlass.Base/BHelper/ThemeUtils.cs +++ b/Source/Components/ImageGlass.Base/BHelper/ThemeUtils.cs @@ -76,17 +76,17 @@ public static Color ColorFromHex(string hex, bool skipAlpha = false) if (hex.Length == 8) { // #RRGGBBAA - red = byte.Parse(hex.Substring(0, 2), NumberStyles.AllowHexSpecifier); - green = byte.Parse(hex.Substring(2, 2), NumberStyles.AllowHexSpecifier); - blue = byte.Parse(hex.Substring(4, 2), NumberStyles.AllowHexSpecifier); - alpha = byte.Parse(hex.Substring(6, 2), NumberStyles.AllowHexSpecifier); + red = byte.Parse(hex.AsSpan(0, 2), NumberStyles.AllowHexSpecifier); + green = byte.Parse(hex.AsSpan(2, 2), NumberStyles.AllowHexSpecifier); + blue = byte.Parse(hex.AsSpan(4, 2), NumberStyles.AllowHexSpecifier); + alpha = byte.Parse(hex.AsSpan(6, 2), NumberStyles.AllowHexSpecifier); } else if (hex.Length == 6) { // #RRGGBB - red = byte.Parse(hex.Substring(0, 2), NumberStyles.AllowHexSpecifier); - green = byte.Parse(hex.Substring(2, 2), NumberStyles.AllowHexSpecifier); - blue = byte.Parse(hex.Substring(4, 2), NumberStyles.AllowHexSpecifier); + red = byte.Parse(hex.AsSpan(0, 2), NumberStyles.AllowHexSpecifier); + green = byte.Parse(hex.AsSpan(2, 2), NumberStyles.AllowHexSpecifier); + blue = byte.Parse(hex.AsSpan(4, 2), NumberStyles.AllowHexSpecifier); } else if (hex.Length == 4) { diff --git a/Source/Components/ImageGlass.Base/Cache/DiskCache.cs b/Source/Components/ImageGlass.Base/Cache/DiskCache.cs index 07dde3f76..3d9cdceb1 100644 --- a/Source/Components/ImageGlass.Base/Cache/DiskCache.cs +++ b/Source/Components/ImageGlass.Base/Cache/DiskCache.cs @@ -235,10 +235,9 @@ public void Clear() /// Item key. private static string MakeKey(string key) { - using var md5 = MD5.Create(); - var hash = md5.ComputeHash(Encoding.ASCII.GetBytes(key)); + var hash = MD5.HashData(Encoding.ASCII.GetBytes(key)); - return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant(); + return Convert.ToHexString(hash).ToLowerInvariant(); } /// diff --git a/Source/Components/ImageGlass.Base/ImageGlass.Base.csproj b/Source/Components/ImageGlass.Base/ImageGlass.Base.csproj index 5e1aefc85..612ef8dcf 100644 --- a/Source/Components/ImageGlass.Base/ImageGlass.Base.csproj +++ b/Source/Components/ImageGlass.Base/ImageGlass.Base.csproj @@ -13,6 +13,7 @@ Debug;Release;Publish_Release latest + true @@ -88,7 +89,7 @@ - + diff --git a/Source/Components/ImageGlass.Base/Language/IgLang.cs b/Source/Components/ImageGlass.Base/Language/IgLang.cs index 830ea0824..c59bb6de1 100644 --- a/Source/Components/ImageGlass.Base/Language/IgLang.cs +++ b/Source/Components/ImageGlass.Base/Language/IgLang.cs @@ -1,6 +1,6 @@ /* ImageGlass Project - Image viewer for Windows -Copyright (C) 2010 - 2023 DUONG DIEU PHAP +Copyright (C) 2010 - 2024 DUONG DIEU PHAP Project homepage: https://imageglass.org This program is free software: you can redistribute it and/or modify @@ -99,6 +99,13 @@ public async Task SaveAsFileAsync(string filePath) { var model = new IgLangJsonModel(Metadata, this); + if (Metadata.EnglishName.Equals("English", StringComparison.OrdinalIgnoreCase)) + { + model._Metadata.EnglishName = ""; + model._Metadata.LocalName = ""; + model._Metadata.Author = ""; + } + await BHelper.WriteJsonAsync(filePath, model); } @@ -167,6 +174,8 @@ public void InitDefaultLanguage() _ = TryAdd("_._UserAction._MethodArgumentNotSupported", "The argument type of method '{0}' is not supported"); // v9.0 _ = TryAdd("_._UserAction._Win32ExeError", "Cannot execute command '{0}'. Make sure the name is correct."); // v9.0 + _ = TryAdd("_._Webview2._NotFound", "ImageGlass could not detect WebView2 Runtime 64-bit on your machine."); // 9.1 + // Gallery tooltip _ = TryAdd($"_.Metadata._{nameof(IgMetadata.FileSize)}", "File size"); //v9.0 _ = TryAdd($"_.Metadata._{nameof(IgMetadata.FileCreationTime)}", "Date created"); //v9.0 @@ -335,7 +344,7 @@ public void InitDefaultLanguage() _ = TryAdd("FrmMain.MnuRename._Description", "Enter a new filename:"); // v9.0 _ = TryAdd("FrmMain.MnuMoveToRecycleBin", "Move to the Recycle Bin"); //v3.0 _ = TryAdd("FrmMain.MnuMoveToRecycleBin._Description", "Do you want to move this file to the Recycle bin?"); //v3.0 - _ = TryAdd("FrmMain.MnuDeleteFromHardDisk", "Delete from hard disk"); //v3.0 + _ = TryAdd("FrmMain.MnuDeleteFromHardDisk", "Delete permanently"); //v3.0 _ = TryAdd("FrmMain.MnuDeleteFromHardDisk._Description", "Are you sure you want to permanently delete this file?"); //v3.0 _ = TryAdd("FrmMain.MnuExportFrames", "Export image frames…"); //v7.5 _ = TryAdd("FrmMain.MnuToggleImageAnimation", "Start / stop animating image"); //v3.0 @@ -368,18 +377,11 @@ public void InitDefaultLanguage() #endregion _ = TryAdd("FrmMain.MnuWindowFit", "Window Fit"); //v7.5 - _ = TryAdd("FrmMain.MnuWindowFit._Enable", "Window Fit mode is enabled"); // v9.0 - _ = TryAdd("FrmMain.MnuWindowFit._Disable", "Window Fit mode is disabled"); // v9.0 - _ = TryAdd("FrmMain.MnuFullScreen", "Full Screen"); //v3.0 - _ = TryAdd("FrmMain.MnuFullScreen._Enable", "Full Screen mode is enabled"); // v9.0 - _ = TryAdd("FrmMain.MnuFullScreen._EnableDescription", "Press {0} to exit Full Screen mode."); // v2.0 - _ = TryAdd("FrmMain.MnuFullScreen._Disable", "Full Screen mode is disabled"); // v9.0 _ = TryAdd("FrmMain.MnuFrameless", "Frameless"); //v7.5 - _ = TryAdd("FrmMain.MnuFrameless._Enable", "Frameless mode is enabled"); // v9.0 _ = TryAdd("FrmMain.MnuFrameless._EnableDescription", "Hold Shift key to move the window."); // v7.5 - _ = TryAdd("FrmMain.MnuFrameless._Disable", "Frameless mode is disabled"); // v9.0 + _ = TryAdd("FrmMain.MnuSlideshow", "Slideshow"); //v3.0 #region Layout @@ -395,7 +397,7 @@ public void InitDefaultLanguage() #region Tools _ = TryAdd("FrmMain.MnuTools", "Tools"); //v3.0 _ = TryAdd("FrmMain.MnuColorPicker", "Color picker"); //v5.0 - _ = TryAdd("FrmMain.MnuPageNav", "Page navigation"); // v7.5 + _ = TryAdd("FrmMain.MnuFrameNav", "Frame navigation"); // v7.5 _ = TryAdd("FrmMain.MnuCropTool", "Crop image"); // v7.6 _ = TryAdd("FrmMain.MnuGetMoreTools", "Get more tools…"); // v9.0 #endregion @@ -532,6 +534,7 @@ public void InitDefaultLanguage() _ = TryAdd("FrmSettings._ColorManagement", "Color management"); _ = TryAdd("FrmSettings._ShouldUseColorProfileForAll", "Apply also for images without embedded color profile"); _ = TryAdd("FrmSettings._ColorProfile", "Color profile"); + _ = TryAdd("FrmSettings._CurrentMonitorProfile._Description", "ImageGlass does not auto-update the color when moving its window between monitors"); #endregion // Tab Image @@ -597,7 +600,7 @@ public void InitDefaultLanguage() // Viewer > Zooming _ = TryAdd("FrmSettings._Zooming", "Zooming"); _ = TryAdd("FrmSettings._ImageInterpolation", "Image interpolation"); - _ = TryAdd("FrmSettings._ImageInterpolation._ScaleDown", "When zoom ≤ 100%"); + _ = TryAdd("FrmSettings._ImageInterpolation._ScaleDown", "When zoom < 100%"); _ = TryAdd("FrmSettings._ImageInterpolation._ScaleUp", "When zoom > 100%"); _ = TryAdd("FrmSettings._ZoomSpeed", "Zoom speed"); _ = TryAdd("FrmSettings._ZoomLevels", "Zoom levels"); @@ -741,7 +744,7 @@ public void InitDefaultLanguage() // Crop settings _ = TryAdd("FrmCropSettings._Title", "Crop settings"); //v9.0 _ = TryAdd("FrmCropSettings.ChkCloseToolAfterSaving", "Close Crop tool after saving"); //v9.0 - _ = TryAdd("FrmCropSettings.LblDefaultSelection", "Default selection settings"); //v9.0 + _ = TryAdd("FrmCropSettings.LblDefaultSelection", "Default selection"); //v9.0 _ = TryAdd("FrmCropSettings.ChkAutoCenterSelection", "Auto-center selection"); //v9.0 _ = TryAdd("FrmCropSettings.DefaultSelectionType._UseTheLastSelection", "Use the last selection"); //v9.0 diff --git a/Source/Components/ImageGlass.Base/Language/IgLangModels.cs b/Source/Components/ImageGlass.Base/Language/IgLangModels.cs index 24aad1b5e..b7e3fed92 100644 --- a/Source/Components/ImageGlass.Base/Language/IgLangModels.cs +++ b/Source/Components/ImageGlass.Base/Language/IgLangModels.cs @@ -28,7 +28,7 @@ public record IgLangMetadata public string EnglishName { get; set; } = "English"; public string LocalName { get; set; } = "English"; public string Author { get; set; } = "Duong Dieu Phap"; - public string MinVersion { get; set; } = "9.0.0.0"; + public string MinVersion { get; set; } = "9.1"; } diff --git a/Source/Components/ImageGlass.Base/Photoing/Codecs/PhotoCodec.cs b/Source/Components/ImageGlass.Base/Photoing/Codecs/PhotoCodec.cs index 966422627..792276a7d 100644 --- a/Source/Components/ImageGlass.Base/Photoing/Codecs/PhotoCodec.cs +++ b/Source/Components/ImageGlass.Base/Photoing/Codecs/PhotoCodec.cs @@ -542,7 +542,7 @@ public static async Task SaveAsBase64Async(WicBitmapSource? srcBitmap, string sr // write base64 file using var sw = new StreamWriter(destFilePath); await sw.WriteAsync(header + base64).ConfigureAwait(false); - await sw.FlushAsync().ConfigureAwait(false); + await sw.FlushAsync(token).ConfigureAwait(false); sw.Close(); } catch (OperationCanceledException) { } @@ -603,7 +603,7 @@ public static async Task SaveAsBase64Async(string srcFilePath, string destFilePa // write base64 file using var sw = new StreamWriter(destFilePath); await sw.WriteAsync(header + base64); - await sw.FlushAsync().ConfigureAwait(false); + await sw.FlushAsync(token).ConfigureAwait(false); sw.Close(); return; diff --git a/Source/Components/ImageGlass.Base/Types/Const.cs b/Source/Components/ImageGlass.Base/Types/Const.cs index eff7e5f45..4c9dd7e63 100644 --- a/Source/Components/ImageGlass.Base/Types/Const.cs +++ b/Source/Components/ImageGlass.Base/Types/Const.cs @@ -52,8 +52,8 @@ public static class Const public const string IGTOOL_EXIFTOOL = "Tool_ExifGlass"; public const string IGTOOL_SLIDESHOW = "Tool_Slideshow"; - public const string PAGE_NAV_TOOLBAR_FRAME_INFO = "Lbl_PageNav_FrameInfo"; - public const string PAGE_NAV_TOOLBAR_TOGGLE_ANIMATION = "Btn_PageNav_ToggleFrameAnimation"; + public const string FRAME_NAV_TOOLBAR_FRAME_INFO = "Lbl_FrameNav_FrameInfo"; + public const string FRAME_NAV_TOOLBAR_TOGGLE_ANIMATION = "Btn_FrameNav_ToggleFrameAnimation"; /// diff --git a/Source/Components/ImageGlass.Base/Webview2/Web2.cs b/Source/Components/ImageGlass.Base/Webview2/Web2.cs index cf2547a66..d0c84363a 100644 --- a/Source/Components/ImageGlass.Base/Webview2/Web2.cs +++ b/Source/Components/ImageGlass.Base/Webview2/Web2.cs @@ -1,6 +1,6 @@ /* ImageGlass Project - Image viewer for Windows -Copyright (C) 2010 - 2023 DUONG DIEU PHAP +Copyright (C) 2010 - 2024 DUONG DIEU PHAP Project homepage: https://imageglass.org This program is free software: you can redistribute it and/or modify @@ -74,6 +74,27 @@ public Color AccentColor /// public bool IsWeb2Ready => this.CoreWebView2 != null; + + /// + /// Gets version of runtime, + /// returns null if runtime is not installed. + /// + public static Version? Webview2Version + { + get + { + try + { + var version = CoreWebView2Environment.GetAvailableBrowserVersionString(); + return new Version(version); + } + catch (WebView2RuntimeNotFoundException) { } + + return null; + } + } + + #endregion // Properties @@ -264,6 +285,15 @@ protected virtual async Task OnWeb2ContextMenuRequested(CoreWebView2ContextMenuR /// public async Task EnsureWeb2Async() { + // if WebView2 runtime is not installed + if (!Web2.CheckWebview2Installed()) + { + MessageBox.Show($"{nameof(Web2)}: WebView2 Runtime 64-bit is not found", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + + return; + } + + var options = new CoreWebView2EnvironmentOptions { AdditionalBrowserArguments = "--disable-web-security --allow-file-access-from-files --allow-file-access", @@ -271,8 +301,19 @@ public async Task EnsureWeb2Async() try { + // use AppData dir + // %LocalAppData%\ImageGlass\9.0.7.1125\Webview2_Data + var appDataDir = Path.Combine( + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + App.AppName, + App.Version, + "Webview2_Data"); + + // create the directory if not exists + Directory.CreateDirectory(appDataDir); + var env = await CoreWebView2Environment.CreateAsync( - userDataFolder: App.ConfigDir(PathType.Dir, "WebUIData"), + userDataFolder: appDataDir, options: options); await this.EnsureCoreWebView2Async(env).ConfigureAwait(true); @@ -302,7 +343,7 @@ public async Task EnsureWeb2Async() // Operation aborted (0x80004004 (E_ABORT)) if (ex.HResult == -2147467260) { - + // ignore } else { @@ -314,6 +355,15 @@ public async Task EnsureWeb2Async() } + /// + /// Checks if runtime is installed. + /// + public static bool CheckWebview2Installed() + { + return Web2.Webview2Version != null; + } + + /// /// Sets accent color to content. Example: /// diff --git a/Source/Components/ImageGlass.Gallery/Extractor/GDIMetadataExtractor.cs b/Source/Components/ImageGlass.Gallery/Extractor/GDIMetadataExtractor.cs index e9d0fe121..d019a62c0 100644 --- a/Source/Components/ImageGlass.Gallery/Extractor/GDIMetadataExtractor.cs +++ b/Source/Components/ImageGlass.Gallery/Extractor/GDIMetadataExtractor.cs @@ -71,7 +71,7 @@ private static string ExifAscii(byte[] value) if (value == null || value.Length == 0) return string.Empty; - var str = Encoding.ASCII.GetString(value).Trim(new char[] { '\0' }); + var str = Encoding.ASCII.GetString(value).Trim('\0'); return str; } diff --git a/Source/Components/ImageGlass.Settings/Config.cs b/Source/Components/ImageGlass.Settings/Config.cs index f293f3e7a..01e363e7a 100644 --- a/Source/Components/ImageGlass.Settings/Config.cs +++ b/Source/Components/ImageGlass.Settings/Config.cs @@ -51,8 +51,7 @@ public static class Config /// /// The default image info tags /// - public static List DefaultImageInfoTags => new() - { + public static List DefaultImageInfoTags => [ nameof(ImageInfo.Name), nameof(ImageInfo.ListCount), nameof(ImageInfo.FrameCount), @@ -63,7 +62,7 @@ public static class Config nameof(ImageInfo.ExifRating), nameof(ImageInfo.DateTimeAuto), nameof(ImageInfo.AppName), - }; + ]; /// @@ -101,7 +100,7 @@ public static class Config /// /// Gets, sets the config section of tool settings. /// - public static ExpandoObject ToolSettings { get; set; } = new ExpandoObject(); + public static ExpandoObject ToolSettings { get; set; } = new(); #region Boolean items @@ -520,22 +519,22 @@ public static class Config /// /// Gets, sets the list of apps for edit action. /// - public static Dictionary EditApps { get; set; } = new(); + public static Dictionary EditApps { get; set; } = []; /// /// Gets, sets the list of supported image formats /// - public static HashSet FileFormats { get; set; } = new(); + public static HashSet FileFormats { get; set; } = []; /// /// Gets, sets the list of formats that only load the first frame forcefully /// - public static HashSet SingleFrameFormats { get; set; } = new() { ".heic;.heif;.psd;.jxl" }; + public static HashSet SingleFrameFormats { get; set; } = [".avif", ".heic", ".heif", ".psd", ".jxl"]; /// /// Gets, sets the list of toolbar buttons /// - public static List ToolbarButtons { get; set; } = new(); + public static List ToolbarButtons { get; set; } = []; /// /// Gets, sets the tags for displaying image info @@ -545,29 +544,28 @@ public static class Config /// /// Gets, sets hotkeys list of menu /// - public static Dictionary> MenuHotkeys { get; set; } = new(); + public static Dictionary> MenuHotkeys { get; set; } = []; /// /// Gets, sets mouse click actions /// - public static Dictionary MouseClickActions { get; set; } = new(); + public static Dictionary MouseClickActions { get; set; } = []; /// /// Gets, sets mouse wheel actions /// - public static Dictionary MouseWheelActions { get; set; } = new(); + public static Dictionary MouseWheelActions { get; set; } = []; /// /// Gets, sets layout for FrmMain. Syntax: /// Dictionary["ControlName", "DockStyle;order"] /// - public static Dictionary Layout { get; set; } = new(); + public static Dictionary Layout { get; set; } = []; /// /// Gets, sets tools. /// - public static List Tools { get; set; } = new() - { + public static List Tools { get; set; } = [ new IgTool() { ToolId = Const.IGTOOL_EXIFTOOL, @@ -575,14 +573,14 @@ public static class Config Executable = "exifglass", Argument = Const.FILE_MACRO, IsIntegrated = true, - Hotkeys = new List(1) { new Hotkey(Keys.X) }, + Hotkeys = [new Hotkey(Keys.X)], }, - }; + ]; /// /// Gets, sets the list of disabled menus /// - public static List DisabledMenus { get; set; } = new(); + public static List DisabledMenus { get; set; } = []; #endregion // Array items diff --git a/Source/Components/ImageGlass.Settings/Forms/ToolForm.cs b/Source/Components/ImageGlass.Settings/Forms/ToolForm.cs index fe2fb1048..b24a99213 100644 --- a/Source/Components/ImageGlass.Settings/Forms/ToolForm.cs +++ b/Source/Components/ImageGlass.Settings/Forms/ToolForm.cs @@ -1,6 +1,6 @@ /* ImageGlass Project - Image viewer for Windows -Copyright (C) 2010 - 2023 DUONG DIEU PHAP +Copyright (C) 2010 - 2024 DUONG DIEU PHAP Project homepage: https://imageglass.org This program is free software: you can redistribute it and/or modify diff --git a/Source/Components/ImageGlass.Settings/Forms/WebForm.cs b/Source/Components/ImageGlass.Settings/Forms/WebForm.cs index e910ab641..f8dc85c05 100644 --- a/Source/Components/ImageGlass.Settings/Forms/WebForm.cs +++ b/Source/Components/ImageGlass.Settings/Forms/WebForm.cs @@ -1,6 +1,6 @@ /* ImageGlass Project - Image viewer for Windows -Copyright (C) 2010 - 2023 DUONG DIEU PHAP +Copyright (C) 2010 - 2024 DUONG DIEU PHAP Project homepage: https://imageglass.org This program is free software: you can redistribute it and/or modify @@ -24,6 +24,11 @@ namespace ImageGlass; public partial class WebForm : ThemedForm { + /// + /// Checks if WebView2 runtime is installed. + /// + public static bool IsWebView2Installed => Web2.CheckWebview2Installed(); + // Public events #region Public events @@ -58,7 +63,10 @@ public WebForm() Web2.Visible = false; Web2.EnableDebug = Config.EnableDebug; - _ = Web2.EnsureWeb2Async(); + if (IsWebView2Installed) + { + _ = Web2.EnsureWeb2Async(); + } } @@ -70,6 +78,22 @@ protected override void OnLoad(EventArgs e) base.OnLoad(e); if (DesignMode) return; + + // show message if WebView2 runtime is not found + if (!IsWebView2Installed) + { + var label = new ModernLabel() + { + Text = Config.Language["_._Webview2._NotFound"], + Dock = DockStyle.Top, + AutoSize = true, + TextAlign = ContentAlignment.TopCenter, + Padding = new Padding(20), + }; + + Controls.Add(label); + } + _ = Config.UpdateFormIcon(this); ApplyTheme(Config.Theme.Settings.IsDarkMode); } diff --git a/Source/Components/ImageGlass.Settings/ToolConfigs/ColorPickerConfig.cs b/Source/Components/ImageGlass.Settings/ToolConfigs/ColorPickerConfig.cs index 56acbd9ad..577132dfd 100644 --- a/Source/Components/ImageGlass.Settings/ToolConfigs/ColorPickerConfig.cs +++ b/Source/Components/ImageGlass.Settings/ToolConfigs/ColorPickerConfig.cs @@ -1,6 +1,6 @@ /* ImageGlass Project - Image viewer for Windows -Copyright (C) 2010 - 2023 DUONG DIEU PHAP +Copyright (C) 2010 - 2024 DUONG DIEU PHAP Project homepage: https://imageglass.org This program is free software: you can redistribute it and/or modify diff --git a/Source/Components/ImageGlass.Settings/ToolConfigs/ToolConfig.cs b/Source/Components/ImageGlass.Settings/ToolConfigs/IToolConfig.cs similarity index 96% rename from Source/Components/ImageGlass.Settings/ToolConfigs/ToolConfig.cs rename to Source/Components/ImageGlass.Settings/ToolConfigs/IToolConfig.cs index d53594a7c..c0429d80f 100644 --- a/Source/Components/ImageGlass.Settings/ToolConfigs/ToolConfig.cs +++ b/Source/Components/ImageGlass.Settings/ToolConfigs/IToolConfig.cs @@ -1,6 +1,6 @@ /* ImageGlass Project - Image viewer for Windows -Copyright (C) 2010 - 2023 DUONG DIEU PHAP +Copyright (C) 2010 - 2024 DUONG DIEU PHAP Project homepage: https://imageglass.org This program is free software: you can redistribute it and/or modify diff --git a/Source/Components/ImageGlass.Settings/WebUI/FrmAbout.html b/Source/Components/ImageGlass.Settings/WebUI/FrmAbout.html index 51b119183..2a836ef02 100644 --- a/Source/Components/ImageGlass.Settings/WebUI/FrmAbout.html +++ b/Source/Components/ImageGlass.Settings/WebUI/FrmAbout.html @@ -21,10 +21,11 @@

[Slogan]


-

+

[Version] [9.0.0.0] ([64-bit])
- .NET Runtime: [.NET 7] + WebView2 Runtime: [1.0.1111]
+ .NET Runtime: [.NET 7]

Copyright © [2010-2023] by Dương Diệu Pháp.
@@ -156,9 +157,9 @@

libwebp

  • Copyright (c) 2010, Google Inc. All rights reserved.
  • -

    Microsoft.Web.Webview2

    +

    Microsoft.Web.WebView2

    Microsoft.Windows.CsWin32

    diff --git a/Source/Components/ImageGlass.Settings/WebUI/FrmSettings.html b/Source/Components/ImageGlass.Settings/WebUI/FrmSettings.html index 8ae930074..dc659b0ce 100644 --- a/Source/Components/ImageGlass.Settings/WebUI/FrmSettings.html +++ b/Source/Components/ImageGlass.Settings/WebUI/FrmSettings.html @@ -387,6 +387,9 @@
    + diff --git a/Source/Components/ImageGlass.Settings/WebUI/src/FrmAbout.ts b/Source/Components/ImageGlass.Settings/WebUI/src/FrmAbout.ts index 97e9d51ab..eb5f03897 100644 --- a/Source/Components/ImageGlass.Settings/WebUI/src/FrmAbout.ts +++ b/Source/Components/ImageGlass.Settings/WebUI/src/FrmAbout.ts @@ -36,5 +36,6 @@ window._page.loadData = (data: Record = {}) => { query('#Lbl_AppVersion').innerText = data.AppVersion || ''; query('#Lbl_AppArchitecture').innerText = data.AppArchitecture || ''; query('#Lbl_AppRuntime').innerText = data.AppRuntime || ''; + query('#Lbl_WebView2Runtime').innerText = data.WebView2Runtime || ''; }; diff --git a/Source/Components/ImageGlass.Settings/WebUI/src/FrmSettings/TabImage.ts b/Source/Components/ImageGlass.Settings/WebUI/src/FrmSettings/TabImage.ts index 45c17a0e8..09d9e240d 100644 --- a/Source/Components/ImageGlass.Settings/WebUI/src/FrmSettings/TabImage.ts +++ b/Source/Components/ImageGlass.Settings/WebUI/src/FrmSettings/TabImage.ts @@ -72,6 +72,7 @@ export default class TabImage { query('#Btn_BrowseColorProfile').hidden = !useCustomProfile; query('#Section_CustomColorProfile').hidden = !useCustomProfile; + query('#Section_CurrentMonitorProfile').hidden = selectEl.value !== 'CurrentMonitorProfile'; } diff --git a/Source/Components/ImageGlass.Settings/WebUI/src/FrmSettings/TabSlideshow.ts b/Source/Components/ImageGlass.Settings/WebUI/src/FrmSettings/TabSlideshow.ts index 789bcdd06..6d5d38642 100644 --- a/Source/Components/ImageGlass.Settings/WebUI/src/FrmSettings/TabSlideshow.ts +++ b/Source/Components/ImageGlass.Settings/WebUI/src/FrmSettings/TabSlideshow.ts @@ -37,17 +37,21 @@ export default class TabSlideshow { private static handleSlideshowIntervalsChanged() { const fromEl = query('[name="SlideshowInterval"]'); const toEl = query('[name="SlideshowIntervalTo"]'); + const useRandomInterval = query('[name="UseRandomIntervalForSlideshow"]').checked; - fromEl.max = toEl.value; - toEl.min = fromEl.value; + if (useRandomInterval) { + fromEl.max = toEl.value; + toEl.min = fromEl.value; + } + else { + fromEl.max = ''; + } const intervalFrom = +fromEl.value || 5; const intervalTo = +toEl.value || 5; const intervalFromText = TabSlideshow.toTimeString(intervalFrom); const intervalToText = TabSlideshow.toTimeString(intervalTo); - const useRandomInterval = query('[name="UseRandomIntervalForSlideshow"]').checked; - if (useRandomInterval) { query('#Lbl_SlideshowInterval').innerText = `${intervalFromText} - ${intervalToText}`; } @@ -61,10 +65,19 @@ export default class TabSlideshow { * handle when `UseRandomIntervalForSlideshow` is changed. */ private static handleUseRandomIntervalForSlideshowChanged() { + const fromEl = query('[name="SlideshowInterval"]'); + const toEl = query('[name="SlideshowIntervalTo"]'); const useRandomInterval = query('[name="UseRandomIntervalForSlideshow"]').checked; query('#Lbl_SlideshowIntervalFrom').hidden = !useRandomInterval; query('#Section_SlideshowIntervalTo').hidden = !useRandomInterval; + + const intervalFrom = +fromEl.value || 5; + const intervalTo = +toEl.value || 5; + if (useRandomInterval && intervalFrom > intervalTo) { + toEl.min = intervalFrom.toString(); + toEl.value = intervalFrom.toString(); + } } diff --git a/Source/Components/ImageGlass.Settings/WebUI/src/styles/utilities/margin.scss b/Source/Components/ImageGlass.Settings/WebUI/src/styles/utilities/margin.scss index c6a0d3d09..c8e9a48b9 100644 --- a/Source/Components/ImageGlass.Settings/WebUI/src/styles/utilities/margin.scss +++ b/Source/Components/ImageGlass.Settings/WebUI/src/styles/utilities/margin.scss @@ -160,3 +160,21 @@ .ms-auto { margin-left: auto !important; } + + +// Nagative margin +.mt-n1 { + margin-top: -0.25rem !important; +} +.mt-n2 { + margin-top: -0.5rem !important; +} +.mt-n3 { + margin-top: -1rem !important; +} +.mt-n4 { + margin-top: -1.5rem !important; +} +.mt-n5 { + margin-top: -3rem !important; +} \ No newline at end of file diff --git a/Source/Components/ImageGlass.Views/DXCanvas.cs b/Source/Components/ImageGlass.Views/DXCanvas.cs index b289f3b76..59a3251a3 100644 --- a/Source/Components/ImageGlass.Views/DXCanvas.cs +++ b/Source/Components/ImageGlass.Views/DXCanvas.cs @@ -90,7 +90,7 @@ public partial class DXCanvas : DXControl private float _maxZoom = 100f; // 10_000% private float[] _zoomLevels = []; private ImageInterpolation _interpolationScaleDown = ImageInterpolation.MultiSampleLinear; - private ImageInterpolation _interpolationScaledUp = ImageInterpolation.NearestNeighbor; + private ImageInterpolation _interpolationScaleUp = ImageInterpolation.NearestNeighbor; // checkerboard private CheckerboardMode _checkerboardMode = CheckerboardMode.None; @@ -706,12 +706,12 @@ public ImageInterpolation InterpolationScaleDown [DefaultValue(ImageInterpolation.NearestNeighbor)] public ImageInterpolation InterpolationScaleUp { - get => _interpolationScaledUp; + get => _interpolationScaleUp; set { - if (_interpolationScaledUp != value) + if (_interpolationScaleUp != value) { - _interpolationScaledUp = value; + _interpolationScaleUp = value; Invalidate(); } } @@ -722,7 +722,16 @@ public ImageInterpolation InterpolationScaleUp /// Gets the current mode. ///
    [Browsable(false)] - public ImageInterpolation CurrentInterpolation => ZoomFactor > 1f ? _interpolationScaledUp : _interpolationScaleDown; + public ImageInterpolation CurrentInterpolation + { + get + { + if (ZoomFactor < 1f) return _interpolationScaleDown; + if (ZoomFactor > 1f) return _interpolationScaleUp; + + return ImageInterpolation.NearestNeighbor; + } + } #endregion @@ -1055,7 +1064,10 @@ public bool EnableDebug public DXCanvas() { - SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true); + SetStyle(ControlStyles.SupportsTransparentBackColor + | ControlStyles.UserPaint + | ControlStyles.Selectable + | ControlStyles.UserMouse, true); _clickTimer.Tick += ClickTimer_Tick; // touch gesture support @@ -1433,7 +1445,7 @@ protected override void OnResize(EventArgs e) // redraw the control on resizing if it's not manual zoom if (IsReady && Source != ImageSource.Null && !_isManualZoom) { - Refresh(); + Refresh(true, false, true); } base.OnResize(e); @@ -2208,7 +2220,7 @@ public float CalculateZoomFactor(ZoomMode zoomMode, float srcWidth, float srcHei /// /// Updates zoom mode logic. This does not redraw the viewing image. /// - public void SetZoomMode(ZoomMode? mode = null, bool isManualZoom = false) + public void SetZoomMode(ZoomMode? mode = null, bool isManualZoom = false, bool zoomedByResizing = false) { // get zoom factor after applying the zoom mode var zoomMode = mode ?? _zoomMode; @@ -2238,7 +2250,7 @@ public void SetZoomMode(ZoomMode? mode = null, bool isManualZoom = false) IsManualZoom = _isManualZoom, IsZoomModeChange = mode != _zoomMode, IsPreviewingImage = _isPreviewing, - ChangeSource = ZoomChangeSource.ZoomMode, + ChangeSource = zoomedByResizing ? ZoomChangeSource.SizeChanged : ZoomChangeSource.ZoomMode, }); // emit selecting event @@ -2261,11 +2273,11 @@ public new void Refresh() /// /// Forces the control to invalidate itself. /// - public void Refresh(bool resetZoom = true, bool isManualZoom = false) + public void Refresh(bool resetZoom = true, bool isManualZoom = false, bool zoomedByResizing = false) { if (resetZoom) { - SetZoomMode(null, isManualZoom); + SetZoomMode(null, isManualZoom, zoomedByResizing); } Invalidate(); diff --git a/Source/Components/ImageGlass.Views/Events.cs b/Source/Components/ImageGlass.Views/Events.cs index f503aaf17..96e2d9435 100644 --- a/Source/Components/ImageGlass.Views/Events.cs +++ b/Source/Components/ImageGlass.Views/Events.cs @@ -82,6 +82,7 @@ public enum ZoomChangeSource { Unknown, ZoomMode, + SizeChanged, } diff --git a/Source/ImageGlass.sln b/Source/ImageGlass.sln index 3565d3814..e21d1c02d 100644 --- a/Source/ImageGlass.sln +++ b/Source/ImageGlass.sln @@ -286,7 +286,8 @@ Global {96A8D885-BB41-428F-90F5-021F345B4166}.Debug|Any CPU.Build.0 = Debug|x64 {96A8D885-BB41-428F-90F5-021F345B4166}.Debug|ARM.ActiveCfg = Debug|x64 {96A8D885-BB41-428F-90F5-021F345B4166}.Debug|ARM.Build.0 = Debug|x64 - {96A8D885-BB41-428F-90F5-021F345B4166}.Debug|ARM64.ActiveCfg = Debug|x64 + {96A8D885-BB41-428F-90F5-021F345B4166}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {96A8D885-BB41-428F-90F5-021F345B4166}.Debug|ARM64.Build.0 = Debug|ARM64 {96A8D885-BB41-428F-90F5-021F345B4166}.Debug|x64.ActiveCfg = Debug|x64 {96A8D885-BB41-428F-90F5-021F345B4166}.Debug|x64.Build.0 = Debug|x64 {96A8D885-BB41-428F-90F5-021F345B4166}.Debug|x86.ActiveCfg = Debug|x64 @@ -305,7 +306,8 @@ Global {96A8D885-BB41-428F-90F5-021F345B4166}.Release|Any CPU.Build.0 = Release|x64 {96A8D885-BB41-428F-90F5-021F345B4166}.Release|ARM.ActiveCfg = Release|x64 {96A8D885-BB41-428F-90F5-021F345B4166}.Release|ARM.Build.0 = Release|x64 - {96A8D885-BB41-428F-90F5-021F345B4166}.Release|ARM64.ActiveCfg = Release|x64 + {96A8D885-BB41-428F-90F5-021F345B4166}.Release|ARM64.ActiveCfg = Release|ARM64 + {96A8D885-BB41-428F-90F5-021F345B4166}.Release|ARM64.Build.0 = Release|ARM64 {96A8D885-BB41-428F-90F5-021F345B4166}.Release|x64.ActiveCfg = Release|x64 {96A8D885-BB41-428F-90F5-021F345B4166}.Release|x64.Build.0 = Release|x64 {96A8D885-BB41-428F-90F5-021F345B4166}.Release|x86.ActiveCfg = Release|x64 diff --git a/Source/ImageGlass/FrmMain/FrmMain.Configs.cs b/Source/ImageGlass/FrmMain/FrmMain.Configs.cs index dfef2bea8..f2e408c79 100644 --- a/Source/ImageGlass/FrmMain/FrmMain.Configs.cs +++ b/Source/ImageGlass/FrmMain/FrmMain.Configs.cs @@ -1,6 +1,6 @@ /* ImageGlass Project - Image viewer for Windows -Copyright (C) 2010 - 2023 DUONG DIEU PHAP +Copyright (C) 2010 - 2024 DUONG DIEU PHAP Project homepage: https://imageglass.org This program is free software: you can redistribute it and/or modify @@ -38,100 +38,100 @@ public partial class FrmMain public static Dictionary> CurrentMenuHotkeys { get; set; } = new() { // Open main menu - { nameof(MnuMain), new() { new(Keys.Alt | Keys.F) } }, + { nameof(MnuMain), [new(Keys.Alt | Keys.F)] }, // MnuFile - { nameof(MnuOpenFile), new() { new (Keys.Control | Keys.O) } }, - { nameof(MnuPasteImage), new() { new (Keys.Control | Keys.V) } }, - { nameof(MnuNewWindow), new() { new (Keys.Control | Keys.N) } }, - { nameof(MnuSave), new() { new (Keys.Control | Keys.S) } }, - { nameof(MnuSaveAs), new() { new (Keys.Control | Keys.Shift | Keys.S) } }, - { nameof(MnuOpenWith), new() { new (Keys.D) } }, - { nameof(MnuEdit), new() { new (Keys.E) } }, - { nameof(MnuPrint), new() { new (Keys.Control | Keys.P) } }, - { nameof(MnuShare), new() { new (Keys.S) } }, - { nameof(MnuRefresh), new() { new (Keys.R) } }, - { nameof(MnuReload), new() { new (Keys.Control | Keys.R) } }, - { nameof(MnuReloadImageList), new() { new (Keys.Control | Keys.Shift | Keys.R) } }, - { nameof(MnuUnload), new() { new (Keys.U) } }, + { nameof(MnuOpenFile), [new(Keys.Control | Keys.O)] }, + { nameof(MnuPasteImage), [new(Keys.Control | Keys.V)] }, + { nameof(MnuNewWindow), [new(Keys.Control | Keys.N)] }, + { nameof(MnuSave), [new(Keys.Control | Keys.S)] }, + { nameof(MnuSaveAs), [new(Keys.Control | Keys.Shift | Keys.S)] }, + { nameof(MnuOpenWith), [new(Keys.D)] }, + { nameof(MnuEdit), [new(Keys.E)] }, + { nameof(MnuPrint), [new(Keys.Control | Keys.P)] }, + { nameof(MnuShare), [new(Keys.S)] }, + { nameof(MnuRefresh), [new(Keys.R)] }, + { nameof(MnuReload), [new(Keys.Control | Keys.R)] }, + { nameof(MnuReloadImageList), [new(Keys.Control | Keys.Shift | Keys.R)] }, + { nameof(MnuUnload), [new(Keys.U)] }, // MnuNavigation - { nameof(MnuViewNext), new() { new (Keys.Right) } }, - { nameof(MnuViewPrevious), new() { new (Keys.Left) } }, - { nameof(MnuGoTo), new() { new (Keys.F) } }, - { nameof(MnuGoToFirst), new() { new (Keys.Home) } }, - { nameof(MnuGoToLast), new() { new (Keys.End) } }, - { nameof(MnuViewNextFrame), new() { new (Keys.Control | Keys.Right) } }, - { nameof(MnuViewPreviousFrame), new() { new (Keys.Control | Keys.Left) } }, - { nameof(MnuViewFirstFrame), new() { new (Keys.Control | Keys.Home) } }, - { nameof(MnuViewLastFrame), new() { new (Keys.Control | Keys.End) } }, + { nameof(MnuViewNext), [new(Keys.Right)] }, + { nameof(MnuViewPrevious), [new(Keys.Left)] }, + { nameof(MnuGoTo), [new(Keys.F)] }, + { nameof(MnuGoToFirst), [new(Keys.Home)] }, + { nameof(MnuGoToLast), [new(Keys.End)] }, + { nameof(MnuViewNextFrame), [new(Keys.Control | Keys.Right)] }, + { nameof(MnuViewPreviousFrame), [new(Keys.Control | Keys.Left)] }, + { nameof(MnuViewFirstFrame), [new(Keys.Control | Keys.Home)] }, + { nameof(MnuViewLastFrame), [new(Keys.Control | Keys.End)] }, // MnuPanning - { nameof(MnuPanLeft), new() { new (Keys.Alt | Keys.Left) } }, - { nameof(MnuPanRight), new() { new (Keys.Alt | Keys.Right) } }, - { nameof(MnuPanUp), new() { new (Keys.Alt | Keys.Up) } }, - { nameof(MnuPanDown), new() { new (Keys.Alt | Keys.Down) } }, + { nameof(MnuPanLeft), [new(Keys.Alt | Keys.Left)] }, + { nameof(MnuPanRight), [new(Keys.Alt | Keys.Right)] }, + { nameof(MnuPanUp), [new(Keys.Alt | Keys.Up)] }, + { nameof(MnuPanDown), [new(Keys.Alt | Keys.Down)] }, - { nameof(MnuPanToLeftSide), new() { new (Keys.Control | Keys.Alt | Keys.Left) } }, - { nameof(MnuPanToRightSide), new() { new (Keys.Control | Keys.Alt | Keys.Right) } }, - { nameof(MnuPanToTop), new() { new (Keys.Control | Keys.Alt | Keys.Up) } }, - { nameof(MnuPanToBottom), new() { new (Keys.Control | Keys.Alt | Keys.Down) } }, + { nameof(MnuPanToLeftSide), [new(Keys.Control | Keys.Alt | Keys.Left)] }, + { nameof(MnuPanToRightSide), [new(Keys.Control | Keys.Alt | Keys.Right)] }, + { nameof(MnuPanToTop), [new(Keys.Control | Keys.Alt | Keys.Up)] }, + { nameof(MnuPanToBottom), [new(Keys.Control | Keys.Alt | Keys.Down)] }, // MnuZoom - { nameof(MnuZoomIn), new() { new (Keys.Oemplus) } }, // = - { nameof(MnuZoomOut), new() { new (Keys.OemMinus) } }, // - - { nameof(MnuCustomZoom), new() { new (Keys.Z) } }, - { nameof(MnuActualSize), new() { new (Keys.D0), new(Keys.NumPad0) } }, - { nameof(MnuAutoZoom), new() { new (Keys.D1), new(Keys.NumPad1) } }, - { nameof(MnuLockZoom), new() { new (Keys.D2), new (Keys.NumPad2) } }, - { nameof(MnuScaleToWidth), new() { new (Keys.D3), new (Keys.NumPad3) } }, - { nameof(MnuScaleToHeight), new() { new (Keys.D4), new (Keys.NumPad4) } }, - { nameof(MnuScaleToFit), new() { new (Keys.D5), new (Keys.NumPad5) } }, - { nameof(MnuScaleToFill), new() { new (Keys.D6), new (Keys.NumPad6) } }, + { nameof(MnuZoomIn), [new(Keys.Oemplus), new(Keys.Add)] }, // = + { nameof(MnuZoomOut), [new(Keys.OemMinus), new(Keys.Subtract)] }, // - + { nameof(MnuCustomZoom), [new(Keys.Z)] }, + { nameof(MnuActualSize), [new(Keys.D0), new(Keys.NumPad0)] }, + { nameof(MnuAutoZoom), [new(Keys.D1), new(Keys.NumPad1)] }, + { nameof(MnuLockZoom), [new(Keys.D2), new(Keys.NumPad2)] }, + { nameof(MnuScaleToWidth), [new(Keys.D3), new(Keys.NumPad3)] }, + { nameof(MnuScaleToHeight), [new(Keys.D4), new(Keys.NumPad4)] }, + { nameof(MnuScaleToFit), [new(Keys.D5), new(Keys.NumPad5)] }, + { nameof(MnuScaleToFill), [new(Keys.D6), new(Keys.NumPad6)] }, // MnuImage - { nameof(MnuViewChannels), new() { new (Keys.Shift | Keys.C) } }, - { nameof(MnuLoadingOrders), new() { new (Keys.Shift | Keys.O) } }, - { nameof(MnuRotateLeft), new() { new (Keys.Control | Keys.OemPeriod) } }, // Ctrl+. - { nameof(MnuRotateRight), new() { new (Keys.Control | Keys.OemQuestion) } }, // Ctrl+/ - { nameof(MnuFlipHorizontal), new() { new (Keys.Control | Keys.Oem1) } }, // Ctrl+; - { nameof(MnuFlipVertical), new() { new (Keys.Control | Keys.Oem7) } }, // Ctrl+' - { nameof(MnuRename), new() { new (Keys.F2) } }, - { nameof(MnuMoveToRecycleBin), new() { new (Keys.Delete) } }, - { nameof(MnuDeleteFromHardDisk), new() { new (Keys.Shift | Keys.Delete) } }, - { nameof(MnuToggleImageAnimation), new() { new (Keys.Control | Keys.Space) } }, - { nameof(MnuExportFrames), new() { new (Keys.Control | Keys.J) } }, - { nameof(MnuOpenLocation), new() { new (Keys.L) } }, - { nameof(MnuImageProperties), new() { new (Keys.Control | Keys.I) } }, + { nameof(MnuViewChannels), [new(Keys.Shift | Keys.C)] }, + { nameof(MnuLoadingOrders), [new(Keys.Shift | Keys.O)] }, + { nameof(MnuRotateLeft), [new(Keys.Control | Keys.OemPeriod)] }, // Ctrl+. + { nameof(MnuRotateRight), [new(Keys.Control | Keys.OemQuestion)] }, // Ctrl+/ + { nameof(MnuFlipHorizontal), [new(Keys.Control | Keys.Oem1)] }, // Ctrl+; + { nameof(MnuFlipVertical), [new(Keys.Control | Keys.Oem7)] }, // Ctrl+' + { nameof(MnuRename), [new(Keys.F2)] }, + { nameof(MnuMoveToRecycleBin), [new(Keys.Delete)] }, + { nameof(MnuDeleteFromHardDisk), [new(Keys.Shift | Keys.Delete)] }, + { nameof(MnuToggleImageAnimation), [new(Keys.Control | Keys.Space)] }, + { nameof(MnuExportFrames), [new(Keys.Control | Keys.J)] }, + { nameof(MnuOpenLocation), [new(Keys.L)] }, + { nameof(MnuImageProperties), [new(Keys.Control | Keys.I)] }, // MnuClipboard - { nameof(MnuCopyImageData), new() { new (Keys.Control | Keys.C) } }, - { nameof(MnuCopyFile), new() { new (Keys.Control | Keys.Shift | Keys.C) } }, - { nameof(MnuCutFile), new() { new (Keys.Control | Keys.X) } }, - { nameof(MnuCopyPath), new() { new (Keys.Control | Keys.L) } }, - { nameof(MnuClearClipboard), new() { new (Keys.Control | Keys.Oemtilde) } }, // Ctrl+` + { nameof(MnuCopyImageData), [new(Keys.Control | Keys.C)] }, + { nameof(MnuCopyFile), [new(Keys.Control | Keys.Shift | Keys.C)] }, + { nameof(MnuCutFile), [new(Keys.Control | Keys.X)] }, + { nameof(MnuCopyPath), [new(Keys.Control | Keys.L)] }, + { nameof(MnuClearClipboard), [new(Keys.Control | Keys.Oemtilde)] }, // Ctrl+` - { nameof(MnuWindowFit), new() { new (Keys.F9) } }, - { nameof(MnuFrameless), new() { new (Keys.F10) } }, - { nameof(MnuFullScreen), new() { new (Keys.F11) } }, - { nameof(MnuSlideshow), new() { new (Keys.F12) } }, + { nameof(MnuWindowFit), [new(Keys.F9)] }, + { nameof(MnuFrameless), [new(Keys.F10)] }, + { nameof(MnuFullScreen), [new(Keys.F11)] }, + { nameof(MnuSlideshow), [new(Keys.F12)] }, // MnuLayout - { nameof(MnuToggleToolbar), new() { new (Keys.T) } }, - { nameof(MnuToggleGallery), new() { new (Keys.G) } }, - { nameof(MnuToggleCheckerboard), new() { new (Keys.B) } }, + { nameof(MnuToggleToolbar), [new(Keys.T)] }, + { nameof(MnuToggleGallery), [new(Keys.G)] }, + { nameof(MnuToggleCheckerboard), [new(Keys.B)] }, // MnuTools - { nameof(MnuColorPicker), new() { new (Keys.K) } }, - { nameof(MnuCropTool), new() { new (Keys.C) } }, - { nameof(MnuPageNav), new() { new (Keys.P) } }, - { Const.IGTOOL_EXIFTOOL, new() { new (Keys.X) } }, + { nameof(MnuColorPicker), [new(Keys.K)] }, + { nameof(MnuCropTool), [new(Keys.C)] }, + { nameof(MnuFrameNav), [new(Keys.P)] }, + { Const.IGTOOL_EXIFTOOL, [new(Keys.X)] }, // MnuHelp - { nameof(MnuAbout), new() { new (Keys.F1) } }, + { nameof(MnuAbout), [new(Keys.F1)] }, - { nameof(MnuSettings), new() { new (Keys.Control | Keys.Oemcomma) } }, // Ctrl+, - { nameof(MnuExit), new() { new (Keys.Escape), new (Keys.Control | Keys.W) } }, + { nameof(MnuSettings), [new(Keys.Control | Keys.Oemcomma)] }, // Ctrl+, + { nameof(MnuExit), [new(Keys.Escape), new (Keys.Control | Keys.W)] }, }; @@ -265,7 +265,7 @@ private void FrmMainConfig_Load(object? sender, EventArgs e) IG_ToggleFrameless(Config.EnableFrameless, false); // toggle Window fit - IG_ToggleWindowFit(Config.EnableWindowFit, false); + IG_ToggleWindowFit(Config.EnableWindowFit); // to hide the animation effect of window border FormBorderStyle = FormBorderStyle.None; @@ -275,7 +275,7 @@ private void FrmMainConfig_Load(object? sender, EventArgs e) // it can be restore correctly WindowSettings.SetPlacementToWindow(this, WindowSettings.GetFrmMainPlacementFromConfig()); - IG_ToggleFullScreen(true, showInAppMessage: false); + IG_ToggleFullScreen(true); } else { @@ -286,7 +286,7 @@ private void FrmMainConfig_Load(object? sender, EventArgs e) IG_ToggleFrameless(Config.EnableFrameless, false); // toggle Window fit - IG_ToggleWindowFit(Config.EnableWindowFit, false); + IG_ToggleWindowFit(Config.EnableWindowFit); } // start slideshow @@ -299,6 +299,10 @@ private void FrmMainConfig_Load(object? sender, EventArgs e) Local.UpdateFrmMain(UpdateRequests.MouseActions); + // focus on PicMain + PicMain.Focus(); + + // update tag data for zoom mode menus MnuAutoZoom.Tag = new ModernMenuItemTag() { SingleSelect = true }; MnuLockZoom.Tag = new ModernMenuItemTag() { SingleSelect = true }; @@ -747,7 +751,7 @@ public void LoadLanguage() MnuTools.Text = lang[$"{Name}.{nameof(MnuTools)}"]; MnuColorPicker.Text = lang[$"{Name}.{nameof(MnuColorPicker)}"]; - MnuPageNav.Text = lang[$"{Name}.{nameof(MnuPageNav)}"]; + MnuFrameNav.Text = lang[$"{Name}.{nameof(MnuFrameNav)}"]; MnuCropTool.Text = lang[$"{Name}.{nameof(MnuCropTool)}"]; MnuGetMoreTools.Text = lang[$"{Name}.{nameof(MnuGetMoreTools)}"]; @@ -1047,7 +1051,7 @@ public void LoadExternalTools() { nameof(MnuColorPicker), nameof(MnuCropTool), - nameof(MnuPageNav), + nameof(MnuFrameNav), nameof(MnuExternalToolsSeparator), nameof(MnuGetMoreTools), }; @@ -1291,7 +1295,11 @@ private void LoadAppLayout(bool forcedUpdateLayout = false) ResumeLayout(false); // perform layout update - if (forcedUpdateLayout) PerformLayout(); + if (forcedUpdateLayout) + { + PerformLayout(); + PicMain.Focus(); + } } diff --git a/Source/ImageGlass/FrmMain/FrmMain.IGMethods.cs b/Source/ImageGlass/FrmMain/FrmMain.IGMethods.cs index cea9e9773..a30ed8a99 100644 --- a/Source/ImageGlass/FrmMain/FrmMain.IGMethods.cs +++ b/Source/ImageGlass/FrmMain/FrmMain.IGMethods.cs @@ -107,7 +107,7 @@ public void IG_NewWindow() ///
    public void IG_Refresh() { - PicMain.Refresh(); + PicMain.Refresh(true, false, Config.EnableWindowFit); } @@ -888,7 +888,7 @@ public async Task PrintAsync() } // print an image file - // rename ext FAX -> TIFF to multipage printing + // rename ext FAX -> TIFF to multi-frame printing else if (ext.Equals(".FAX", StringComparison.OrdinalIgnoreCase)) { fileToPrint = App.ConfigDir(PathType.File, Dir.Temporary, Path.GetFileNameWithoutExtension(currentFile) + ".tiff"); @@ -1227,7 +1227,7 @@ public void LoadClipboardImage(WicBitmapSource? img) // cancel the current loading image _loadCancelTokenSrc?.Cancel(); - Local.ClipboardImage?.Dispose(); + ClearClipboardImage(); Local.ClipboardImage = img; Local.TempImagePath = null; @@ -1248,6 +1248,12 @@ public void LoadClipboardImage(WicBitmapSource? img) } + public static void ClearClipboardImage() + { + Local.ClipboardImage?.Dispose(); + Local.ClipboardImage = null; + } + #endregion // Clipboard functions @@ -1421,8 +1427,6 @@ public async Task SaveImageAsync(string destFilePath, string srcFilePath = Exception? error = null; PicMain.ShowMessage(destFilePath, Config.Language[$"{langPath}._Saving"]); - _fileWatcher.Stop(); - // save the selection var hasSelection = PicMain.EnableSelection && !PicMain.SourceSelection.IsEmpty; @@ -1494,7 +1498,7 @@ public async Task SaveImageAsync(string destFilePath, string srcFilePath = else if (saveSource == ImageSaveSource.Clipboard) { // clear the clipboard image - LoadClipboardImage(null); + ClearClipboardImage(); // manually update the change if FileWatcher is not enabled if (!Config.EnableRealTimeFileUpdate) @@ -1516,15 +1520,6 @@ public async Task SaveImageAsync(string destFilePath, string srcFilePath = } - // reload image - IG_Reload(); - Gallery.Items[Local.CurrentIndex].UpdateThumbnail(); - if (Config.EnableRealTimeFileUpdate) - { - _fileWatcher.Start(); - } - - // emits ImageSaved event Local.RaiseImageSavedEvent(new ImageSaveEventArgs(srcFilePath, destFilePath, saveSource)); @@ -1537,12 +1532,15 @@ public async Task SaveImageAsync(string destFilePath, string srcFilePath = ///
    private async Task DoSaveAsync(WicBitmapSource? wicImg, string srcPath, string destPath) { + Exception? error = null; + Local.IsBusy = true; + try { var lastWriteTime = File.GetLastWriteTime(destPath); - // only save the current frame if Page Nav tool is open - Local.ImageTransform.FrameIndex = MnuPageNav.Checked + // only save the current frame if Frame Nav tool is open + Local.ImageTransform.FrameIndex = MnuFrameNav.Checked ? (int)Local.CurrentFrameIndex : -1; @@ -1570,10 +1568,12 @@ public async Task SaveImageAsync(string destFilePath, string srcFilePath = } catch (Exception ex) { - return ex; + error = ex; } - return null; + + Local.IsBusy = false; + return error; } @@ -1586,8 +1586,8 @@ public async Task SaveImageAsync(string destFilePath, string srcFilePath = { var lastWriteTime = File.GetLastWriteTime(destPath); - // only save the current frame if Page Nav tool is open - Local.ImageTransform.FrameIndex = MnuPageNav.Checked + // only save the current frame if Frame Nav tool is open + Local.ImageTransform.FrameIndex = MnuFrameNav.Checked ? (int)Local.CurrentFrameIndex : -1; @@ -2019,7 +2019,7 @@ public void IG_ToggleImageAnimation(bool? enable = null) PicMain.StopCurrentAnimator(); } - UpdatePageNavToolbarButtonState(); + UpdateFrameNavToolbarButtonState(); } @@ -2196,7 +2196,7 @@ public async Task SetLockScreenBackgroundAsync() /// /// Toggles Window fit. /// - public bool IG_ToggleWindowFit(bool? enable = null, bool showInAppMessage = true) + public bool IG_ToggleWindowFit(bool? enable = null) { enable ??= !Config.EnableWindowFit; Config.EnableWindowFit = enable.Value; @@ -2206,7 +2206,7 @@ public bool IG_ToggleWindowFit(bool? enable = null, bool showInAppMessage = true // exit full screen if (Config.EnableFullScreen) { - IG_ToggleFullScreen(false, false); + IG_ToggleFullScreen(false); } } @@ -2216,22 +2216,10 @@ public bool IG_ToggleWindowFit(bool? enable = null, bool showInAppMessage = true // update menu item state MnuWindowFit.Checked = Config.EnableWindowFit; - // disable maximize button - MaximizeBox = !Config.EnableWindowFit; // update toolbar items state UpdateToolbarItemsState(); - if (showInAppMessage) - { - var langPath = $"{Name}.{nameof(MnuWindowFit)}"; - var message = Config.EnableWindowFit - ? Config.Language[$"{langPath}._Enable"] - : Config.Language[$"{langPath}._Disable"]; - - PicMain.ShowMessage("", message, Config.InAppMessageDuration); - } - return Config.EnableWindowFit; } @@ -2373,7 +2361,7 @@ public bool IG_ToggleFrameless(bool? enable = null, bool showInAppMessage = true // exit full screen if (Config.EnableFullScreen) { - IG_ToggleFullScreen(false, false); + IG_ToggleFullScreen(false); } } @@ -2398,13 +2386,6 @@ public bool IG_ToggleFrameless(bool? enable = null, bool showInAppMessage = true { PicMain.ShowMessage( string.Format(Config.Language[$"{langPath}._EnableDescription"], MnuFrameless.ShortcutKeyDisplayString), - Config.Language[$"{langPath}._Enable"], - Config.InAppMessageDuration); - } - else - { - PicMain.ShowMessage("", - Config.Language[$"{langPath}._Disable"], Config.InAppMessageDuration); } } @@ -2416,7 +2397,7 @@ public bool IG_ToggleFrameless(bool? enable = null, bool showInAppMessage = true /// /// Toggles full screen mode. /// - public bool IG_ToggleFullScreen(bool? enable = null, bool showInAppMessage = true) + public bool IG_ToggleFullScreen(bool? enable = null) { enable ??= !Config.EnableFullScreen; Config.EnableFullScreen = enable.Value; @@ -2427,7 +2408,7 @@ public bool IG_ToggleFullScreen(bool? enable = null, bool showInAppMessage = tru if (Config.EnableWindowFit) { _isWindowFitBeforeFullscreen = true; - IG_ToggleWindowFit(false, false); + IG_ToggleWindowFit(false); } // exit frameless @@ -2454,33 +2435,12 @@ public bool IG_ToggleFullScreen(bool? enable = null, bool showInAppMessage = tru if (!Config.EnableFullScreen) { if (_isFramelessBeforeFullscreen) IG_ToggleFrameless(true, false); - if (_isWindowFitBeforeFullscreen) IG_ToggleWindowFit(true, false); + if (_isWindowFitBeforeFullscreen) IG_ToggleWindowFit(true); } - else - { - // update toolbar items state - UpdateToolbarItemsState(); - } - - if (showInAppMessage) - { - var langPath = $"{Name}.{nameof(MnuFullScreen)}"; + // update toolbar items state + UpdateToolbarItemsState(); - if (Config.EnableFullScreen) - { - PicMain.ShowMessage( - string.Format(Config.Language[$"{langPath}._EnableDescription"], MnuFullScreen.ShortcutKeyDisplayString), - Config.Language[$"{langPath}._Enable"], - Config.InAppMessageDuration); - } - else - { - PicMain.ShowMessage("", - Config.Language[$"{langPath}._Disable"], - Config.InAppMessageDuration); - } - } return Config.EnableFullScreen; } @@ -3012,14 +2972,14 @@ public bool IG_ToggleColorPicker(bool? visible = null) /// - /// Toggles Page naviagtion tool. + /// Toggles Frame navigation tool. /// - public bool IG_TogglePageNavTool(bool? visible = null) + public bool IG_ToggleFrameNavTool(bool? visible = null) { - visible ??= MnuPageNav.Checked; + visible ??= MnuFrameNav.Checked; // update menu item state - MnuPageNav.Checked = visible.Value; + MnuFrameNav.Checked = visible.Value; // update toolbar items state UpdateToolbarItemsState(); @@ -3042,7 +3002,7 @@ private void TogglePageNavToolbar(bool visible) // display frame info ToolbarContext.AddItem(new() { - Id = Const.PAGE_NAV_TOOLBAR_FRAME_INFO, + Id = Const.FRAME_NAV_TOOLBAR_FRAME_INFO, DisplayStyle = ToolStripItemDisplayStyle.Text, }); @@ -3066,7 +3026,7 @@ private void TogglePageNavToolbar(bool visible) // play/pause frame animation ToolbarContext.AddItem(new() { - Id = Const.PAGE_NAV_TOOLBAR_TOGGLE_ANIMATION, + Id = Const.FRAME_NAV_TOOLBAR_TOGGLE_ANIMATION, Image = nameof(Config.Theme.ToolbarIcons.Play), OnClick = new(nameof(MnuToggleImageAnimation)), }); @@ -3104,20 +3064,20 @@ private void TogglePageNavToolbar(bool visible) ToolbarContext.ResumeLayout(true); - // update frame info on PageNav toolbar - UpdatePageNavToolbarButtonState(); + // update frame info on Frame nav toolbar + UpdateFrameNavToolbarButtonState(); } /// - /// Updates PageNav toolbar buttons state + /// Updates Frame nav toolbar buttons state /// - private void UpdatePageNavToolbarButtonState() + private void UpdateFrameNavToolbarButtonState() { if (!ToolbarContext.Visible) return; // update frame info - if (ToolbarContext.GetItem(Const.PAGE_NAV_TOOLBAR_FRAME_INFO) is ToolStripLabel lbl) + if (ToolbarContext.GetItem(Const.FRAME_NAV_TOOLBAR_FRAME_INFO) is ToolStripLabel lbl) { var frameInfo = new StringBuilder(3); if (Local.Metadata != null) @@ -3133,7 +3093,7 @@ private void UpdatePageNavToolbarButtonState() // update state of Toggle animation button - if (ToolbarContext.GetItem(Const.PAGE_NAV_TOOLBAR_TOGGLE_ANIMATION) is ToolStripButton btn) + if (ToolbarContext.GetItem(Const.FRAME_NAV_TOOLBAR_TOGGLE_ANIMATION) is ToolStripButton btn) { btn.Enabled = PicMain.CanImageAnimate; if (btn.Tag is ToolbarItemTagModel model) diff --git a/Source/ImageGlass/FrmMain/FrmMain.PicMainEvents.cs b/Source/ImageGlass/FrmMain/FrmMain.PicMainEvents.cs index 8122cb0c3..ef8437038 100644 --- a/Source/ImageGlass/FrmMain/FrmMain.PicMainEvents.cs +++ b/Source/ImageGlass/FrmMain/FrmMain.PicMainEvents.cs @@ -32,13 +32,9 @@ public partial class FrmMain { private void PicMain_DragEnter(object sender, DragEventArgs e) { -#if NET7_0_OR_GREATER e.DropImageType = DropImageType.Link; e.Message = string.Format(Config.Language[$"{Name}._OpenWith"], "%1"); e.MessageReplacementToken = App.AppName; -#else - e.Effect = DragDropEffects.Link; -#endif } @@ -397,7 +393,10 @@ private void PicMain_OnNavRightClicked(object? sender, MouseEventArgs e) private void PicMain_OnZoomChanged(object? sender, ZoomEventArgs e) { // Handle window fit after zoom change - if (Config.EnableWindowFit && !e.IsPreviewingImage && (e.IsManualZoom || e.IsZoomModeChange)) + if (Config.EnableWindowFit + && !e.IsPreviewingImage + && e.ChangeSource != ZoomChangeSource.SizeChanged + && (e.IsManualZoom || e.IsZoomModeChange)) { FitWindowToImage(e.ChangeSource == ZoomChangeSource.ZoomMode); } diff --git a/Source/ImageGlass/ImageGlass.csproj b/Source/ImageGlass/ImageGlass.csproj index de0bf57ea..5288c0b4f 100644 --- a/Source/ImageGlass/ImageGlass.csproj +++ b/Source/ImageGlass/ImageGlass.csproj @@ -14,7 +14,7 @@ A lightweight, versatile image viewer Copyright © 2010 - 2024 Duong Dieu Phap Duong Dieu Phap - 9.0.7.1125 + 9.0.7.1130 $(Version) $(AssemblyName).exe @@ -119,7 +119,7 @@ PreserveNewest - + PreserveNewest diff --git a/Source/ImageGlass/Local.cs b/Source/ImageGlass/Local.cs index d09271924..d9cdb6e5d 100644 --- a/Source/ImageGlass/Local.cs +++ b/Source/ImageGlass/Local.cs @@ -232,6 +232,14 @@ public class Local $"Btn_{nameof(FrmMain.MnuOpenFile)}", $"Btn_{nameof(FrmMain.MnuViewPrevious)}", $"Btn_{nameof(FrmMain.MnuViewNext)}", + + nameof(ToolbarItemModelType.Separator), + $"Btn_{nameof(FrmMain.MnuRotateLeft)}", + $"Btn_{nameof(FrmMain.MnuRotateRight)}", + $"Btn_{nameof(FrmMain.MnuFlipHorizontal)}", + $"Btn_{nameof(FrmMain.MnuFlipVertical)}", + $"Btn_{nameof(FrmMain.MnuCropTool)}", + nameof(ToolbarItemModelType.Separator), $"Btn_{nameof(FrmMain.MnuAutoZoom)}", $"Btn_{nameof(FrmMain.MnuLockZoom)}", @@ -239,15 +247,15 @@ public class Local $"Btn_{nameof(FrmMain.MnuScaleToHeight)}", $"Btn_{nameof(FrmMain.MnuScaleToFit)}", $"Btn_{nameof(FrmMain.MnuScaleToFill)}", + nameof(ToolbarItemModelType.Separator), $"Btn_{nameof(FrmMain.MnuRefresh)}", $"Btn_{nameof(FrmMain.MnuToggleGallery)}", $"Btn_{nameof(FrmMain.MnuToggleCheckerboard)}", - nameof(ToolbarItemModelType.Separator), $"Btn_{nameof(FrmMain.MnuFullScreen)}", $"Btn_{nameof(FrmMain.MnuSlideshow)}", + nameof(ToolbarItemModelType.Separator), - $"Btn_{nameof(FrmMain.MnuPrint)}", $"Btn_{nameof(FrmMain.MnuMoveToRecycleBin)}", ]; @@ -457,7 +465,7 @@ public static void RaiseImageSavedEvent(ImageSaveEventArgs e) public static IgMetadata? Metadata { get; set; } /// - /// Gets, sets app state + /// Gets, sets app state. /// public static bool IsBusy { get; set; } diff --git a/Source/ImageGlass/Tools/FrmColorPicker.cs b/Source/ImageGlass/Tools/FrmColorPicker.cs index f16991fc7..cce7065d1 100644 --- a/Source/ImageGlass/Tools/FrmColorPicker.cs +++ b/Source/ImageGlass/Tools/FrmColorPicker.cs @@ -1,6 +1,6 @@ /* ImageGlass Project - Image viewer for Windows -Copyright (C) 2010 - 2023 DUONG DIEU PHAP +Copyright (C) 2010 - 2024 DUONG DIEU PHAP Project homepage: https://imageglass.org This program is free software: you can redistribute it and/or modify diff --git a/Source/ImageGlass/frmAbout.Designer.cs b/Source/ImageGlass/frmAbout.Designer.cs index 1a55565b0..6726c17ac 100644 --- a/Source/ImageGlass/frmAbout.Designer.cs +++ b/Source/ImageGlass/frmAbout.Designer.cs @@ -44,7 +44,7 @@ private void InitializeComponent() AutoScaleMode = AutoScaleMode.Font; AutoSize = true; BackdropStyle = Base.BackdropStyle.Mica; - ClientSize = new Size(594, 584); + ClientSize = new Size(594, 600); FormBorderStyle = FormBorderStyle.FixedDialog; Margin = new Padding(0); MinimizeBox = false; diff --git a/Source/ImageGlass/frmAbout.cs b/Source/ImageGlass/frmAbout.cs index 917c1cfe6..f8bfdb21f 100644 --- a/Source/ImageGlass/frmAbout.cs +++ b/Source/ImageGlass/frmAbout.cs @@ -68,6 +68,7 @@ protected override async Task OnWeb2NavigationCompleted() AppVersion: '{App.Version}', AppArchitecture: '{archInfo}', AppRuntime: '{Environment.Version.ToString()}', + WebView2Runtime: '{Web2.Webview2Version?.ToString()}', }}); "); } diff --git a/Source/ImageGlass/frmMain.Designer.cs b/Source/ImageGlass/frmMain.Designer.cs index 6941c817a..62b29817a 100644 --- a/Source/ImageGlass/frmMain.Designer.cs +++ b/Source/ImageGlass/frmMain.Designer.cs @@ -127,7 +127,7 @@ private void InitializeComponent() MnuTools = new ToolStripMenuItem(); MnuColorPicker = new ToolStripMenuItem(); MnuCropTool = new ToolStripMenuItem(); - MnuPageNav = new ToolStripMenuItem(); + MnuFrameNav = new ToolStripMenuItem(); MnuExternalToolsSeparator = new ToolStripSeparator(); MnuGetMoreTools = new ToolStripMenuItem(); toolStripMenuItem8 = new ToolStripSeparator(); @@ -838,7 +838,7 @@ private void InitializeComponent() // // MnuTools // - MnuTools.DropDownItems.AddRange(new ToolStripItem[] { MnuColorPicker, MnuCropTool, MnuPageNav, MnuExternalToolsSeparator, MnuGetMoreTools }); + MnuTools.DropDownItems.AddRange(new ToolStripItem[] { MnuColorPicker, MnuCropTool, MnuFrameNav, MnuExternalToolsSeparator, MnuGetMoreTools }); MnuTools.Image = (Image)resources.GetObject("MnuTools.Image"); MnuTools.ImageAlign = ContentAlignment.MiddleLeft; MnuTools.ImageScaling = ToolStripItemImageScaling.None; @@ -862,13 +862,13 @@ private void InitializeComponent() MnuCropTool.Text = "[Cropping]"; MnuCropTool.Click += MnuCropTool_Click; // - // MnuPageNav + // MnuFrameNav // - MnuPageNav.CheckOnClick = true; - MnuPageNav.Name = "MnuPageNav"; - MnuPageNav.Size = new Size(177, 22); - MnuPageNav.Text = "[Page navigation]"; - MnuPageNav.Click += MnuPageNav_Click; + MnuFrameNav.CheckOnClick = true; + MnuFrameNav.Name = "MnuFrameNav"; + MnuFrameNav.Size = new Size(177, 22); + MnuFrameNav.Text = "[Frame navigation]"; + MnuFrameNav.Click += MnuFrameNav_Click; // // MnuExternalToolsSeparator // @@ -1192,7 +1192,7 @@ private void InitializeComponent() public ToolStripMenuItem MnuToggleTopMost; public ToolStripMenuItem MnuColorPicker; public ToolStripMenuItem MnuCropTool; - public ToolStripMenuItem MnuPageNav; + public ToolStripMenuItem MnuFrameNav; public ToolStripMenuItem MnuAbout; public ToolStripMenuItem MnuCheckForUpdate; public ToolStripMenuItem MnuReportIssue; diff --git a/Source/ImageGlass/frmMain.cs b/Source/ImageGlass/frmMain.cs index 5c60e4f7a..b78d75e02 100644 --- a/Source/ImageGlass/frmMain.cs +++ b/Source/ImageGlass/frmMain.cs @@ -100,7 +100,7 @@ protected override void OnDpiChanged() // update toolbar theme Toolbar.UpdateTheme(newIconHeight); ToolbarContext.UpdateTheme(newIconHeight); - UpdatePageNavToolbarButtonState(); + UpdateFrameNavToolbarButtonState(); // update picmain scaling PicMain.NavButtonSize = this.ScaleToDpi(new SizeF(50f, 50f)); @@ -1005,7 +1005,7 @@ private void HandleImageProgress_Loading(ImageLoadingEventArgs e) { Local.IsImageError = false; - PicMain.ClearMessage(); + PicMain.ClearMessage(false); if (e.Index >= 0 || !string.IsNullOrEmpty(e.FilePath)) { PicMain.ShowMessage(Config.Language[$"{Name}._Loading"], null, delayMs: 1500); @@ -1072,8 +1072,7 @@ private async Task HandleImageProgress_LoadedAsync(ImageLoadedEventArgs e) else if (!(e.Data?.ImgData.IsImageNull ?? true)) { // delete clipboard image - Local.ClipboardImage?.Dispose(); - Local.ClipboardImage = null; + ClearClipboardImage(); Local.TempImagePath = null; @@ -1086,17 +1085,16 @@ private async Task HandleImageProgress_LoadedAsync(ImageLoadedEventArgs e) enableFadingTrainsition = !_isShowingImagePreview && !isImageBigForFading; } - var resetZoom = e.IsViewingSeparateFrame ? false : e.ResetZoom; // set the main image PicMain.SetImage(e.Data.ImgData, autoAnimate: !e.IsViewingSeparateFrame, frameIndex: e.FrameIndex, - resetZoom: resetZoom, + resetZoom: e.ResetZoom, enableFading: enableFadingTrainsition); // update window fit - if (resetZoom && Config.EnableWindowFit) + if (e.ResetZoom && Config.EnableWindowFit) { FitWindowToImage(); } @@ -1157,43 +1155,7 @@ private void HandleImage_LastReached() private void ImageTransform_Changed(object? sender, EventArgs e) { - const string TOOLBAR_BUTTON_SAVE_TRANSFORMATION = "Btn_SaveImageTransformation"; - using var btnItem = Toolbar.GetItem(TOOLBAR_BUTTON_SAVE_TRANSFORMATION); - - // has changes, show Save button - if (Local.ImageTransform.HasChanges && btnItem == null) - { - var menuAction = nameof(MnuSave); - var menuText = MnuSave.Text; - - // use Save as button - if (Local.Metadata?.SupportsWriting == false) - { - menuAction = nameof(MnuSaveAs); - menuText = MnuSaveAs.Text; - } - - Toolbar.AddItem(new() - { - Id = TOOLBAR_BUTTON_SAVE_TRANSFORMATION, - Image = nameof(Config.Theme.ToolbarIcons.Save), - OnClick = new(menuAction), - Alignment = ToolStripItemAlignment.Right, - Text = menuText ?? string.Empty, - DisplayStyle = ToolStripItemDisplayStyle.ImageAndText, - }, 1); - - Toolbar.UpdateAlignment(); - LoadImageInfo(ImageInfoUpdateTypes.Path | ImageInfoUpdateTypes.Name); - } - // no change, hide button - else if (!Local.ImageTransform.HasChanges && btnItem != null) - { - Toolbar.Items.RemoveByKey(TOOLBAR_BUTTON_SAVE_TRANSFORMATION); - - Toolbar.UpdateAlignment(); - LoadImageInfo(ImageInfoUpdateTypes.Path | ImageInfoUpdateTypes.Name); - } + LoadImageInfo(ImageInfoUpdateTypes.Path | ImageInfoUpdateTypes.Name); } @@ -1451,7 +1413,7 @@ public void LoadImageInfo(ImageInfoUpdateTypes? types = null, string? filename = } // update frame info on PageNav toolbar - UpdatePageNavToolbarButtonState(); + UpdateFrameNavToolbarButtonState(); } // Dimension @@ -2309,9 +2271,9 @@ private void MnuCropTool_Click(object sender, EventArgs e) IG_ToggleCropTool(); } - private void MnuPageNav_Click(object sender, EventArgs e) + private void MnuFrameNav_Click(object sender, EventArgs e) { - IG_TogglePageNavTool(); + IG_ToggleFrameNavTool(); } private void MnuGetMoreTools_Click(object sender, EventArgs e) diff --git a/Source/igcmd/Functions.cs b/Source/igcmd/Functions.cs index 4ca79db17..67039fbc6 100644 --- a/Source/igcmd/Functions.cs +++ b/Source/igcmd/Functions.cs @@ -163,10 +163,7 @@ public static string OpenFolderPicker(string title = "") ShowNewFolderButton = true, UseDescriptionForTitle = true, AutoUpgradeEnabled = true, - -#if NET7_0_OR_GREATER ShowPinnedPlaces = true, -#endif }; var result = fb.ShowDialog(); diff --git a/Source/igcmd/Tools/FrmSlideshow.cs b/Source/igcmd/Tools/FrmSlideshow.cs index 43faf1689..c10f9e2a0 100644 --- a/Source/igcmd/Tools/FrmSlideshow.cs +++ b/Source/igcmd/Tools/FrmSlideshow.cs @@ -178,7 +178,7 @@ protected override void OnLoad(EventArgs e) IG_ToggleFrameless(Config.EnableFrameless, false); // toggle Window fit - IG_ToggleWindowFit(Config.EnableWindowFit, false); + IG_ToggleWindowFit(Config.EnableWindowFit); // to hide the animation effect of window border @@ -190,7 +190,7 @@ protected override void OnLoad(EventArgs e) WindowSettings.SetPlacementToWindow(this, WindowSettings.GetFrmMainPlacementFromConfig(SystemInformation.CaptionHeight, SystemInformation.CaptionHeight)); - IG_ToggleFullScreen(true, false); + IG_ToggleFullScreen(true); } // windowed slideshow else @@ -203,7 +203,7 @@ protected override void OnLoad(EventArgs e) IG_ToggleFrameless(Config.EnableFrameless, false); // toggle Window fit - IG_ToggleWindowFit(Config.EnableWindowFit, false); + IG_ToggleWindowFit(Config.EnableWindowFit); } @@ -222,6 +222,8 @@ protected override void OnLoad(EventArgs e) // start slideshow SetSlideshowState(true); + // focus on PicMain + PicMain.Focus(); } @@ -936,7 +938,7 @@ private void OnImageLoaded(IgPhoto photo, bool useWebview2) { var isImageBigForFading = photo.Metadata.RenderedWidth > 8000 || photo.Metadata.RenderedHeight > 8000; - var enableFading = !isImageBigForFading; + var enableFading = !isImageBigForFading && Config.EnableImageTransition; // set the main image PicMain.SetImage(photo.ImgData, @@ -1127,8 +1129,7 @@ private static float RandomizeSlideshowInterval() { var intervalTo = Config.UseRandomIntervalForSlideshow ? Config.SlideshowIntervalTo : Config.SlideshowInterval; - var ran = new Random(); - var interval = (float)(ran.NextDouble() * (intervalTo - Config.SlideshowInterval) + Config.SlideshowInterval); + var interval = (Random.Shared.NextSingle() * (intervalTo - Config.SlideshowInterval) + Config.SlideshowInterval); return interval; } @@ -1640,7 +1641,7 @@ private void MnuWindowFit_Click(object sender, EventArgs e) /// /// Toggles Window fit. /// - public bool IG_ToggleWindowFit(bool? enable = null, bool showInAppMessage = true) + public bool IG_ToggleWindowFit(bool? enable = null) { enable ??= !Config.EnableWindowFit; Config.EnableWindowFit = enable.Value; @@ -1650,7 +1651,7 @@ public bool IG_ToggleWindowFit(bool? enable = null, bool showInAppMessage = true // exit full screen if (Config.EnableFullScreen) { - IG_ToggleFullScreen(false, false); + IG_ToggleFullScreen(false); } } @@ -1660,18 +1661,6 @@ public bool IG_ToggleWindowFit(bool? enable = null, bool showInAppMessage = true // update menu item state MnuWindowFit.Checked = Config.EnableWindowFit; - // disable maximize button - MaximizeBox = !Config.EnableWindowFit; - - if (showInAppMessage) - { - var langPath = $"FrmMain.{nameof(MnuWindowFit)}"; - var message = Config.EnableWindowFit - ? Config.Language[$"{langPath}._Enable"] - : Config.Language[$"{langPath}._Disable"]; - - PicMain.ShowMessage("", message, Config.InAppMessageDuration); - } return Config.EnableWindowFit; } @@ -1784,7 +1773,7 @@ private bool IG_ToggleFrameless(bool? enable = null, bool showInAppMessage = tru // exit full screen if (Config.EnableFullScreen) { - IG_ToggleFullScreen(false, false); + IG_ToggleFullScreen(false); } } @@ -1804,13 +1793,6 @@ private bool IG_ToggleFrameless(bool? enable = null, bool showInAppMessage = tru PicMain.ShowMessage( string.Format(Config.Language[$"{langPath}._EnableDescription"], MnuFrameless.ShortcutKeyDisplayString), - Config.Language[$"{langPath}._Enable"], - Config.InAppMessageDuration); - } - else - { - PicMain.ShowMessage("", - Config.Language[$"{langPath}._Disable"], Config.InAppMessageDuration); } } @@ -1847,7 +1829,7 @@ private void MnuFullScreen_Click(object sender, EventArgs e) /// /// Toggles full screen mode. /// - public bool IG_ToggleFullScreen(bool? enable = null, bool showInAppMessage = true) + public bool IG_ToggleFullScreen(bool? enable = null) { enable ??= !Config.EnableFullscreenSlideshow; Config.EnableFullscreenSlideshow = enable.Value; @@ -1857,13 +1839,13 @@ public bool IG_ToggleFullScreen(bool? enable = null, bool showInAppMessage = tru // exit full screen if (Config.EnableWindowFit) { - IG_ToggleWindowFit(false, false); + IG_ToggleWindowFit(false); } // exit frameless if (Config.EnableFrameless) { - IG_ToggleFrameless(false, false); + IG_ToggleFrameless(false); } } @@ -1875,25 +1857,6 @@ public bool IG_ToggleFullScreen(bool? enable = null, bool showInAppMessage = tru // update menu item state MnuFullScreen.Checked = Config.EnableFullscreenSlideshow; - if (showInAppMessage) - { - var langPath = $"FrmMain.{nameof(MnuFullScreen)}"; - - if (Config.EnableFullscreenSlideshow) - { - PicMain.ShowMessage( - string.Format(Config.Language[$"{langPath}._EnableDescription"], MnuFullScreen.ShortcutKeyDisplayString), - Config.Language[$"{langPath}._Enable"], - Config.InAppMessageDuration); - } - else - { - PicMain.ShowMessage("", - Config.Language[$"{langPath}._Disable"], - Config.InAppMessageDuration); - } - } - return Config.EnableFullscreenSlideshow; } diff --git a/v8/Components/ImageGlass.Base/ImageGlass.Base.csproj b/v8/Components/ImageGlass.Base/ImageGlass.Base.csproj index 684f23372..caf09a889 100644 --- a/v8/Components/ImageGlass.Base/ImageGlass.Base.csproj +++ b/v8/Components/ImageGlass.Base/ImageGlass.Base.csproj @@ -106,8 +106,8 @@ ..\..\packages\CliWrap.3.6.4\lib\net462\CliWrap.dll - - ..\..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll + + ..\..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll @@ -132,11 +132,11 @@ True True - - ..\..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll + + ..\..\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll - - ..\..\packages\System.Text.Json.7.0.3\lib\net462\System.Text.Json.dll + + ..\..\packages\System.Text.Json.8.0.0\lib\net462\System.Text.Json.dll ..\..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll @@ -171,23 +171,23 @@ - - - - - - + + + + + + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/v8/Components/ImageGlass.Base/Update/UpdateService.cs b/v8/Components/ImageGlass.Base/Update/UpdateService.cs index 2c5f4df78..0a1c29a4a 100644 --- a/v8/Components/ImageGlass.Base/Update/UpdateService.cs +++ b/v8/Components/ImageGlass.Base/Update/UpdateService.cs @@ -24,6 +24,7 @@ using System.Threading.Tasks; using CliWrap; using CliWrap.Buffered; +using Microsoft.Win32; namespace ImageGlass.Base.Update { public class UpdateService { @@ -95,7 +96,8 @@ public class UpdateService { if (newVersion.Major < 9) return list; // Windows 64-bit - list.Add("64-bit Windows", false); // Environment.Is64BitOperatingSystem); + list.Add("64-bit Windows", Environment.Is64BitOperatingSystem); + // .NET Desktop Runtime versions try { @@ -103,13 +105,7 @@ public class UpdateService { var cmdOutput = await cli.WithArguments("--list-runtimes") .ExecuteBufferedAsync(Encoding.UTF8); - if (cmdOutput.StandardOutput.Contains("Microsoft.WindowsDesktop.App 6")) { - list.Add(".NET Desktop Runtime 6.0", true); - } - else if (cmdOutput.StandardOutput.Contains("Microsoft.WindowsDesktop.App 7")) { - list.Add(".NET Desktop Runtime 7.0", true); - } - else if (cmdOutput.StandardOutput.Contains("Microsoft.WindowsDesktop.App 8")) { + if (cmdOutput.StandardOutput.Contains("Microsoft.WindowsDesktop.App 8")) { list.Add(".NET Desktop Runtime 8.0", true); } else { @@ -120,6 +116,28 @@ public class UpdateService { list.Add(".NET Desktop Runtime", false); } + + // WebView2 runtime + try { + using var lmKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}", false); + var installedVersion = lmKey.GetValue("pv", string.Empty).ToString(); + + if (string.IsNullOrWhiteSpace(installedVersion)) { + using var cuKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}", false); + installedVersion = cuKey.GetValue("pv", string.Empty).ToString(); + } + + if (string.IsNullOrWhiteSpace(installedVersion)) { + throw new Exception("WebView2 Runtime not found"); + } + else { + list.Add("WebView2 Runtime", true); + } + } + catch { + list.Add("WebView2 Runtime", false); + } + return list; } diff --git a/v8/Components/ImageGlass.Base/app.config b/v8/Components/ImageGlass.Base/app.config index a5c54a8e7..b70538773 100644 --- a/v8/Components/ImageGlass.Base/app.config +++ b/v8/Components/ImageGlass.Base/app.config @@ -14,6 +14,10 @@ + + + + \ No newline at end of file diff --git a/v8/Components/ImageGlass.Base/packages.config b/v8/Components/ImageGlass.Base/packages.config index 64d9a6c17..3e984f366 100644 --- a/v8/Components/ImageGlass.Base/packages.config +++ b/v8/Components/ImageGlass.Base/packages.config @@ -1,15 +1,15 @@  - - + + - - + + \ No newline at end of file diff --git a/v8/Components/ImageGlass.Heart/ImageGlass.Heart.csproj b/v8/Components/ImageGlass.Heart/ImageGlass.Heart.csproj index be739b076..1f8096f06 100644 --- a/v8/Components/ImageGlass.Heart/ImageGlass.Heart.csproj +++ b/v8/Components/ImageGlass.Heart/ImageGlass.Heart.csproj @@ -115,14 +115,14 @@ MinimumRecommendedRules.ruleset - - ..\..\packages\Magick.NET-Q16-HDRI-OpenMP-x64.13.3.0\lib\netstandard20\Magick.NET-Q16-HDRI-OpenMP-x64.dll + + ..\..\packages\Magick.NET-Q16-HDRI-OpenMP-x64.13.4.0\lib\netstandard20\Magick.NET-Q16-HDRI-OpenMP-x64.dll - - ..\..\packages\Magick.NET.Core.13.3.0\lib\netstandard20\Magick.NET.Core.dll + + ..\..\packages\Magick.NET.Core.13.4.0\lib\netstandard20\Magick.NET.Core.dll - - ..\..\packages\Magick.NET.SystemDrawing.7.1.0\lib\net462\Magick.NET.SystemDrawing.dll + + ..\..\packages\Magick.NET.SystemDrawing.7.2.0\lib\net462\Magick.NET.SystemDrawing.dll @@ -163,25 +163,25 @@ - - - - - - + + + + + + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + - + \ No newline at end of file diff --git a/v8/Components/ImageGlass.Heart/app.config b/v8/Components/ImageGlass.Heart/app.config index 7179c1981..76f318ceb 100644 --- a/v8/Components/ImageGlass.Heart/app.config +++ b/v8/Components/ImageGlass.Heart/app.config @@ -14,6 +14,10 @@ + + + + \ No newline at end of file diff --git a/v8/Components/ImageGlass.Heart/packages.config b/v8/Components/ImageGlass.Heart/packages.config index b7d9ba4b2..31148d081 100644 --- a/v8/Components/ImageGlass.Heart/packages.config +++ b/v8/Components/ImageGlass.Heart/packages.config @@ -1,8 +1,8 @@  - - - - + + + + \ No newline at end of file diff --git a/v8/Components/ImageGlass.ImageBox/ImageGlass.ImageBox.csproj b/v8/Components/ImageGlass.ImageBox/ImageGlass.ImageBox.csproj index de3ec97f3..62d25b10b 100644 --- a/v8/Components/ImageGlass.ImageBox/ImageGlass.ImageBox.csproj +++ b/v8/Components/ImageGlass.ImageBox/ImageGlass.ImageBox.csproj @@ -160,24 +160,24 @@ - - - - - - + + + + + + - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - +