public void ImageChangeStop() { if (ImgTime != null) { ImgTime.TimeStop(); } if (ImgTimeStop != null) { ImgTimeStop.TimeStop(); } }
void MyLastSeatSumTime_TimeTo(object sender, EventArgs e) { MyLastSeatSumTime.TimeStop(); _LastSeatCount = TerminalOperatorService.LastSeatCount(ClientObject.ClientSetting.DeviceSetting.Rooms); OnPropertyChanged("LastSeat"); MyLastSeatSumTime.TimeStrat(); }
private void timeLoop_TimeTo(object sender, EventArgs e) { count--;//倒计时,count开始是15,每次减1 this.btnGetNo_Copy.Dispatcher.Invoke( //更换按钮上的文字开始 new Action( delegate { btnGetNo_Copy.Content = "刷卡中(" + count + ")"; } ) ); //更换按钮上的文字结束 if (count == 0) //如果15秒结束 { timeLoop.TimeTo -= new EventHandler(timeLoop_TimeTo); //注销定时器触发的事件 timeLoop.TimeStop(); //停止定时器 IsWork = false; //停止工作的标识 count = int.Parse(System.Configuration.ConfigurationManager.AppSettings["ReadCardCount"].ToString()); //重新初始化倒计时的数值 StopRead(); //停止读卡 //更换按钮上的文字开始 this.btnGetNo_Copy.Dispatcher.Invoke( new Action( delegate { btnGetNo_Copy.Content = "点击刷卡"; } ) );//更换按钮上的文字结束 } }
void MyCheckCodeTime_TimeTo(object sender, EventArgs e) { MyCheckCodeTime.TimeStop(); if (CodeChange != null) { CodeChange(); } MyCheckCodeTime.TimeStrat(); }
/// <summary> /// 时间达到监控处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void timeLoop_TimeTo(object sender, EventArgs e) { //停止计时 timeLoop.TimeStop(); try { //同步读者信息 readerSync.SysnceReaderInfo(ref readerInfoUpdated); } catch (Exception ex) { WriteLog.Write(string.Format("读者信息同步:服务执行遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } finally { //开始计时 timeLoop.TimeStrat(); } }
/// <summary> /// 时间达到监控处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void timeLoop_TimeTo(object sender, EventArgs e) { //停止计时 timeLoop.TimeStop(); try { try { //重新获取阅览室设置 SeatServerWatch.GetSetting(); } catch (Exception ex) { WriteLog.Write(string.Format("获取阅览室设置遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //开闭馆处理 SeatServerWatch.OpenCloseReadingRoom(); } catch (Exception ex) { WriteLog.Write(string.Format("开闭馆处理遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //超时处理(在座超时,预约超时,暂离超时,等待成功,违规记录过期) SeatServerWatch.OverTimeOperate(); } catch (Exception ex) { WriteLog.Write(string.Format("处理超时记录遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //异常锁定处理 SeatServerWatch.LockOverTime(); } catch (Exception ex) { WriteLog.Write(string.Format("解锁锁定座位遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //黑名单到时处理 SeatServerWatch.BlacklistOverTime(); } catch (Exception ex) { WriteLog.Write(string.Format("处理黑名单遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //违规记录超时处理 SeatServerWatch.ViolationRecordsOverTime(); } catch (Exception ex) { WriteLog.Write(string.Format("处理违规记录遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //删除过期媒体文件 //SeatServerWatch.MediaOverDate(); SeatServerWatch.AdvertOverTime(); } catch (Exception ex) { WriteLog.Write(string.Format("处理过期的媒体文件遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //读者库同步 SeatServerWatch.SysnceReaderInfo(ref ReaderInfoUpdated); } catch (Exception ex) { WriteLog.Write(string.Format("同步读者信息遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //进出记录统计 SeatServerWatch.EnterOutStatistics(ref EnterOutLogStatistic); } catch (Exception ex) { WriteLog.Write(string.Format("统计进出记录遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //删除一个月前的日志文件 WriteLog.DeleteLog(DateTime.Now.AddMonths(-1)); } catch (Exception ex) { WriteLog.Write(string.Format("删除过期日志文件遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } } catch (Exception ex) { WriteLog.Write(string.Format("服务执行遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } finally { //开始计时 timeLoop.TimeStrat(); } }
public void ImageChangeStop() { ImgTime.TimeStop(); ImgTimeStop.TimeStop(); ImgTimeStop.TimeStrat(); }
/// <summary> /// 暂停自动更新 /// </summary> public void StopUpdateConfig() { timeloop.TimeStop(); }
/// <summary> /// 时间达到监控处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void timeLoop_TimeTo(object sender, EventArgs e) { //停止计时 timeLoop.TimeStop(); try { try { //重新获取阅览室设置 monitorService.GetSetting(); } catch (Exception ex) { WriteLog.Write(string.Format("监控服务:获取阅览室设置遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //开闭馆处理 monitorService.OpenCloseReadingRoom(); } catch (Exception ex) { WriteLog.Write(string.Format("监控服务:开闭馆处理遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //超时处理(在座超时,预约超时,暂离超时,等待成功,违规记录过期) monitorService.EnterOutLogOperate(); } catch (Exception ex) { WriteLog.Write(string.Format("监控服务:处理超时记录遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //处理预约记录 monitorService.BeapeakLogOperating(); } catch (Exception ex) { WriteLog.Write(string.Format("监控服务:处理预约超时遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //异常锁定处理 monitorService.LockOverTime(); } catch (Exception ex) { WriteLog.Write(string.Format("监控服务:解锁锁定座位遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //黑名单到时处理 monitorService.BlacklistOperating(); } catch (Exception ex) { WriteLog.Write(string.Format("监控服务:处理黑名单遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //违规记录超时处理 monitorService.ViolationRecordsOperating(); } catch (Exception ex) { WriteLog.Write(string.Format("监控服务:处理违规记录遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } } catch (Exception ex) { WriteLog.Write(string.Format("监控服务:服务执行遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } finally { //开始计时 timeLoop.TimeStrat(); } }
/// <summary> /// 时间达到监控处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void timeLoop_TimeTo(object sender, EventArgs e) { //停止计时 timeLoop.TimeStop(); try { try { //统计进出记录 enterOutLogStatictics.Run(ref enterOutLogIsStatictics, runTime); } catch (Exception ex) { WriteLog.Write(string.Format("数据统计服务:删除过期广告遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //删除过期的广告 advertUsageStatistics.AdvertOverTime(); } catch (Exception ex) { WriteLog.Write(string.Format("数据统计服务:删除过期广告遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //阅览室人次统计 roomFlowStatictics.Run(ref roomFlowIsStatictics, runTime); } catch (Exception ex) { WriteLog.Write(string.Format("数据统计服务:统计阅览室人流量遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //阅览室使用情况统计 roomUsageStatictics.Run(ref roomUsageIsStatictics, runTime); } catch (Exception ex) { WriteLog.Write(string.Format("数据统计服务:统计阅览室使用情况遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //终端人次统计 terminalFlowStatistics.Run(ref terminalFlowIsStatistics, runTime); } catch (Exception ex) { WriteLog.Write(string.Format("数据统计服务:统计设备人流量遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } try { //终端使用情况统计 terminalUsageStatictics.Run(ref terminalUsageIsStatictics, runTime); } catch (Exception ex) { WriteLog.Write(string.Format("数据统计服务:统计设备使用情况遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } } catch (Exception ex) { WriteLog.Write(string.Format("数据统计服务:服务执行遇到错误,异常来自:{0},错误信息:{1}", ex.Source, ex.Message)); } finally { //开始计时 timeLoop.TimeStrat(); } }