/// <summary>
 /// 时间到达时触发
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void t_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
 {
     t.Stop();
     try
     {
         SeatManage.ClassModel.TerminalInfoV2 terminal = SeatManage.Bll.TerminalOperatorService.GetTeminalSetting(PlayerSetting.DeviceNo);
         if (terminal.IsUpdatePlayList)
         {
             if (UpdatePlaylist != null)
             {
                 UpdatePlaylist(this, "");
             }
         }
     }
     catch (Exception ex)
     {
         if (Error != null)
         {
             Error(this, ex.Message);
         }
     }
     finally
     {
         t.Start();
     }
 }
        /// <summary>
        /// 时间到达时触发
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void t_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            t.Stop();

            //编辑文件名
            string imagefilepath = PlayerSetting.ImagelocadPath;

            if (imagefilepath.Length - 1 != imagefilepath.LastIndexOf("\\"))
            {
                imagefilepath += "\\" + PlayerSetting.SchoolNo + PlayerSetting.DeviceNo + ".jpg";
            }
            else
            {
                imagefilepath += PlayerSetting.SchoolNo + PlayerSetting.DeviceNo + ".jpg";
            }
            try
            {
                //获取截图
                AMS.Mediaplayer.Caputre.Caputre.Capture(imagefilepath);
                SeatManage.Bll.FileOperate fileOperate = new SeatManage.Bll.FileOperate();
                fileOperate.UpdateFile(imagefilepath, string.Format("{0}{1}.jpg", PlayerSetting.SchoolNo, PlayerSetting.DeviceNo), SeatManage.EnumType.SeatManageSubsystem.Caputre);
            }
            catch (Exception ex)
            {
                SeatManage.SeatManageComm.WriteLog.Write("设备截图失败:" + ex.Message);
            }
            try
            {
                //更新数据库状态
                SeatManage.ClassModel.TerminalInfoV2 terminal = SeatManage.Bll.TerminalOperatorService.GetTeminalSetting(PlayerSetting.DeviceNo); //AMS.AdvertisementManage_DAL.AMS_Device_DAL.UpdataDeviceStatus(_DeviceNo, "ScreenCaputre/" + _DeviceNo + ".jpg");
                terminal.ScreenshotPath   = string.Format("{0}{1}.jpg", PlayerSetting.SchoolNo, PlayerSetting.DeviceNo);
                terminal.StatusUpdateTime = SeatManage.Bll.ServiceDateTime.Now;
                SeatManage.Bll.TerminalOperatorService.UpdateTeminalSetting(terminal);
            }
            catch (Exception ex)
            {
                SeatManage.SeatManageComm.WriteLog.Write("上传设备运行状态失败:" + ex.Message);
            }
            finally
            {
                t.Start();
            }
        }