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
2121 {
2222 #region Blur Handling
2323
24- public static bool IsWindows11 ( )
25- {
26- return Environment . OSVersion . Version . Major >= 10 && Environment . OSVersion . Version . Build >= 22000 ;
27- }
2824 public static bool IsBackdropSupported ( )
2925 {
3026 // Mica and Acrylic only supported Windows 11 22000+
@@ -525,6 +521,12 @@ public static bool IsNotificationSupported()
525521
526522 #region Korean IME
527523
524+ public static bool IsWindows11 ( )
525+ {
526+ return RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) &&
527+ Environment . OSVersion . Version . Build >= 22000 ;
528+ }
529+
528530 public static bool IsKoreanIMEExist ( )
529531 {
530532 return GetLegacyKoreanIMERegistryValue ( ) != null ;
Original file line number Diff line number Diff line change @@ -210,9 +210,9 @@ public bool KoreanIMERegistryKeyExists
210210 {
211211 get
212212 {
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 ( ) ;
216216
217217 // Return true if Windows 11 with Korean IME installed, or if the registry key exists
218218 return ( isWindows11 && koreanLanguageInstalled ) || registryKeyExists ;
@@ -223,12 +223,12 @@ public bool KoreanIMERegistryValueIsZero
223223 {
224224 get
225225 {
226- object value = Win32Helper . GetLegacyKoreanIMERegistryValue ( ) ;
226+ var value = Win32Helper . GetLegacyKoreanIMERegistryValue ( ) ;
227227 if ( value is int intValue )
228228 {
229229 return intValue == 0 ;
230230 }
231- else if ( value != null && int . TryParse ( value . ToString ( ) , out int parsedValue ) )
231+ else if ( value != null && int . TryParse ( value . ToString ( ) , out var parsedValue ) )
232232 {
233233 return parsedValue == 0 ;
234234 }
You can’t perform that action at this time.
0 commit comments