From cc2560cb3a4315839fd83bc1ccea144c43aeec01 Mon Sep 17 00:00:00 2001 From: Nguyen Dinh Thuan Date: Sat, 21 Sep 2024 06:49:25 +0700 Subject: [PATCH] =?UTF-8?q?X=C3=B3a=20c=C3=A1c=20file=20ko=20c=C3=B2n=20d?= =?UTF-8?q?=C3=B9ng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DE70Commands.cs | 44 -- SafeBagDE70.csproj | 6 - old/KeyModel.cs | 69 --- old/MainUserWindow.xaml | 121 ----- old/MainUserWindow.xaml.cs | 804 ---------------------------------- old/PinCodeWindow.xaml | 21 - old/PinCodeWindow.xaml.cs | 65 --- old/QRCodeWindow.xaml | 20 - old/QRCodeWindow.xaml.cs | 65 --- old/QRCodeZebraWindow.xaml | 20 - old/QRCodeZebraWindow.xaml.cs | 100 ----- old/WelcomeWindow.xaml | 65 --- old/WelcomeWindow.xaml.cs | 210 --------- 13 files changed, 1610 deletions(-) delete mode 100644 DE70Commands.cs delete mode 100644 old/KeyModel.cs delete mode 100644 old/MainUserWindow.xaml delete mode 100644 old/MainUserWindow.xaml.cs delete mode 100644 old/PinCodeWindow.xaml delete mode 100644 old/PinCodeWindow.xaml.cs delete mode 100644 old/QRCodeWindow.xaml delete mode 100644 old/QRCodeWindow.xaml.cs delete mode 100644 old/QRCodeZebraWindow.xaml delete mode 100644 old/QRCodeZebraWindow.xaml.cs delete mode 100644 old/WelcomeWindow.xaml delete mode 100644 old/WelcomeWindow.xaml.cs diff --git a/DE70Commands.cs b/DE70Commands.cs deleted file mode 100644 index 94c6105..0000000 --- a/DE70Commands.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SafeBagDE70 -{ - static public class DE70Commands - { - //public static string ReadyToCountResponse = "40 07 41 00 01 00 00 00 00 00 00 10 00"; - public static string CountingResponse = "40 09 41 01 01 00 00 00 00 00 00 10 00"; - public static string ExceptionResponse = "40 07 41 10 10 01 00 00 00 00 00 00 10 10 00 00"; - public static string DESenseResponse1 = "40 04 41 00 00 00 00 00 00 00 00 10 00 00 00 00 01 70 00"; - public static string DESenseResponse2 = "40 04 41 00 00 00 00 00 00 00 00 10 00 00 01 00 02 70 00 "; - public static string DESenseResponse3 = "40 04 41 00 00 00 00 00 00 00 00 10 00 00 02 00 03 70 00 "; - public static string DESenseResponse4 = "40 04 41 00 00 00 00 00 00 00 00 10 00 00 03 00 04 70 00 "; - public static string DESenseResponse5 = "40 04 41 00 00 00 00 00 00 00 00 10 00 00 04 00 05 70 00 "; - public static string DESenseResponse0 = "40 04 41 00 00 00 00 00 00 00 00 10 00 00 05 00 00 70 00 "; - - public static string[] DESenseSatisfyResponse = { "40 04 41 00 00 00 00 00 00 00 00 10 00 00 05 00 05 70 00", - "40 04 41 00 00 00 00 00 00 00 00 10 00 00 04 00 04 70 00", - "40 04 41 00 00 00 00 00 00 00 00 10 00 00 03 00 03 70 00", - "40 04 41 00 00 00 00 00 00 00 00 10 00 00 02 00 02 70 00", - "40 04 41 00 00 00 00 00 00 00 00 10 00 00 01 00 01 70 00", - "40 04 41 00 00 00 00 00 00 00 00 10 00 00 00 00 00 70 00" }; - - //public static byte[] CountStartCmd= new byte[] { 0x10, 0x02, 0x30, 0x30, 0x31, 0x73, 0x10, 0x03, 0x41 }; - //public static byte[] DESenseCmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x31, 0x60, 0x10, 0x03, 0x52 }; - //public static byte[] UnlockCmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x31, 0x71, 0x10, 0x03, 0x43 }; - //public static byte[] CancelCmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x31, 0x76, 0x10, 0x03, 0x44 }; - //public static byte[] StoreStartCmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x31, 0x75, 0x10, 0x03, 0x47 }; - public static byte[] LockCmd = new byte[] { 0x10, 0x02, 0x30, 0x31, 0x33, 0x70, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x09, 0x00, 0x01, 0x01, 0x00, 0x10, 0x03, 0x48 }; - - //Event data fix - - public static byte[] EventDataFixed_01_Cmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x33, 0x65, 0x00, 0x01, 0x10, 0x03, 0x54 }; - public static byte[] EventDataFixed_02_Cmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x33, 0x65, 0x00, 0x02, 0x10, 0x03, 0x57 }; - public static byte[] EventDataFixed_03_Cmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x33, 0x65, 0x00, 0x03, 0x10, 0x03, 0x56 }; - public static byte[] EventDataFixed_04_Cmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x33, 0x65, 0x00, 0x04, 0x10, 0x03, 0x51 }; - public static byte[] EventDataFixed_05_Cmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x33, 0x65, 0x00, 0x05, 0x10, 0x03, 0x50 }; - public static byte[] EventDataFixed_00_Cmd = new byte[] { 0x10, 0x02, 0x30, 0x30, 0x33, 0x65, 0x00, 0x00, 0x10, 0x03, 0x55 }; - } -} diff --git a/SafeBagDE70.csproj b/SafeBagDE70.csproj index b0ea94c..aec725a 100644 --- a/SafeBagDE70.csproj +++ b/SafeBagDE70.csproj @@ -108,12 +108,6 @@ Code - - Code - - - Code - Code diff --git a/old/KeyModel.cs b/old/KeyModel.cs deleted file mode 100644 index 5394a93..0000000 --- a/old/KeyModel.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Input; - -namespace SafeBagDE70.old -{ - public class KeyModel - { - public enum MapType : uint - { - MAPVK_VK_TO_VSC = 0x0, - MAPVK_VSC_TO_VK = 0x1, - MAPVK_VK_TO_CHAR = 0x2, - MAPVK_VSC_TO_VK_EX = 0x3, - } - - [DllImport("user32.dll")] - public static extern int ToUnicode( - uint wVirtKey, - uint wScanCode, - byte[] lpKeyState, - [Out, MarshalAs(UnmanagedType.LPWStr, SizeParamIndex = 4)] - StringBuilder pwszBuff, - int cchBuff, - uint wFlags); - - [DllImport("user32.dll")] - public static extern bool GetKeyboardState(byte[] lpKeyState); - - [DllImport("user32.dll")] - public static extern uint MapVirtualKey(uint uCode, MapType uMapType); - - public static char GetCharFromKey(Key key) - { - char ch = ' '; - - int virtualKey = KeyInterop.VirtualKeyFromKey(key); - byte[] keyboardState = new byte[256]; - GetKeyboardState(keyboardState); - - uint scanCode = MapVirtualKey((uint)virtualKey, MapType.MAPVK_VK_TO_VSC); - StringBuilder stringBuilder = new StringBuilder(2); - - int result = ToUnicode((uint)virtualKey, scanCode, keyboardState, stringBuilder, stringBuilder.Capacity, 0); - switch (result) - { - case -1: - break; - case 0: - break; - case 1: - { - ch = stringBuilder[0]; - break; - } - default: - { - ch = stringBuilder[0]; - break; - } - } - return ch; - } - } -} diff --git a/old/MainUserWindow.xaml b/old/MainUserWindow.xaml deleted file mode 100644 index 7470393..0000000 --- a/old/MainUserWindow.xaml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -