{          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 315
下载积分: 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 个回复

  • DumpEC
    使用WinIO访问笔记本EC的所有寄存器和存储空间。本程序适用ENE EC KB3926(EC laptop using WinIO access to all registers and storage space. This procedure applies to ENE EC KB3926)
    2021-01-14 20:58:47下载
    积分:1
  • adsl 自动拨号类 源码
    adsl 自动拨号类 源码
    2013-08-08下载
    积分:1
  • secondwatch2
    毫秒计时程序(millisecond time procedure)
    2005-01-15 21:00:37下载
    积分:1
  • a
    说明:  得到函数地址的程序,菜鸟级产品不要笑我 刚学驱动(Adress Of function)
    2009-06-24 10:28:07下载
    积分:1
  • Process-Management
    编写程序,要求父进程创建一个子进程,子进程对一个50*50的字符数组赋值,由父进程改变子进程的优先级,观察不同优先级进程使用CPU的时间(Written procedures that require the parent process creates a child process, the child process on a 50* 50 array of characters assigned by the parent process to change the priority of the child process, observe the different priorities of CPU time used by the process)
    2016-05-07 19:10:26下载
    积分: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
  • SnR_demo
    RapidFinder 实现文件的查找和替换(Realize RapidFinder file search and replace)
    2008-08-23 00:32:47下载
    积分:1
  • cpu
    基于CpuUsage的CPU空闲时工作构思,就是当CPU有空时,才能进行自己程序的大量数据处理命令,找了好久,找到这个,并加以10个时间的查询,如都是有空,才说有空.分享给有这方面需要的朋友,抛砖引玉.(CpuUsage the CPU idle time based on the idea work, free time is when the CPU can process large amounts of data for their own processing order, looking for a long time to find this, and make inquiries 10 hours, such as are available, only that there empty. to share a need, a friend, start a discussion.)
    2011-09-16 15:04:46下载
    积分:1
  • DLL_CALL
    该源代码是我精心为朋友准备的,涵盖了各种调用方式和编译方式,花了半个月的业余时间,很高贵啊(The source code is for a friend I painstakingly prepared, covering a variety of ways and the compiler calls the way of spare time to spend half a month, a high贵啊)
    2009-04-21 19:09:20下载
    积分:1
  • C#自动更新服务(本地服务安装)
    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
    2015-03-11下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载