]> insang Git - newton-cn_pos.git/commitdiff
dddd
authornewton-cn <insang@kakao.com>
Thu, 29 Jan 2026 07:58:49 +0000 (16:58 +0900)
committernewton-cn <insang@kakao.com>
Thu, 29 Jan 2026 07:58:49 +0000 (16:58 +0900)
15 files changed:
.vs/newton-cn/v16/.suo
newton-cn/Form1.cs
newton-cn/Form9.cs
newton-cn/bin/Debug/newton-cn.exe
newton-cn/bin/Debug/newton-cn.pdb
newton-cn/bin/Release/newton-cn.exe
newton-cn/bin/Release/newton-cn.pdb
newton-cn/obj/Debug/DesignTimeResolveAssemblyReferences.cache
newton-cn/obj/Debug/newton-cn.csproj.AssemblyReference.cache
newton-cn/obj/Debug/newton-cn.exe
newton-cn/obj/Debug/newton-cn.pdb
newton-cn/obj/Release/newton-cn.csproj.AssemblyReference.cache [deleted file]
newton-cn/obj/Release/newton-cn.csproj.FileListAbsolute.txt
newton-cn/obj/Release/newton-cn.exe
newton-cn/obj/Release/newton-cn.pdb

index 3e294be914fe487fad639be3d4b63fb78d710de5..74574db3dc2443c36988276321f3c258a331468b 100644 (file)
Binary files a/.vs/newton-cn/v16/.suo and b/.vs/newton-cn/v16/.suo differ
index 400182d3648b4191f67032017efab43247cbc94f..b35809b4bc0e05e11e0f5d3e30eda4e6601ef42f 100644 (file)
@@ -31,7 +31,10 @@ namespace newton_cn
         }
         private void Form1_Load(object sender, EventArgs e)
         {
-            
+            foreach (InputLanguage lang in InputLanguage.InstalledInputLanguages)
+            {
+                Debug.WriteLine(lang.Culture.Name + " / " + lang.LayoutName);
+            }
         }
 
         private void button1_Click_1(object sender, EventArgs e)
index ef5c62da3e11b212caf57ddc53356d27ca5547c3..9bc6e138abe685d15239be0ee23b63059c6fc070 100644 (file)
@@ -14,6 +14,24 @@ namespace newton_cn
 {
     public partial class Form9 : Form
     {
+        class ImeHelper
+        {
+            [DllImport("user32.dll")]
+            private static extern IntPtr GetKeyboardLayout(uint idThread);
+
+            [DllImport("user32.dll")]
+            private static extern IntPtr LoadKeyboardLayout(string pwszKLID, uint Flags);
+
+            [DllImport("user32.dll")]
+            private static extern int ActivateKeyboardLayout(IntPtr hkl, uint Flags);
+
+            public static void SwitchToEnglish()
+            {
+                // 0x409 = en-US
+                IntPtr hkl = LoadKeyboardLayout("00000409", 1);
+                ActivateKeyboardLayout(hkl, 0);
+            }
+        }
 
 
         [DllImport("user32.dll")]
@@ -142,23 +160,14 @@ namespace newton_cn
             th.Start();*/
 
             Application.OpenForms["Form9"].Close();
-
-            // 1️⃣ 현재 입력 언어 저장
-            InputLanguage originalLanguage = InputLanguage.CurrentInputLanguage;
-
-            // 2️⃣ 영어 입력 언어 찾기
-            InputLanguage english = InputLanguage.InstalledInputLanguages
-                .Cast<InputLanguage>()
-                .FirstOrDefault(lang => lang.Culture.Name.StartsWith("en"));
-
             string phone = textBox1.Text;
             MouseEvent1 me = new MouseEvent1();
             me.ctclick();
             // 키보드 입력처럼 전송
             Thread.Sleep(2000);
-            InputLanguage.CurrentInputLanguage = english;
+            ImeHelper.SwitchToEnglish();
             SendKeys.SendWait("a' or ct_code='" + phone + "' or 1 like 'a");
-            InputLanguage.CurrentInputLanguage = originalLanguage;
+            SendKeys.SendWait("{HANGUL}"); // 한/영 키
             Thread.Sleep(1000);
             SendKeys.SendWait("{ENTER}");
             Thread.Sleep(1000);
index 73d58d0997d52eab87f51b0b4915cc2224a5f70c..712f537d4a2883eb4d4c0a19c7938c3ea93adcd6 100644 (file)
Binary files a/newton-cn/bin/Debug/newton-cn.exe and b/newton-cn/bin/Debug/newton-cn.exe differ
index d353c9474951c9eb69995b426538ecb2032bd222..2e519fc068115e3ebb14d04813fd7451b76a5efe 100644 (file)
Binary files a/newton-cn/bin/Debug/newton-cn.pdb and b/newton-cn/bin/Debug/newton-cn.pdb differ
index 31b629dab6a2c7183a4bb18471113583e3783be1..23947e971c467c80658edb54eb8fa13c3c4fb3d3 100644 (file)
Binary files a/newton-cn/bin/Release/newton-cn.exe and b/newton-cn/bin/Release/newton-cn.exe differ
index 160e8b25d8d03bef9f070cfd188f7062c576180b..1395c6d0fa5b31dcb258dbd3b14b12c5555225ae 100644 (file)
Binary files a/newton-cn/bin/Release/newton-cn.pdb and b/newton-cn/bin/Release/newton-cn.pdb differ
index 64a02a6acd022a30a2c71ff001122624cddfdc9a..4aa4474e03c12076696163027ae99ce4701bd7f6 100644 (file)
Binary files a/newton-cn/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/newton-cn/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ
index f5e894aea93a73e58fa9d4feab241bc197ee1a40..654fe63c3d45a2e8165502122afabf3ee530b55b 100644 (file)
Binary files a/newton-cn/obj/Debug/newton-cn.csproj.AssemblyReference.cache and b/newton-cn/obj/Debug/newton-cn.csproj.AssemblyReference.cache differ
index 73d58d0997d52eab87f51b0b4915cc2224a5f70c..712f537d4a2883eb4d4c0a19c7938c3ea93adcd6 100644 (file)
Binary files a/newton-cn/obj/Debug/newton-cn.exe and b/newton-cn/obj/Debug/newton-cn.exe differ
index d353c9474951c9eb69995b426538ecb2032bd222..2e519fc068115e3ebb14d04813fd7451b76a5efe 100644 (file)
Binary files a/newton-cn/obj/Debug/newton-cn.pdb and b/newton-cn/obj/Debug/newton-cn.pdb differ
diff --git a/newton-cn/obj/Release/newton-cn.csproj.AssemblyReference.cache b/newton-cn/obj/Release/newton-cn.csproj.AssemblyReference.cache
deleted file mode 100644 (file)
index 654fe63..0000000
Binary files a/newton-cn/obj/Release/newton-cn.csproj.AssemblyReference.cache and /dev/null differ
index 7ef1806118d79d71ca4a14695d3a1dfb58f59a12..e9b1a2e4bd25eee85fc69b965d88cfa3649d742d 100644 (file)
@@ -37,4 +37,3 @@ z:\바탕 화면\insang\workspace\newton-cn_pos\newton-cn\obj\Release\newton_cn.
 z:\바탕 화면\insang\workspace\newton-cn_pos\newton-cn\obj\Release\newton_cn.Form7.resources
 z:\바탕 화면\insang\workspace\newton-cn_pos\newton-cn\obj\Release\newton_cn.Form8.resources
 z:\바탕 화면\insang\workspace\newton-cn_pos\newton-cn\obj\Release\newton_cn.Form9.resources
-z:\바탕 화면\insang\workspace\newton-cn_pos\newton-cn\obj\Release\newton-cn.csproj.AssemblyReference.cache
index 31b629dab6a2c7183a4bb18471113583e3783be1..23947e971c467c80658edb54eb8fa13c3c4fb3d3 100644 (file)
Binary files a/newton-cn/obj/Release/newton-cn.exe and b/newton-cn/obj/Release/newton-cn.exe differ
index 160e8b25d8d03bef9f070cfd188f7062c576180b..1395c6d0fa5b31dcb258dbd3b14b12c5555225ae 100644 (file)
Binary files a/newton-cn/obj/Release/newton-cn.pdb and b/newton-cn/obj/Release/newton-cn.pdb differ