diff --git a/BPASmartClient.Argox/ArgoxHelper.cs b/BPASmartClient.Argox/ArgoxHelper.cs new file mode 100644 index 00000000..26d462aa --- /dev/null +++ b/BPASmartClient.Argox/ArgoxHelper.cs @@ -0,0 +1,106 @@ +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Text; + +namespace BPASmartClient.Argox +{ + public class ArgoxHelper + { + + private volatile static ArgoxHelper _Instance; + public static ArgoxHelper GetInstance => _Instance ?? (_Instance = new ArgoxHelper()); + private ArgoxHelper() { } + + public void Print() + { + int nLen, ret, sw; + byte[] pbuf = new byte[128]; + string strmsg; + IntPtr ver; + System.Text.Encoding encAscII = System.Text.Encoding.ASCII; + System.Text.Encoding encUnicode = System.Text.Encoding.Unicode; + + // dll 版本. + ver = DLLHelper.B_Get_DLL_Version(0); + + // 搜索端口号. + nLen = DLLHelper.B_GetUSBBufferLen() + 1; + strmsg = "DLL "; + strmsg += Marshal.PtrToStringAnsi(ver); + strmsg += "\r\n"; + if (nLen > 1) + { + byte[] buf1, buf2; + int len1 = 128, len2 = 128; + buf1 = new byte[len1]; + buf2 = new byte[len2]; + DLLHelper.B_EnumUSB(pbuf); + DLLHelper.B_GetUSBDeviceInfo(1, buf1, out len1, buf2, out len2); + sw = 1; + if (1 == sw) + { + ret = DLLHelper.B_CreatePrn(12, encAscII.GetString(buf2, 0, len2));// 打开 USB. + } + else + { + ret = DLLHelper.B_CreateUSBPort(1);// must call B_GetUSBBufferLen() function fisrt. + } + if (0 != ret) + { + strmsg += "Open USB fail!"; + } + else + { + strmsg += "Open USB:\r\nDevice name: "; + strmsg += encAscII.GetString(buf1, 0, len1); + strmsg += "\r\nDevice path: "; + strmsg += encAscII.GetString(buf2, 0, len2); + //sw = 2; + if (2 == sw) + { + //Immediate Error Report. + DLLHelper.B_WriteData(1, encAscII.GetBytes("^ee\r\n"), 5);//^ee + ret = DLLHelper.B_ReadData(pbuf, 4, 1000); + } + } + } + else + { + System.IO.Directory.CreateDirectory(DLLHelper.szSavePath); + ret = DLLHelper.B_CreatePrn(0, DLLHelper.szSaveFile);// open file. + strmsg += "Open "; + strmsg += DLLHelper.szSaveFile; + if (0 != ret) + { + strmsg += " file fail!"; + } + else + { + strmsg += " file succeed!"; + } + } + Debug.WriteLine(strmsg); + if (0 != ret) + return; + + // 样品设置. + DLLHelper.B_Set_DebugDialog(0); + DLLHelper.B_Set_Originpoint(0, 0); + DLLHelper.B_Select_Option(2); + DLLHelper.B_Set_Darkness(8); + DLLHelper.B_Del_Pcx("*");// delete all picture. + DLLHelper.B_WriteData(0, encAscII.GetBytes(DLLHelper.sznop2), DLLHelper.sznop2.Length); + DLLHelper.B_WriteData(1, encAscII.GetBytes(DLLHelper.sznop1), DLLHelper.sznop1.Length); + DLLHelper.B_Set_LabelForSmartPrint(254 * 3, 30);//label information: length= 3 * 25.4 mm, gap= 3 mm. + + int TextX = 160; + int BoxX = 150; + DLLHelper.B_Draw_Box(BoxX, 20, 4, 670, 370);//画框 + DLLHelper.B_Prn_Text_TrueType(TextX, 40, 30, "楷体", 1, 400, 0, 0, 0, "AA", $"原料名称:榨菜配方"); + DLLHelper.B_Prn_Text_TrueType_W(TextX, 80, 30, 20, "楷体", 1, 400, 0, 0, 0, "AB", $"日期:{DateTime.Now.ToString("yyy-MM-dd")}"); + DLLHelper.B_Prn_Text_TrueType_Uni(TextX, 120, 30, "楷体", 1, 400, 0, 0, 0, "AC", Encoding.Unicode.GetBytes($"时间:{DateTime.Now.ToString("HH:mm:ss")}"), 1);//UTF-16 + DLLHelper.B_Print_Out(1);//打印数量 + DLLHelper.B_ClosePrn(); + } + } +} \ No newline at end of file diff --git a/BPASmartClient.Argox/BPASmartClient.Argox.csproj b/BPASmartClient.Argox/BPASmartClient.Argox.csproj new file mode 100644 index 00000000..e16ace56 --- /dev/null +++ b/BPASmartClient.Argox/BPASmartClient.Argox.csproj @@ -0,0 +1,23 @@ + + + + net6.0 + enable + enable + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + diff --git a/BPASmartClient.Argox/DLLHelper.cs b/BPASmartClient.Argox/DLLHelper.cs new file mode 100644 index 00000000..040e1b91 --- /dev/null +++ b/BPASmartClient.Argox/DLLHelper.cs @@ -0,0 +1,241 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.Argox +{ + internal class DLLHelper + { + public const uint IMAGE_BITMAP = 0; + public const uint LR_LOADFROMFILE = 16; + + [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] + public static extern IntPtr LoadImage(IntPtr hinst, string lpszName, uint uType, int cxDesired, int cyDesired, uint fuLoad); + + [DllImport("Gdi32.dll", SetLastError = true, CharSet = CharSet.Auto)] + public static extern int DeleteObject(IntPtr ho); + public const string szSavePath = "C:\\Argox"; + public const string szSaveFile = "C:\\Argox\\PPLB_Example.Prn"; + public const string sznop1 = "nop_front\r\n"; + public const string sznop2 = "nop_middle\r\n"; + + [DllImport("Winpplb.dll")] + public static extern int B_Bar2d_Maxi(int x, int y, int cl, int cc, int pc, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Bar2d_PDF417(int x, int y, int w, int v, int s, int c, int px, int py, int r, int l, int t, int o, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Bar2d_PDF417_N(int x, int y, int w, int h, string pParameter, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Bar2d_DataMatrix(int x, int y, int r, int l, int h, int v, string data); + + [DllImport("Winpplb.dll")] + public static extern void B_ClosePrn(); + + [DllImport("Winpplb.dll")] + public static extern int B_CreatePrn(int selection, string filename); + + [DllImport("Winpplb.dll")] + public static extern int B_Del_Form(string formname); + + [DllImport("Winpplb.dll")] + public static extern int B_Del_Pcx(string pcxname); + + [DllImport("Winpplb.dll")] + public static extern int B_Draw_Box(int x, int y, int thickness, int hor_dots, int ver_dots); + + [DllImport("Winpplb.dll")] + public static extern int B_Draw_Line(char mode, int x, int y, int hor_dots, int ver_dots); + + [DllImport("Winpplb.dll")] + public static extern int B_Error_Reporting(char option); + + [DllImport("Winpplb.dll")] + public static extern IntPtr B_Get_DLL_Version(int nShowMessage); + + [DllImport("Winpplb.dll")] + public static extern int B_Get_DLL_VersionA(int nShowMessage); + + [DllImport("Winpplb.dll")] + public static extern int B_Get_Graphic_ColorBMP(int x, int y, string filename); + + [DllImport("Winpplb.dll")] + public static extern int B_Get_Graphic_ColorBMPEx(int x, int y, int nWidth, int nHeight, int rotate, string id_name, string filename); + + [DllImport("Winpplb.dll")] + public static extern int B_Get_Graphic_ColorBMP_HBitmap(int x, int y, int nWidth, int nHeight, int rotate, string id_name, IntPtr hbm); + + [DllImport("Winpplb.dll")] + public static extern int B_Get_Pcx(int x, int y, string filename); + + [DllImport("Winpplb.dll")] + public static extern int B_Initial_Setting(int Type, string Source); + + [DllImport("Winpplb.dll")] + public static extern int B_WriteData(int IsImmediate, byte[] pbuf, int length); + + [DllImport("Winpplb.dll")] + public static extern int B_ReadData(byte[] pbuf, int length, int dwTimeoutms); + + [DllImport("Winpplb.dll")] + public static extern int B_Load_Pcx(int x, int y, string pcxname); + + [DllImport("Winpplb.dll")] + public static extern int B_Open_ChineseFont(string path); + + [DllImport("Winpplb.dll")] + public static extern int B_Print_Form(int labset, int copies, string form_out, string var); + + [DllImport("Winpplb.dll")] + public static extern int B_Print_MCopy(int labset, int copies); + + [DllImport("Winpplb.dll")] + public static extern int B_Print_Out(int labset); + + [DllImport("Winpplb.dll")] + public static extern int B_Prn_Barcode(int x, int y, int ori, string type, int narrow, int width, int height, char human, string data); + + [DllImport("Winpplb.dll")] + public static extern void B_Prn_Configuration(); + + [DllImport("Winpplb.dll")] + public static extern int B_Prn_Text(int x, int y, int ori, int font, int hor_factor, int ver_factor, char mode, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Prn_Text_Chinese(int x, int y, int fonttype, string id_name, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Prn_Text_TrueType(int x, int y, int FSize, string FType, int Fspin, int FWeight, int FItalic, int FUnline, int FStrikeOut, string id_name, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Prn_Text_TrueType_W(int x, int y, int FHeight, int FWidth, string FType, int Fspin, int FWeight, int FItalic, int FUnline, int FStrikeOut, string id_name, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Select_Option(int option); + + [DllImport("Winpplb.dll")] + public static extern int B_Select_Option2(int option, int p); + + [DllImport("Winpplb.dll")] + public static extern int B_Select_Symbol(int num_bit, int symbol, int country); + + [DllImport("Winpplb.dll")] + public static extern int B_Select_Symbol2(int num_bit, string csymbol, int country); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Backfeed(char option); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Backfeed_Offset(int offset); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_CutPeel_Offset(int offset); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_BMPSave(int nSave, string strBMPFName); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Darkness(int darkness); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_DebugDialog(int nEnable); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Direction(char direction); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Form(string formfile); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Labgap(int lablength, int gaplength); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Labwidth(int labwidth); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Originpoint(int hor, int ver); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Prncomport(int baud, char parity, int data, int stop); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Prncomport_PC(int nBaudRate, int nByteSize, int nParity, int nStopBits, int nDsr, int nCts, int nXonXoff); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Speed(int speed); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_ProcessDlg(int nShow); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_ErrorDlg(int nShow); + + [DllImport("Winpplb.dll")] + public static extern int B_GetUSBBufferLen(); + + [DllImport("Winpplb.dll")] + public static extern int B_EnumUSB(byte[] buf); + + [DllImport("Winpplb.dll")] + public static extern int B_CreateUSBPort(int nPort); + + [DllImport("Winpplb.dll")] + public static extern int B_ResetPrinter(); + + [DllImport("Winpplb.dll")] + public static extern int B_GetPrinterResponse(byte[] buf, int nMax); + + [DllImport("Winpplb.dll")] + public static extern int B_TFeedMode(int nMode); + + [DllImport("Winpplb.dll")] + public static extern int B_TFeedTest(); + + [DllImport("Winpplb.dll")] + public static extern int B_CreatePort(int nPortType, int nPort, string filename); + + [DllImport("Winpplb.dll")] + public static extern int B_Execute_Form(string form_out, string var); + + [DllImport("Winpplb.dll")] + public static extern int B_Bar2d_QR(int x, int y, int model, int scl, char error, char dinput, int c, int d, int p, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_GetNetPrinterBufferLen(); + + [DllImport("Winpplb.dll")] + public static extern int B_EnumNetPrinter(byte[] buf); + + [DllImport("Winpplb.dll")] + public static extern int B_CreateNetPort(int nPort); + + [DllImport("Winpplb.dll")] + public static extern int B_Prn_Text_TrueType_Uni(int x, int y, int FSize, string FType, int Fspin, int FWeight, int FItalic, int FUnline, int FStrikeOut, string id_name, byte[] data, int format); + + [DllImport("Winpplb.dll")] + public static extern int B_Prn_Text_TrueType_UniB(int x, int y, int FSize, string FType, int Fspin, int FWeight, int FItalic, int FUnline, int FStrikeOut, string id_name, byte[] data, int format); + + [DllImport("Winpplb.dll")] + public static extern int B_GetUSBDeviceInfo(int nPort, byte[] pDeviceName, out int pDeviceNameLen, byte[] pDevicePath, out int pDevicePathLen); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_EncryptionKey(string encryptionKey); + + [DllImport("Winpplb.dll")] + public static extern int B_Check_EncryptionKey(string decodeKey, string encryptionKey, int dwTimeoutms); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_CommTimeout(int ReadTotalTimeoutConstant, int WriteTotalTimeoutConstant); + + [DllImport("Winpplb.dll")] + public static extern int B_Get_CommTimeout(out int ReadTotalTimeoutConstant, out int WriteTotalTimeoutConstant); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_LabelForSmartPrint(int lablength, int gaplength); + } +} diff --git a/BPASmartClient.Argox/WinPort.dll b/BPASmartClient.Argox/WinPort.dll new file mode 100644 index 00000000..a2a2e247 Binary files /dev/null and b/BPASmartClient.Argox/WinPort.dll differ diff --git a/BPASmartClient.Argox/Winpplb.dll b/BPASmartClient.Argox/Winpplb.dll new file mode 100644 index 00000000..250274df Binary files /dev/null and b/BPASmartClient.Argox/Winpplb.dll differ diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj index 883716d6..5130dc63 100644 --- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj +++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj @@ -38,6 +38,7 @@ + @@ -112,6 +113,7 @@ + @@ -165,6 +167,7 @@ + @@ -247,6 +250,7 @@ + @@ -266,6 +270,7 @@ + @@ -276,6 +281,7 @@ + @@ -309,6 +315,7 @@ + diff --git a/BPASmartClient.CustomResource/Image/bg12.png b/BPASmartClient.CustomResource/Image/bg12.png new file mode 100644 index 00000000..a6a3d5a5 Binary files /dev/null and b/BPASmartClient.CustomResource/Image/bg12.png differ diff --git a/BPASmartClient.CustomResource/Image/弹窗.png b/BPASmartClient.CustomResource/Image/弹窗.png new file mode 100644 index 00000000..7d4f8fdd Binary files /dev/null and b/BPASmartClient.CustomResource/Image/弹窗.png differ diff --git a/BPASmartClient.CustomResource/Image/组 8.png b/BPASmartClient.CustomResource/Image/组 8.png new file mode 100644 index 00000000..c58a30eb Binary files /dev/null and b/BPASmartClient.CustomResource/Image/组 8.png differ diff --git a/BPASmartClient.CustomResource/Pages/Model/MenuManage.cs b/BPASmartClient.CustomResource/Pages/Model/MenuManage.cs index 143f5b24..1edcc1ab 100644 --- a/BPASmartClient.CustomResource/Pages/Model/MenuManage.cs +++ b/BPASmartClient.CustomResource/Pages/Model/MenuManage.cs @@ -24,10 +24,33 @@ namespace BPASmartClient.CustomResource.Pages.Model public class MenuModel : ObservableObject { + + private Permission[] pers + { + get + { + List permissionList = new List(); + foreach (var item in subMenumodels) + { + foreach (var p in item.SubMenuPermission) + { + if (!permissionList.Contains(p)) permissionList.Add(p); + } + } + return permissionList.ToArray(); + } + } + + ///// + ///// 主菜单权限 + ///// + //public Permission[] MainMenuPermission { get { return _mMainMenuPermission; } set { _mMainMenuPermission = value; OnPropertyChanged(); } } + //private Permission[] _mMainMenuPermission; + /// /// 主菜单权限 /// - public Permission[] MainMenuPermission { get { return _mMainMenuPermission; } set { _mMainMenuPermission = value; OnPropertyChanged(); } } + public Permission[] MainMenuPermission { get { return pers; } set { _mMainMenuPermission = value; OnPropertyChanged(); } } private Permission[] _mMainMenuPermission; /// diff --git a/BPASmartClient.CustomResource/Pages/Model/MessageLog.cs b/BPASmartClient.CustomResource/Pages/Model/MessageLog.cs index da1d1e0e..3302b228 100644 --- a/BPASmartClient.CustomResource/Pages/Model/MessageLog.cs +++ b/BPASmartClient.CustomResource/Pages/Model/MessageLog.cs @@ -22,6 +22,8 @@ namespace BPASmartClient.CustomResource.Pages.Model public Action RunLog { get; set; } + + public ObservableCollection runLogs { get; set; } = new ObservableCollection(); public ObservableCollection userLogs { get; set; } = new ObservableCollection(); @@ -32,12 +34,6 @@ namespace BPASmartClient.CustomResource.Pages.Model Sqlite.GetInstance.Save(); } - //public void GetLog() - //{ - // Sqlite.GetInstance.GetData(); - // Sqlite.GetInstance.GetData(); - //} - public void ShowUserLog(string info) { lock (userlock) @@ -68,10 +64,12 @@ namespace BPASmartClient.CustomResource.Pages.Model }; Sqlite.GetInstance.Base.Add(runLog); Application.Current.Dispatcher.Invoke(new Action(() => { runLogs.Insert(0, runLog); })); - RunLog?.Invoke(info); + RunLog?.Invoke(info); } } + + } } diff --git a/BPASmartClient.CustomResource/Pages/Model/NfcServer.cs b/BPASmartClient.CustomResource/Pages/Model/NfcServer.cs new file mode 100644 index 00000000..803ac497 --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/Model/NfcServer.cs @@ -0,0 +1,49 @@ +using BPASmartClient.CustomResource.Pages.ViewModel; +using BPASmartClient.Nfc; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace BPASmartClient.CustomResource.Pages.Model +{ + public class NfcServer + { + + private volatile static NfcServer _Instance; + public static NfcServer GetInstance => _Instance ?? (_Instance = new NfcServer()); + private NfcServer() { } + public bool EnableLogin { get; set; } + + public Action Update { get; set; } + public void Init() + { + NFCHelper.GetInstance.Update = new Action(() => + { + Update?.Invoke(); + if (!EnableLogin) + { + if (NFCHelper.GetInstance.GetReadResult?.CardNum.Length > 0) + { + string id = NFCHelper.GetInstance.GetReadResult?.CardNum; + var res = Global.userManager.userInfos.FirstOrDefault(p => p.CardId?.FirstOrDefault(s => s == id) != null); + if (res != null) + { + if (Global.userInfo.permission != res.permission) + { + BPASmartClient.Message.MessageLog.GetInstance.ShowDebugLog("NFC卡登录"); + LoginViewModel.NfcLogin(id); + } + } + + } + } + }); + + NFCHelper.GetInstance.Init(); + } + + } +} diff --git a/BPASmartClient.CustomResource/Pages/Model/UserInfo.cs b/BPASmartClient.CustomResource/Pages/Model/UserInfo.cs index 1164d95f..6355563b 100644 --- a/BPASmartClient.CustomResource/Pages/Model/UserInfo.cs +++ b/BPASmartClient.CustomResource/Pages/Model/UserInfo.cs @@ -12,6 +12,7 @@ namespace BPASmartClient.CustomResource.Pages.Model public Permission permission { get; set; } public string UserName { get; set; } public string Password { get; set; } + public List CardId { get; set; } = new List(); } } diff --git a/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml b/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml new file mode 100644 index 00000000..cf7e2af0 --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + diff --git a/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml.cs new file mode 100644 index 00000000..647ce68a --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/View/DebugLogView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace BPASmartClient.CustomResource.Pages.View +{ + /// + /// DebugLogView.xaml 的交互逻辑 + /// + public partial class DebugLogView : UserControl + { + public DebugLogView() + { + InitializeComponent(); + } + } +} diff --git a/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs index e98b6cf0..622c8395 100644 --- a/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs @@ -30,7 +30,14 @@ namespace BPASmartClient.CustomResource.Pages.View Username.SelectionStart = Username.Text.Trim().Length; this.Loaded += LoginView_Loaded; - ActionManage.GetInstance.Register(new Action(() => { this.DialogResult = true; this.Close(); }), "LoginOk", true); + ActionManage.GetInstance.Register(new Action(() => + { + if (this.IsVisible) + { + this.DialogResult = true; + this.Close(); + } + }), "LoginOk", true); ActionManage.GetInstance.Register(new Action(() => { this.DialogResult = false; this.Close(); }), "ExitAction", true); } diff --git a/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml b/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml new file mode 100644 index 00000000..293d1d6f --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml.cs new file mode 100644 index 00000000..65e154f5 --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml.cs @@ -0,0 +1,45 @@ +using BPASmartClient.CustomResource.Pages.Model; +using BPASmartClient.Helper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace BPASmartClient.CustomResource.Pages.View +{ + /// + /// NfcSetView.xaml 的交互逻辑 + /// + public partial class NfcSetView : Window + { + public NfcSetView() + { + InitializeComponent(); + this.Closing += NfcSetView_Closing; + ActionManage.GetInstance.Register(new Action(() => + { + Application.Current.Dispatcher.Invoke(new Action(() => { this.Close(); })); + NfcServer.GetInstance.EnableLogin = false; + }), "Exit", true); + } + + private void NfcSetView_Closing(object? sender, System.ComponentModel.CancelEventArgs e) + { + NfcServer.GetInstance.EnableLogin = false; + } + + private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + this.Close(); + } + } +} diff --git a/BPASmartClient.CustomResource/Pages/View/SubPagLoginView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/SubPagLoginView.xaml.cs index 835e2dc0..6956b672 100644 --- a/BPASmartClient.CustomResource/Pages/View/SubPagLoginView.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/SubPagLoginView.xaml.cs @@ -25,8 +25,23 @@ namespace BPASmartClient.CustomResource.Pages.View InitializeComponent(); Username.Focus(); Username.SelectionStart = Username.Text.Trim().Length; - ActionManage.GetInstance.Register(new Action(() => { this.DialogResult = true; this.Close(); }), "LoginOk", true); - ActionManage.GetInstance.Register(new Action(() => { this.DialogResult = false; this.Close(); }), "ExitAction", true); + ActionManage.GetInstance.Register(new Action(() => + { + if (this.IsVisible) + { + this.DialogResult = true; + this.Close(); + } + + }), "LoginOk", true); + ActionManage.GetInstance.Register(new Action(() => + { + if (this.IsVisible) + { + this.DialogResult = false; + this.Close(); + } + }), "ExitAction", true); } private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e) diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/DebugLogViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/DebugLogViewModel.cs new file mode 100644 index 00000000..116a1851 --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/ViewModel/DebugLogViewModel.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; +using BPASmartClient.Message; +using Microsoft.Toolkit.Mvvm.ComponentModel; + +namespace BPASmartClient.CustomResource.Pages.ViewModel +{ + public class DebugLogViewModel : ObservableObject + { + public DebugLogViewModel() + { + MessageLog.GetInstance.DebugLog = new Action((o) => + { + Message = MessageLog.GetInstance.DebugLogInfo; + }); + } + + public static string Message { get { return _mMessage; } set { _mMessage = value; OnStaticPropertyChanged(); } } + private static string _mMessage = string.Empty; + + public static event EventHandler StaticPropertyChanged; + private static void OnStaticPropertyChanged([CallerMemberName] string PropName = "") + { + StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName)); + } + + + } +} diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/LoginViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/LoginViewModel.cs index 75945eeb..1bb9c66a 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/LoginViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/LoginViewModel.cs @@ -24,6 +24,37 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel }); } + public static void NfcLogin(string cardId) + { + var res = Global.userManager.userInfos.FirstOrDefault(p => p.CardId?.FirstOrDefault(s => s == cardId && s.Length > 0) != null); + if (res != null) + { + Global.userInfo.permission = res.permission; + Global.userInfo.UserName = res.UserName; + Global.userInfo.Password = res.Password; + for (int i = 0; i < MenuManage.GetInstance.menuModels.Count; i++) + { + if (MenuManage.GetInstance.menuModels.ElementAt(i).MainMenuPermission.Contains(res.permission)) + MenuManage.GetInstance.menuModels.ElementAt(i).MainMenuVisibility = Visibility.Visible; + else + MenuManage.GetInstance.menuModels.ElementAt(i).MainMenuVisibility = Visibility.Collapsed; + + if (MenuManage.GetInstance.menuModels.ElementAt(i).subMenumodels.FirstOrDefault(p => p.SubMenuPermission.Contains(res.permission)) == null) + MenuManage.GetInstance.menuModels.ElementAt(i).MainMenuVisibility = Visibility.Collapsed; + + for (int m = 0; m < MenuManage.GetInstance.menuModels.ElementAt(i).subMenumodels.Count; m++) + { + if (MenuManage.GetInstance.menuModels.ElementAt(i).subMenumodels.ElementAt(m).SubMenuPermission.Contains(res.permission)) + MenuManage.GetInstance.menuModels.ElementAt(i).subMenumodels.ElementAt(m).SubMenuVisibility = Visibility.Visible; + else + MenuManage.GetInstance.menuModels.ElementAt(i).subMenumodels.ElementAt(m).SubMenuVisibility = Visibility.Collapsed; + } + } + Application.Current.Dispatcher.Invoke(new Action(() => { ActionManage.GetInstance.Send("LoginOk"); })); + + } + } + private void Login() { var res = Global.userManager.userInfos.FirstOrDefault(p => p.UserName == UserName && p.Password == Password); diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/NfcSetViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/NfcSetViewModel.cs new file mode 100644 index 00000000..a31d8a71 --- /dev/null +++ b/BPASmartClient.CustomResource/Pages/ViewModel/NfcSetViewModel.cs @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Toolkit.Mvvm.ComponentModel; +using System.Collections.ObjectModel; +using BPASmartClient.CustomResource.Pages.Enums; +using Microsoft.Toolkit.Mvvm.Input; +using BPASmartClient.CustomResource.Pages.Model; +using BPASmartClient.Nfc; +using System.Threading; +using BPASmartClient.Helper; + +namespace BPASmartClient.CustomResource.Pages.ViewModel +{ + public class NfcSetViewModel : ObservableObject + { + public NfcSetViewModel() + { + NfcServer.GetInstance.EnableLogin = true; + permissions.Clear(); + Enum.GetNames(typeof(Permission)).ToList()?.ForEach(item => { permissions.Add(new PermissionSelect() { PermissionName = item }); }); + + NfcServer.GetInstance.Update = new Action(() => + { + CardNum = NFCHelper.GetInstance.GetReadResult.CardNum; + if (CardNum.Length <= 0) return; + + if (!UserAdd && !UserCnange) + { + Info = "Error:请选择操作模式;"; + return; + } + + if (UserAdd) + { + var per = Global.userManager.userInfos.FirstOrDefault(p => p.CardId.Contains(CardNum)); + if (per != null) + { + Info = "Error:用户已存在!;"; + return; + } + if (permissions?.FirstOrDefault(p => p.PermissionSelected == true) == null) + { + Info = "Error:请选择一个权限;"; + return; + } + var res = permissions.FirstOrDefault(p => p.PermissionSelected == true); + if (res != null) + { + int index = Array.FindIndex(Global.userManager.userInfos.ToArray(), p => p.permission.ToString() == res.PermissionName); + if (index >= 0 && index < Global.userManager.userInfos.Count) + { + if (!Global.userManager.userInfos.ElementAt(index).CardId.Contains(NFCHelper.GetInstance.GetReadResult.CardNum)) + { + Global.userManager.userInfos.ElementAt(index).CardId.Add(NFCHelper.GetInstance.GetReadResult.CardNum); + Config.GetInstance.SaveUser(); + Info = $"Info:ID {NFCHelper.GetInstance.GetReadResult.CardNum} 添加成功;"; + Thread.Sleep(1000); + ActionManage.GetInstance.Send("Exit"); + } + } + else + Info = $"Info:ID {NFCHelper.GetInstance.GetReadResult.CardNum} 已存在;"; + } + } + + if (UserCnange) + { + int index = Array.FindIndex(Global.userManager.userInfos.ToArray(), p => p.CardId.FirstOrDefault(s => s == CardNum) != null); + if (index >= 0 && index < Global.userManager.userInfos.Count) + { + if (Global.userManager.userInfos.ElementAt(index).CardId.Contains(CardNum)) + Global.userManager.userInfos.ElementAt(index).CardId.Remove(CardNum); + Config.GetInstance.SaveUser(); + Info = $"Info:ID {CardNum} 注销成功;"; + Thread.Sleep(1000); + ActionManage.GetInstance.Send("Exit"); + } + else + { + Info = "Info:当前卡在系统中不存在;"; + return; + } + } + }); + } + + private bool Verify() + { + if (permissions?.FirstOrDefault(p => p.PermissionSelected == true) == null) + { + Info = "Error:请选择一个权限;"; + return false; + } + if (CardNum == null || CardNum?.Length <= 0) + { + Info = "Error:请将卡放到刷卡区;"; + return false; + } + return true; + } + + public ObservableCollection permissions { get; set; } = new ObservableCollection(); + + public string CardNum { get { return _mCardNum; } set { _mCardNum = value; OnPropertyChanged(); } } + private string _mCardNum; + + public string Info { get { return _mInfo; } set { _mInfo = value; OnPropertyChanged(); } } + private string _mInfo; + + public bool UserAdd { get { return _mUserAdd; } set { _mUserAdd = value; OnPropertyChanged(); } } + private bool _mUserAdd; + + public bool UserCnange { get { return _mUserCnange; } set { _mUserCnange = value; OnPropertyChanged(); } } + private bool _mUserCnange; + + public RelayCommand SavePermission { get; set; } + + public RelayCommand DeletePermission { get; set; } + + } + + public class PermissionSelect : ObservableObject + { + + public string PermissionName { get { return _mPermissionName; } set { _mPermissionName = value; OnPropertyChanged(); } } + private string _mPermissionName; + + + public bool PermissionSelected { get { return _mPermissionSelected; } set { _mPermissionSelected = value; OnPropertyChanged(); } } + private bool _mPermissionSelected = false; + + } +} diff --git a/BPASmartClient.Helper/ActionManage.cs b/BPASmartClient.Helper/ActionManage.cs index ca7b05cc..af80601e 100644 --- a/BPASmartClient.Helper/ActionManage.cs +++ b/BPASmartClient.Helper/ActionManage.cs @@ -95,23 +95,31 @@ namespace BPASmartClient.Helper if (action != null) { if (IsAutoCancelRegister && actions.ContainsKey(key)) actions.TryRemove(key, out Delegation d); - if (!actions.ContainsKey(key)) + try { - if (action is Action actionBus) - actions.TryAdd(key, new Delegation() { ActionBus = actionBus }); + if (!actions.ContainsKey(key)) + { + if (action is Action actionBus) + actions.TryAdd(key, new Delegation() { ActionBus = actionBus }); - if (action is Action actionObj) - actions.TryAdd(key, new Delegation() { ActionPar = actionObj }); + if (action is Action actionObj) + actions.TryAdd(key, new Delegation() { ActionPar = actionObj }); - if (action is Action actionObjs) - actions.TryAdd(key, new Delegation() { ActionPars = actionObjs }); + if (action is Action actionObjs) + actions.TryAdd(key, new Delegation() { ActionPars = actionObjs }); - if (action is Func funcObj) - actions.TryAdd(key, new Delegation() { FuncObj = funcObj }); + if (action is Func funcObj) + actions.TryAdd(key, new Delegation() { FuncObj = funcObj }); - if (action is Func puncPar) - actions.TryAdd(key, new Delegation() { FuncPar = puncPar }); + if (action is Func puncPar) + actions.TryAdd(key, new Delegation() { FuncPar = puncPar }); + } } + catch (Exception ex) + { + Message.MessageLog.GetInstance.ShowDebugLog(ex.ToString()); + } + } } diff --git a/BPASmartClient.Message/MessageLog.cs b/BPASmartClient.Message/MessageLog.cs index 75da5e61..3467aee0 100644 --- a/BPASmartClient.Message/MessageLog.cs +++ b/BPASmartClient.Message/MessageLog.cs @@ -22,6 +22,10 @@ namespace BPASmartClient.Message /// public Action InfoNotify { get; set; } + public Action DebugLog { get; set; } + + public string DebugLogInfo { get; set; } = string.Empty; + /// /// 日志信息 /// @@ -37,6 +41,13 @@ namespace BPASmartClient.Message LogInfo = $"{DateTime.Now.ToString("HH:mm:ss")}:{info} \n\r {LogInfo}"; if (InfoNotify != null) InfoNotify(info); } + + public void ShowDebugLog(string info) + { + Debug.WriteLine($"{DateTime.Now.ToString("HH:mm:ss")}:{info}"); + DebugLogInfo = $"{DateTime.Now.ToString("HH:mm:ss")}:{info} \n\r {DebugLogInfo}"; + DebugLog?.Invoke(info); + } #endregion #region 异常消息日志 diff --git a/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj b/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj new file mode 100644 index 00000000..2cce1ae6 --- /dev/null +++ b/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj @@ -0,0 +1,28 @@ + + + + net6.0 + enable + enable + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + + + + + + diff --git a/BPASmartClient.Nfc/NFCHelper.cs b/BPASmartClient.Nfc/NFCHelper.cs new file mode 100644 index 00000000..ffc32ef7 --- /dev/null +++ b/BPASmartClient.Nfc/NFCHelper.cs @@ -0,0 +1,242 @@ +using BPASmartClient.Helper; +using BPASmartClient.Message; +using System.Text.RegularExpressions; + +namespace BPASmartClient.Nfc +{ + public class NFCHelper + { + private volatile static NFCHelper _Instance; + public static NFCHelper GetInstance => _Instance ?? (_Instance = new NFCHelper()); + private NFCHelper() { } + + public ReadResult GetReadResult { get; set; } = new ReadResult(); + + public Action Update { get; set; } + + //转换卡号专用 + private byte[] convertSNR(string str, int keyN) + { + string regex = "[^a-fA-F0-9]"; + string tmpJudge = Regex.Replace(str, regex, ""); + + //长度不对,直接退回错误 + if (tmpJudge.Length != 12) return null; + + string[] tmpResult = Regex.Split(str, regex); + byte[] result = new byte[keyN]; + int i = 0; + foreach (string tmp in tmpResult) + { + result[i] = Convert.ToByte(tmp, 16); + i++; + } + return result; + } + + //数据输入判断函数2个 + private string formatStr(string str, int num_blk) + { + + string tmp = Regex.Replace(str, "[^a-fA-F0-9]", ""); + //长度不对直接报错 + //num_blk==-1指示不用检查位数 + if (num_blk == -1) return tmp; + //num_blk==其它负数,为-1/num_blk + if (num_blk < -1) + { + if (tmp.Length != -16 / num_blk * 2) return null; + else return tmp; + } + if (tmp.Length != 16 * num_blk * 2) return null; + else return tmp; + } + private void convertStr(byte[] after, string before, int length) + { + for (int i = 0; i < length; i++) + { + after[i] = Convert.ToByte(before.Substring(2 * i, 2), 16); + } + } + + //显示命令执行结果 + private string showStatue(int Code) + { + string msg = ""; + switch (Code) + { + case 0x00: + msg = "命令执行成功"; + break; + case 0x01: + msg = "命令操作失败"; + break; + case 0x02: + msg = "地址校验错误"; + break; + case 0x03: + msg = "找不到已选择的端口"; + break; + case 0x04: + msg = "读写器返回超时"; + break; + case 0x05: + msg = "数据包流水号不正确"; + break; + case 0x07: + msg = "接收异常"; + break; + case 0x0A: + msg = "参数值超出范围"; + break; + case 0x80: + msg = "参数设置成功"; + break; + case 0x81: + msg = "参数设置失败"; + break; + case 0x82: + msg = "通讯超时"; + break; + case 0x83: + msg = "卡不存在"; + break; + case 0x84: + msg = "接收卡数据出错"; + break; + case 0x85: + msg = "未知的错误"; + break; + case 0x87: + msg = "输入参数或者输入命令格式错误"; + break; + case 0x89: + msg = "输入的指令代码不存在"; + break; + case 0x8A: + msg = "在对于卡块初始化命令中出现错误"; + break; + case 0x8B: + msg = "在防冲突过程中得到错误的序列号"; + break; + case 0x8C: + msg = "密码认证没通过"; + break; + case 0x8F: + msg = "读取器接收到未知命令"; + break; + case 0x90: + msg = "卡不支持这个命令"; + break; + case 0x91: + msg = "命令格式有错误"; + break; + case 0x92: + msg = "在命令的FLAG参数中,不支持OPTION 模式"; + break; + case 0x93: + msg = "要操作的BLOCK不存在"; + break; + case 0x94: + msg = "要操作的对象已经别锁定,不能进行修改"; + break; + case 0x95: + msg = "锁定操作不成功"; + break; + case 0x96: + msg = "写操作不成功"; + break; + default: + msg = "未知错误2"; + break; + } + return msg; + } + + /// + /// 结果显示 + /// + /// + /// + /// + /// + private string showData(byte[] data, int s, int e) + { + string res = string.Empty; + //非负转换 + for (int i = 0; i < e; i++) + { + if (data[s + i] < 0) + data[s + i] = Convert.ToByte(Convert.ToInt32(data[s + i]) + 256); + } + + for (int i = 0; i < e; i++) + { + res += data[s + i].ToString("X2") + " "; + } + return res; + } + + public void Init() + { + ThreadManage.GetInstance().StartLong(new Action(() => + { + Read(); + if (GetReadResult.ErrorInfo.Length > 0) MessageLog.GetInstance.ShowDebugLog(GetReadResult.ErrorInfo); + Thread.Sleep(1000); + }), "NFC数据读取"); + } + + public void Read(ReadKeyEnum readKeyEnum = ReadKeyEnum.KeyA, ReadTypeEnum readTypeEnum = ReadTypeEnum.Idle, byte ReadStart = 16, byte ReadNum = 1) + { + //数据是一个64位的长整形,读取块的数量就是指第几个字 + + if (ReadStart < 0 || ReadStart > 63) return; + if (ReadNum <= 0 || ReadNum > 4) return; + byte mode1 = (readKeyEnum == ReadKeyEnum.KeyB) ? (byte)0x01 : (byte)0x00; + byte mode2 = (readTypeEnum == ReadTypeEnum.All) ? (byte)0x01 : (byte)0x00; + byte mode = (byte)((mode1 << 1) | mode2); + byte blk_add = ReadStart; + byte num_blk = ReadNum; + //秘钥: + //第一组:FF FF FF FF FF FF + //第二组:B0 B1 B2 B3 B4 B5 + //第三组:A0 A1 A2 A3 A4 A5 + byte[] snr = new byte[6]; + snr = convertSNR("FF FF FF FF FF FF", 6); + if (snr == null) + { + GetReadResult.ErrorInfo = "序列号无效!"; + return; + } + + byte[] buffer = new byte[16 * num_blk]; + try + { + int nRet = Reader.MF_Read(mode, blk_add, num_blk, snr, buffer); + GetReadResult.StatueCode = showStatue(nRet); + if (nRet != 0) + { + GetReadResult.StatueCode = showStatue(buffer[0]); + GetReadResult.CardNum = string.Empty; + GetReadResult.Data = string.Empty; + } + else + { + GetReadResult.CardNum = showData(snr, 0, 4); + GetReadResult.Data = showData(buffer, 0, 16 * num_blk); + } + } + catch (Exception ex) + { + GetReadResult.CardNum = string.Empty; + GetReadResult.Data = string.Empty; + MessageLog.GetInstance.ShowDebugLog(ex.ToString()); + } + finally + { + Update?.Invoke(); + } + } + } +} \ No newline at end of file diff --git a/BPASmartClient.Nfc/ReadKeyEnum.cs b/BPASmartClient.Nfc/ReadKeyEnum.cs new file mode 100644 index 00000000..9ab7a9c2 --- /dev/null +++ b/BPASmartClient.Nfc/ReadKeyEnum.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.Nfc +{ + public enum ReadKeyEnum + { + KeyA, + KeyB, + } + + public enum ReadTypeEnum + { + Idle, + All + } +} diff --git a/BPASmartClient.Nfc/ReadResult.cs b/BPASmartClient.Nfc/ReadResult.cs new file mode 100644 index 00000000..2e9afe1f --- /dev/null +++ b/BPASmartClient.Nfc/ReadResult.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.Nfc +{ + public class ReadResult + { + public string ErrorInfo { get; set; } = string.Empty; + public string CardNum { get; set; } = string.Empty; + public string StatueCode { get; set; } = string.Empty; + public string Data { get; set; } = string.Empty; + } +} diff --git a/BPASmartClient.Nfc/Reader.cs b/BPASmartClient.Nfc/Reader.cs new file mode 100644 index 00000000..c582b1b4 --- /dev/null +++ b/BPASmartClient.Nfc/Reader.cs @@ -0,0 +1,263 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.Nfc +{ + public class Reader + { + /*System Setting*/ + [DllImport("function.dll")] + + public static extern int SetSerNum(byte[] newValue, [In] byte[] buffer); + /* + 函数功能:设置 8个字节的产品序列号。 + + 输入参数:      描述 + newValue 8个字节的读写器序列号 + buffer 用来返回接收到的数据的指针 + + 输出参数: + + buffer 返回STATUS后的状态 + * 如果设置成功,则*buffer=0x 80 + 如果设置失败,则*buffer为底层(读卡器单片机)上传的错误代码 + + 返回值: + 0x00,设置成功 + 0x01,设置失败 + */ + + [DllImport("function.dll")] + + public static extern int GetSerNum([In] byte[] buffer); + /* + 函数功能: + 读取由厂家预设的1个字节的读卡器地址和8个字节序列号. + + 输入参数: + buffer 传入一个指针,用来返回接收到的数据 + + 输出参数: + + buffer buffer[0] 读写器地址 + buffer[1...8] 8个字节的读写器序列号 + + 返回值: + 0x00,操作成功 + 0x01,操作失败 + */ + + [DllImport("function.dll")] + + public static extern int GetVersionNum([In] byte[] strVersionNum); + /* + 函数功能: + 读取读写器的版本号. + + 输入参数: + VersionNum 待读入的版本号 + + 输出参数: + *VersionNum + * 如果 :操作失败, 则VersionNum [0] 为 错误代码 + 如果 :操作成功, 则VersionNum [0..N] 为读入的版本号 + 返回值: + 0x00,操作成功 + 0x01,操作失败 + */ + + [DllImport("function.dll")] + + public static extern int ControlLED(int freq, int duration, [In] byte[] buffer); + /* + 函数功能: 设置读卡器的错误提示 + + 输入参数: + buffer 待返回的参数 + + 输出参数: + buffer 如果 :操作失败, 则buffer [0] 为 错误代码(参考2.2) + 如果 :操作成功, 则buffer [0] 为成功标志 ,即为0x80 + + 返回值: + 0x00,操作成功, + 0x01,操作失败 + */ + + [DllImport("function.dll")] + + public static extern int ControlBuzzer(int freq, int duration, [In] byte[] buffer); + /* + 函数功能: 控制读卡器的正确提示 + + 输入参数: + buffer 待返回的参数 + + 输出参数: + buffer 如果 :操作失败, 则buffer [0] 为 错误代码(参考2.2) + 如果 :操作成功, 则buffer [0] 为成功标志 ,即为0x80 + + 返回值: + 0x00,操作成功, + 0x01,操作失败 + */ + + /*14443A-MF*/ + [DllImport("function.dll")] + public static extern int MF_Read(byte mode, byte blk_add, byte num_blk, [In] byte[] snr, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int MF_Write(byte mode, byte blk_add, byte num_blk, [In] byte[] snr, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int MF_InitValue(byte mode, byte SectNum, [In] byte[] snr, [In] byte[] value); + + [DllImport("function.dll")] + public static extern int MF_Dec(byte mode, byte SectNum, [In] byte[] snr, [In] byte[] value); + + [DllImport("function.dll")] + public static extern int MF_Inc(byte mode, byte SectNum, [In] byte[] snr, [In] byte[] value); + + [DllImport("function.dll")] + public static extern int MF_Request([In] byte[] commHandle, int DeviceAdddress, byte inf_mode, [In] byte[] Buffer); + + [DllImport("function.dll")] + public static extern int MF_Select([In] byte[] commHandle, int DeviiceAddress, byte inf_mode, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int MF_Halt(); + + [DllImport("function.dll")] + public static extern int MF_Anticoll([In] byte[] commHandle, int DeviceAddress, [In] byte[] snr, [In] byte[] status); + + [DllImport("function.dll")] + public static extern int MF_Restore([In] byte[] commHandle, int DeviceAddress, byte mode, byte cardlength, [In] byte[] carddata); + + [DllImport("function.dll")] + public static extern int MF_Getsnr(int mode, int halt, [In] byte[] snr, [In] byte[] value); + + + /*Ultralight*/ + [DllImport("function.dll")] + public static extern int UL_Request(byte mode, [In] byte[] snr); + + [DllImport("function.dll")] + public static extern int UL_HLRead(byte mode, byte blk_add, [In] byte[] snr, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int UL_HLWrite(byte mode, byte blk_add, [In] byte[] snr, [In] byte[] buffer); + + + /*ISO14443TypeB*/ + [DllImport("function.dll")] + public static extern int TypeB_Request([In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int TYPEB_SFZSNR(byte mode, byte halt, [In] byte[] snr, [In] byte[] value); + + [DllImport("function.dll")] + public static extern int TypeB_TransCOS([In] byte[] cmd, int cmdSize, [In] byte[] buffer); + + + + /*ISO15693*/ + + [DllImport("function.dll")] + public static extern int ISO15693_Inventory([In] byte[] Cardnumber, [In] byte[] pBuffer); + /* + 函数功能:此命令通过防冲突用于得到读卡区域内所有卡片的序列号(能得到的卡片数量与模块天线的输出功率有关,一般能对2~6卡进行防冲突) + + 输入参数: + Cardnumber 返回的卡的数量(一个字节) + pBuffer 返回的数据(包括FLAG和DSFID和8*n个字节的卡号) + + 输出参数: + 如果:操作成功 + Cardnumber 返回的卡的数量(一个字节) + pBuffer 返回的数据(包括FLAG和DSFID和8*n个字节的卡号) + + 如果:操作失败,则*nrOfCard为错误代码 + + 返回值: + 0x00,操作成功, + 0x01,操作失败 + */ + + [DllImport("function.dll")] + public static extern int ISO15693_Read(byte flags, byte blk_add, byte num_blk, [In] byte[] uid, [In] byte[] buffer); + /* + 函数功能: + 用来读取1个或多个扇区的值,如果要读每个块的安全位, + 将FLAGS中Option_flag置为1,即FLAG = 0X42,每个扇区将返回5个字节,包括1个表示安全状态字节和4个字节的块内容,这时候每次最多能读12个块。 + 如果FLAG = 02,将只返回4字节的块内容,这时候每次最多能读63个块。 + + 输入参数: + flags 0x02 不带uid + 0x22 带uid + 0x42 不带uid但是要读安全位 + blk_add, 要读的起始块号 + num_blk, 块的数量 + *uid UID信息 + *buffer 返回值 + + 输出参数: + 操作成功,buffer[0] 返回的flag buffer[1..N] Data + 操作失败,buffer[0]为错误代码 + + 返回值: + 0x00,操作成功, + 0x01,操作失败 + */ + + [DllImport("function.dll")] + public static extern int ISO15693_Write(byte flag, byte blk_add, byte num_blk, [In] byte[] uid, [In] byte[] data); + /* + 函数功能: 对一个块进行写操作(每次只能写一个块) + + 输入参数: + flags 0x02 不带uid + 0x22 带uid + 0x42 不带uid但是要读安全位 + blk_add, 要写的起始块号 + num_blk, 写的块的数量 + *uid UID信息 + *data 返回值 + + 输出参数: + 如果:操作失败,则data[0]为错误代码 + + 返回值: + 0x00,操作成功, + 0x01,操作失败 + */ + + [DllImport("function.dll")] + public static extern int ISO15693_GetSysInfo(byte flag, [In] byte[] uid, [In] byte[] Buffer); + + [DllImport("function.dll")] + public static extern int ISO15693_Lock(byte flags, byte num_blk, [In] byte[] uid, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int ISO15693_Select(byte flags, [In] byte[] uid, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int ISO15693_WriteAFI(byte flags, byte afi, [In] byte[] uid, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int ISO15693_LockAFI(byte flags, [In] byte[] uid, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int ISO15693_WriteDSFID(byte flags, byte DSFID, [In] byte[] uid, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int ISO15693_LockDSFID(byte flags, [In] byte[] uid, [In] byte[] buffer); + + [DllImport("function.dll")] + public static extern int ISO15693_GetMulSecurity(byte flag, byte blkAddr, byte blkNum, [In] byte[] uid, [In] byte[] pBuffer); + + } +} diff --git a/BPASmartClient.Nfc/USB.dll b/BPASmartClient.Nfc/USB.dll new file mode 100644 index 00000000..37cf8e2e Binary files /dev/null and b/BPASmartClient.Nfc/USB.dll differ diff --git a/BPASmartClient.Nfc/function.dll b/BPASmartClient.Nfc/function.dll new file mode 100644 index 00000000..7d04969b Binary files /dev/null and b/BPASmartClient.Nfc/function.dll differ diff --git a/BPASmartClient/Control/ShopDeviceConfigView.xaml b/BPASmartClient/Control/ShopDeviceConfigView.xaml index 2ae084cc..04e18471 100644 --- a/BPASmartClient/Control/ShopDeviceConfigView.xaml +++ b/BPASmartClient/Control/ShopDeviceConfigView.xaml @@ -384,11 +384,11 @@ Grid.Column="3" Width="170" HorizontalAlignment="Left" + Command="{Binding NewShopCommand}" Content="新建店铺" FontSize="16" Foreground="{StaticResource TextBlockForeground}" IcoText="" - Command="{Binding NewShopCommand}" Style="{StaticResource IcoButtonStyle}" /> .Save(); MessageLog.GetInstance.LogSave(); + ThreadManage.GetInstance().Dispose(); } private void MenuInit() { + NfcServer.GetInstance.Init(); #region 配方管理菜单 ObservableCollection RecipeManage = new ObservableCollection(); @@ -71,7 +77,6 @@ namespace BPASmartClient.DosingSystem MainMenuIcon = "", MainMenuName = "配方管理", Alias = "Recipe Management", - MainMenuPermission = new Permission[] { Permission.管理员 }, subMenumodels = RecipeManage, }); #endregion @@ -102,12 +107,19 @@ namespace BPASmartClient.DosingSystem ToggleWindowPath = "Pages.View.AlarmView" }); + InfoLog.Add(new SubMenumodel() + { + SubMenuName = "调试日志", + SubMenuPermission = new Permission[] { Permission.操作员, Permission.管理员, Permission.技术员, Permission.技术员 }, + AssemblyName = "BPASmartClient.CustomResource", + ToggleWindowPath = "Pages.View.DebugLogView" + }); + MenuManage.GetInstance.menuModels.Add(new MenuModel() { MainMenuIcon = "", MainMenuName = "消息日志", Alias = "Message Log", - MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, subMenumodels = InfoLog, }); #endregion @@ -130,15 +142,11 @@ namespace BPASmartClient.DosingSystem ToggleWindowPath = "View.HardwareStatusView" }); - - - MenuManage.GetInstance.menuModels.Add(new MenuModel() { MainMenuIcon = "", MainMenuName = "设备监控", Alias = "Device Monitor", - MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, subMenumodels = DeviceMonitor, }); #endregion @@ -161,13 +169,19 @@ namespace BPASmartClient.DosingSystem ToggleWindowPath = "Pages.View.PasswordChangeView" }); + UserManager.Add(new SubMenumodel() + { + SubMenuName = "NFC登录设置", + SubMenuPermission = new Permission[] { Permission.管理员 }, + AssemblyName = "BPASmartClient.CustomResource", + ToggleWindowPath = "Pages.View.NfcSetView" + }); MenuManage.GetInstance.menuModels.Add(new MenuModel() { MainMenuIcon = "", MainMenuName = "用户管理", Alias = "User Management", - MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, subMenumodels = UserManager, }); #endregion diff --git a/DosingSystem/BPASmartClient.DosingSystem.csproj b/DosingSystem/BPASmartClient.DosingSystem.csproj index f2efc607..d6aaf8b9 100644 --- a/DosingSystem/BPASmartClient.DosingSystem.csproj +++ b/DosingSystem/BPASmartClient.DosingSystem.csproj @@ -7,7 +7,7 @@ true hbl.ico - AnyCPU + x86 True @@ -24,6 +24,7 @@ + diff --git a/DosingSystem/View/DeviceListView.xaml b/DosingSystem/View/DeviceListView.xaml index d17dbae8..46d4ef9c 100644 --- a/DosingSystem/View/DeviceListView.xaml +++ b/DosingSystem/View/DeviceListView.xaml @@ -51,7 +51,7 @@ Height="500" CurrentValue="50" />--> - + diff --git a/DosingSystem/View/RecipeControlView.xaml b/DosingSystem/View/RecipeControlView.xaml index 24b50e5d..9fe24d73 100644 --- a/DosingSystem/View/RecipeControlView.xaml +++ b/DosingSystem/View/RecipeControlView.xaml @@ -46,7 +46,7 @@ - + + Height="30" + Background="#00BEFA"> + @@ -46,7 +47,7 @@ - + @@ -76,20 +77,18 @@ + ItemsSource="{Binding DisplayMenus}" + ScrollViewer.CanContentScroll="False" + ScrollViewer.HorizontalScrollBarVisibility="Hidden" + ScrollViewer.VerticalScrollBarVisibility="Disabled"> - + @@ -186,8 +185,7 @@ ScrollViewer.HorizontalScrollBarVisibility="Hidden" Content="退出" Cursor="Hand" Style="{DynamicResource CommonBtn_返回}" - ToolTip="退出程序" - /> + ToolTip="退出程序" /> @@ -229,8 +227,7 @@ ScrollViewer.HorizontalScrollBarVisibility="Hidden" + IsChecked="{Binding Status}" /> - + Content="{Binding MyWindow}" /> - + diff --git a/SmartClient.sln b/SmartClient.sln index 16cf2586..b465601b 100644 --- a/SmartClient.sln +++ b/SmartClient.sln @@ -118,7 +118,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.HubHelper", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkTSingle", "BPASmartClient.MorkTSingle\BPASmartClient.MorkTSingle.csproj", "{2366AC9B-B662-4550-9486-AF848B4D2961}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.MilkWithTea", "BPASmartClient.MilkWithTea\BPASmartClient.MilkWithTea.csproj", "{BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MilkWithTea", "BPASmartClient.MilkWithTea\BPASmartClient.MilkWithTea.csproj", "{BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.Nfc", "BPASmartClient.Nfc\BPASmartClient.Nfc.csproj", "{42D35B7C-764C-4692-AA85-9B343A0F5B7F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.Argox", "BPASmartClient.Argox\BPASmartClient.Argox.csproj", "{B8D499BA-A18A-4FD6-B036-44F02B4D164B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -1094,46 +1098,6 @@ Global {099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x64.Build.0 = Release|Any CPU {099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x86.ActiveCfg = Release|Any CPU {099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Release|x86.Build.0 = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|Any CPU.Build.0 = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|ARM.ActiveCfg = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|ARM.Build.0 = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|ARM64.Build.0 = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|x64.ActiveCfg = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|x64.Build.0 = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|x86.ActiveCfg = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Debug|x86.Build.0 = Debug|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|Any CPU.ActiveCfg = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|Any CPU.Build.0 = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|ARM.ActiveCfg = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|ARM.Build.0 = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|ARM64.ActiveCfg = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|ARM64.Build.0 = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|x64.ActiveCfg = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|x64.Build.0 = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|x86.ActiveCfg = Release|Any CPU - {76B6B333-0109-4EE8-A9B2-3E53A7421D92}.Release|x86.Build.0 = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|ARM.ActiveCfg = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|ARM.Build.0 = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|ARM64.Build.0 = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|x64.ActiveCfg = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|x64.Build.0 = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|x86.ActiveCfg = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|x86.Build.0 = Debug|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|Any CPU.Build.0 = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|ARM.ActiveCfg = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|ARM.Build.0 = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|ARM64.ActiveCfg = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|ARM64.Build.0 = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|x64.ActiveCfg = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|x64.Build.0 = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|x86.ActiveCfg = Release|Any CPU - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|x86.Build.0 = Release|Any CPU {2366AC9B-B662-4550-9486-AF848B4D2961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2366AC9B-B662-4550-9486-AF848B4D2961}.Debug|Any CPU.Build.0 = Debug|Any CPU {2366AC9B-B662-4550-9486-AF848B4D2961}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -1154,6 +1118,66 @@ Global {2366AC9B-B662-4550-9486-AF848B4D2961}.Release|x64.Build.0 = Release|Any CPU {2366AC9B-B662-4550-9486-AF848B4D2961}.Release|x86.ActiveCfg = Release|Any CPU {2366AC9B-B662-4550-9486-AF848B4D2961}.Release|x86.Build.0 = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|ARM.ActiveCfg = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|ARM.Build.0 = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|ARM64.Build.0 = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|x64.ActiveCfg = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|x64.Build.0 = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|x86.ActiveCfg = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Debug|x86.Build.0 = Debug|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|Any CPU.Build.0 = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|ARM.ActiveCfg = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|ARM.Build.0 = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|ARM64.ActiveCfg = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|ARM64.Build.0 = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|x64.ActiveCfg = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|x64.Build.0 = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|x86.ActiveCfg = Release|Any CPU + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B}.Release|x86.Build.0 = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|ARM.ActiveCfg = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|ARM.Build.0 = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|ARM64.Build.0 = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|x64.ActiveCfg = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|x64.Build.0 = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|x86.ActiveCfg = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Debug|x86.Build.0 = Debug|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|Any CPU.Build.0 = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|ARM.ActiveCfg = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|ARM.Build.0 = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|ARM64.ActiveCfg = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|ARM64.Build.0 = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|x64.ActiveCfg = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|x64.Build.0 = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|x86.ActiveCfg = Release|Any CPU + {42D35B7C-764C-4692-AA85-9B343A0F5B7F}.Release|x86.Build.0 = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|ARM.ActiveCfg = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|ARM.Build.0 = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|ARM64.Build.0 = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|x64.ActiveCfg = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|x64.Build.0 = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|x86.ActiveCfg = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Debug|x86.Build.0 = Debug|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|Any CPU.Build.0 = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|ARM.ActiveCfg = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|ARM.Build.0 = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|ARM64.ActiveCfg = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|ARM64.Build.0 = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|x64.ActiveCfg = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|x64.Build.0 = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|x86.ActiveCfg = Release|Any CPU + {B8D499BA-A18A-4FD6-B036-44F02B4D164B}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1207,9 +1231,10 @@ Global {E7168B03-68E5-4285-BB95-5660F877577A} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {A49E1C5A-9489-451C-9CE6-CEA586234B84} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {099E047C-F40E-47A3-A5BA-81FC1500D5E8} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625} - {76B6B333-0109-4EE8-A9B2-3E53A7421D92} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} - {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {2366AC9B-B662-4550-9486-AF848B4D2961} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} + {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} + {42D35B7C-764C-4692-AA85-9B343A0F5B7F} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625} + {B8D499BA-A18A-4FD6-B036-44F02B4D164B} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}