Esempio n. 1
0
 void card_mgr_OnAlarmEvent(CardReader.ICardReader reader, AlarmData alarmdata)
 {
     try{
         Console.WriteLine("DispatchAlarm!");
         DispatchAlarmEvent(alarmdata);
     }
     catch(Exception ex){
         Console.WriteLine(ex.Message + "," + ex.StackTrace);
     }
     //throw new NotImplementedException();
 }
Esempio n. 2
0
 public void DispatchAlarmEvent(AlarmData alarmdata)
 {
     try
     {
         foreach (RegisterInfo info in dictClientCallBacks.Values.ToArray())
         {
             if (info.IsRegistAlarm)
             {
                 Console.WriteLine("Call back!");
                 info.CallBack.SecureAlarm(alarmdata);
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message + "," + ex.StackTrace);
         ;}
 }
Esempio n. 3
0
        void CheckCardNotReturnTask()
        {
            SecureDBEntities1 db = new SecureDBEntities1();
            int  cnt= (from n in db.tblMagneticCard where n.ReturnDate == null && n.CardEndDate < DateTime.Now select n).Count();
            if (cnt > 0)
            {
                AlarmData adata = new AlarmData() { AlarmType = AlarmType.CARD, TimeStamp = DateTime.Now, Description = "卡片未歸還警報", ColorString = "Orange", IsForkCCTVEvent=false, PlaneID=-1 }
                    ;
                DispatchAlarmEvent(adata);
            }


        }