{          inttimeHour=DateTime.Now.Hour;          if(timeHour==3)            stata=0;          #region更新学生基本信息          if(studentbegintime<=timeHour&&timeHour         {          inttimeHour=DateTime.Now.Hour;          if(timeHour==3)            stata=0;          #region更新学生基本信息          if(studentbegintime<=timeHour&&timeHour
登录
首页 » C# » C#自动更新服务(本地服务安装)

C#自动更新服务(本地服务安装)

于 2015-03-11 发布
0 310
下载积分: 1 下载次数: 0

代码说明:

using System;using System.Collections.Generic;using System.Linq;using System.Text;using Common.WinService;using Common.Log;using System.Threading;using Common.Net;using System.Text.RegularExpressions;namespace Collection.AutoRunner{    //获取学生信息    public class Service_Update_Data : IWindowsService    {        private ILogWriter _logWriter = null;        private const string logCategory = "Services.Info";        private string logInfoSource = "Update_Data";        private const string logErrorCategory = "Services.Error";        private const string logErrorSource = "Update_Data_Error";        private bool BeStop = true;        private System.Timers.Timer timer = null;        public void Start(Common.Log.ILogWriter logWriter, string gameCode)        {            gameCode = gameCode.ToUpper();            logInfoSource = gameCode;            _logWriter = logWriter;            BeStop = false;            StartRequestData();        }        int stata = 0;        private void StartRequestData()        {            try            {                #region 配置                //时间频率                var UpdateStudentSpan = ServiceHelper.GetInterval("UpdateData");                //更新学生开始时间                var studentbegintime = ServiceHelper.GetInterval("StudentBeginTime");                //更新学生结束时间                var studentendtime = ServiceHelper.GetInterval("StudentEndTime");                    //是否更新学生基本信息:true为更新 false为不更新                var IsUpdateStudnet =Convert.ToBoolean(ServiceHelper.GetSystemConfig("IsUpdateStudnet"));                                #endregion                timer = ServiceHelper.ExcuteByTimer(UpdateStudentSpan, () =>                {                    int timeHour = DateTime.Now.Hour;                    if (timeHour == 3)                        stata = 0;                    #region 更新学生基本信息                    if (studentbegintime

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • HookIE01
    上网限制:通过添加应用程序黑白名单,禁止或者允许学生机访问指定的网址。(Internet Restrictions: black list by adding an application to prohibit or allow students to access the specified URL.)
    2013-08-13 13:24:32下载
    积分:1
  • ADXL355加速度示例(ADXL355.c)
    STM32 IO口模拟SPI通讯
    2021-05-07下载
    积分:1
  • C#操作窗口类(句柄操作)
    C#操作窗口类(句柄操作)
    2013-10-31下载
    积分:1
  • xhhyvv
    system权限下,创建远程线程将dll注入用户进程,以用户身份发送消息(System permissions, will create a remote thread DLL injection user process, send a message to the user identity)
    2017-06-02 08:51:05下载
    积分:1
  • MSIIVP
    简单的聊天系统,本程序是使用vc进行编程的,可以学习的()
    2018-04-10 14:59:50下载
    积分:1
  • 一个读取硬盘序列号与CPU序列号的DLL
    VC写的,一个读取硬盘序列号与CPU序列号的DLL,大家可以利用它来为自己的软件提供保护机制。(VC written by a reader drives and CPU serial number sequence, the DLL, you can use it for its own software to provide protection mechanisms.)
    2005-05-02 16:36:26下载
    积分:1
  • Registry
    修改操作系统注册表,包括实例简介,创建过程,运行效果等等。(Modify the operating system registry, including examples of profiles, the creation process, run the effect and so on.)
    2008-03-31 20:59:54下载
    积分:1
  • OD1.1插件源码
    【实例简介】 C 写的ollydbg插件源码
    2021-08-06 00:31:06下载
    积分:1
  • OpenNI开发的人体姿势跟踪 示例源码
    使用OpenNI开发的人体姿势跟踪,通过跟踪人的右手动作,转动一个3D立方体。 需要下载安装 http://www.openni.org/wp-content/uploads/2013/07/OpenNI-Windows-x86-2.2.zip 
    2013-10-07下载
    积分:1
  • 7.3
    修改系统寄存器 在UEFI的环境下,,,,,,(Modify System Register)
    2020-06-22 05:20:02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载