File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Flow.Launcher.Infrastructure
Flow.Launcher/SettingPages/ViewModels Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,6 @@ public static class Win32Helper
21
21
{
22
22
#region Blur Handling
23
23
24
- public static bool IsWindows11 ( )
25
- {
26
- return Environment . OSVersion . Version . Major >= 10 && Environment . OSVersion . Version . Build >= 22000 ;
27
- }
28
24
public static bool IsBackdropSupported ( )
29
25
{
30
26
// Mica and Acrylic only supported Windows 11 22000+
@@ -525,6 +521,12 @@ public static bool IsNotificationSupported()
525
521
526
522
#region Korean IME
527
523
524
+ public static bool IsWindows11 ( )
525
+ {
526
+ return RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) &&
527
+ Environment . OSVersion . Version . Build >= 22000 ;
528
+ }
529
+
528
530
public static bool IsKoreanIMEExist ( )
529
531
{
530
532
return GetLegacyKoreanIMERegistryValue ( ) != null ;
Original file line number Diff line number Diff line change @@ -210,9 +210,9 @@ public bool KoreanIMERegistryKeyExists
210
210
{
211
211
get
212
212
{
213
- bool registryKeyExists = Win32Helper . IsKoreanIMEExist ( ) ;
214
- bool koreanLanguageInstalled = InputLanguage . InstalledInputLanguages . Cast < InputLanguage > ( ) . Any ( lang => lang . Culture . Name . StartsWith ( "ko" ) ) ;
215
- bool isWindows11 = Win32Helper . IsWindows11 ( ) ;
213
+ var registryKeyExists = Win32Helper . IsKoreanIMEExist ( ) ;
214
+ var koreanLanguageInstalled = InputLanguage . InstalledInputLanguages . Cast < InputLanguage > ( ) . Any ( lang => lang . Culture . Name . StartsWith ( "ko" ) ) ;
215
+ var isWindows11 = Win32Helper . IsWindows11 ( ) ;
216
216
217
217
// Return true if Windows 11 with Korean IME installed, or if the registry key exists
218
218
return ( isWindows11 && koreanLanguageInstalled ) || registryKeyExists ;
@@ -223,12 +223,12 @@ public bool KoreanIMERegistryValueIsZero
223
223
{
224
224
get
225
225
{
226
- object value = Win32Helper . GetLegacyKoreanIMERegistryValue ( ) ;
226
+ var value = Win32Helper . GetLegacyKoreanIMERegistryValue ( ) ;
227
227
if ( value is int intValue )
228
228
{
229
229
return intValue == 0 ;
230
230
}
231
- else if ( value != null && int . TryParse ( value . ToString ( ) , out int parsedValue ) )
231
+ else if ( value != null && int . TryParse ( value . ToString ( ) , out var parsedValue ) )
232
232
{
233
233
return parsedValue == 0 ;
234
234
}
You can’t perform that action at this time.
0 commit comments