修改指纹登录不同用户显示相同信息
This commit is contained in:
		
							parent
							
								
									f7df2f6c79
								
							
						
					
					
						commit
						679b1a42ff
					
				| 
						 | 
					@ -1,4 +1,5 @@
 | 
				
			||||||
using log4net;
 | 
					
 | 
				
			||||||
 | 
					using log4net;
 | 
				
			||||||
using log4net.Repository.Hierarchy;
 | 
					using log4net.Repository.Hierarchy;
 | 
				
			||||||
using Microsoft.Data.SqlClient.Server;
 | 
					using Microsoft.Data.SqlClient.Server;
 | 
				
			||||||
using Newtonsoft.Json;
 | 
					using Newtonsoft.Json;
 | 
				
			||||||
| 
						 | 
					@ -20,22 +21,22 @@ namespace DM_Weight.Finger
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private readonly ILog logger = LogManager.GetLogger(typeof(FingerprintUtil));
 | 
					        private readonly ILog logger = LogManager.GetLogger(typeof(FingerprintUtil));
 | 
				
			||||||
        public zkemkeeper.CZKEMClass axCZKEM1;// = new zkemkeeper.CZKEMClass();
 | 
					        public zkemkeeper.CZKEMClass axCZKEM1; //= new zkemkeeper.CZKEMClass();
 | 
				
			||||||
        public bool bIsConnected = false;
 | 
					        public bool bIsConnected = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private string fingerIp = ConfigurationManager.AppSettings["fingerIp"]?.ToString() ?? "";
 | 
					        private string fingerIp = ConfigurationManager.AppSettings["fingerIp"].ToString();
 | 
				
			||||||
        private int fingerPort = 4370;
 | 
					        private int fingerPort = 4370;
 | 
				
			||||||
        private int machineNumber = Convert.ToInt32(ConfigurationManager.AppSettings["machineNumber"]?.ToString() ?? "0");
 | 
					        private int machineNumber = Convert.ToInt32(ConfigurationManager.AppSettings["machineNumber"].ToString());
 | 
				
			||||||
        private int machineType = Convert.ToInt32(ConfigurationManager.AppSettings["machineType"]?.ToString() ?? "0");
 | 
					        private int machineType = Convert.ToInt32(ConfigurationManager.AppSettings["machineType"].ToString());
 | 
				
			||||||
        private readonly IEventAggregator _eventAggregator;
 | 
					        private readonly IEventAggregator _eventAggregator;
 | 
				
			||||||
        public FingerprintUtil(IEventAggregator eventAggregator)
 | 
					        public FingerprintUtil(IEventAggregator eventAggregator)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            _eventAggregator = eventAggregator;
 | 
					            _eventAggregator = eventAggregator;
 | 
				
			||||||
            logger.Info($"进入构造器,开始连接指纹机");
 | 
					            logger.Info($"进入构造器,开始连接指纹机");
 | 
				
			||||||
           // Task.Factory.StartNew(() =>
 | 
					            // Task.Run(() =>
 | 
				
			||||||
           //{
 | 
					            //{
 | 
				
			||||||
               ConnectionMain();
 | 
					            ConnectionMain();
 | 
				
			||||||
        //});
 | 
					            //});
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public void ConnectionMain()
 | 
					        public void ConnectionMain()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -446,8 +446,8 @@ _exitCommand ??= new DelegateCommand(Exit);
 | 
				
			||||||
        //接收导航传过来的参数  现在是在此处初始化了表格数据
 | 
					        //接收导航传过来的参数  现在是在此处初始化了表格数据
 | 
				
			||||||
        public void OnNavigatedTo(NavigationContext navigationContext)
 | 
					        public void OnNavigatedTo(NavigationContext navigationContext)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            FingerMsg = !_fingerprintUtil.bIsConnected;
 | 
					            //FingerMsg = !_fingerprintUtil.bIsConnected;
 | 
				
			||||||
            _eventAggregator.GetEvent<FingerprintEvent>().Subscribe(LoginEvent);
 | 
					            //_eventAggregator.GetEvent<FingerprintEvent>().Subscribe(LoginEvent);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,13 @@
 | 
				
			||||||
 | 
					using Prism.Events;
 | 
				
			||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Text;
 | 
				
			||||||
 | 
					using System.Threading.Tasks;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace DM_Weight.msg
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    public class LoginOutEvent : PubSubEvent
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue