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

  • nc
    说明:  一个小巧的内存整理工具 无需安装方便使用(A small memory finishing tools without having to install user-friendly)
    2008-01-01 16:05:19下载
    积分:1
  • advanced-logging
    事件记录类,可直接包含事件记录类,可支持文件和窗口输出两种事件记录方式(Event log category, including event logging class directly, support documents and windows event log output of two ways)
    2011-08-14 08:15:48下载
    积分:1
  • Demo
    相当实用的windows设备管理程序,windows注册表相关信息(Very useful windows device manager, windows registry information)
    2012-08-07 20:15:08下载
    积分:1
  • C#实现获取并操作(启动、暂停、重启、停止)某台电脑 Windows 服务
    C#实现获取并操作某台电脑 的所有Windows 服务, 实现的功能有:选中某一个服务,然后对其进行 启动服务、暂停服务、停止服务、重启服务等操作
    2021-04-26 14:58:45下载
    积分:1
  • desquirr
    decompiler, ida的插件代码,可以反编译asm(Decompiler, Ida plug-in code, the compiler can be anti-asm)
    2006-06-26 14:22:06下载
    积分:1
  • luiliangfenxi
    简单的流量分析程序,用VC++编写,代码简练,方便理解。(Simple traffic analysis program written using VC++, code concise, easy to understand.)
    2010-12-22 20:20:42下载
    积分:1
  • adsl 自动拨号类 源码
    adsl 自动拨号类 源码
    2013-08-08下载
    积分:1
  • 串口调试工具源码
    【实例简介】
    2021-05-20 14:39:31下载
    积分:1
  • press_test
    用C++编写的系统压力测试程序,包括进程压力测试与线程压力测试。(Written in C++, system pressure testing procedures, including the process of stress testing and stress testing thread.)
    2016-05-07 19:01:34下载
    积分:1
  • C# 实现定时关机实例源码
    C# 实现定时关机实例
    2013-01-18下载
    积分:1
  • 696518资源总数
  • 106208会员总数
  • 21今日下载