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

  • ResViewer
    PE文件查看工具及源代码,看雪出品,亲测可用(PE file viewer and source code, to see snow produced, pro-test available)
    2013-09-16 10:26:32下载
    积分:1
  • Cleanupregistry
    清理注册表:清理注册表中的冗余项,定期清洁电脑,程序简短,功能强大(Clean up the registry: clean up redundant registry entries, clean your computer on a regular basis, the program brief, powerful)
    2013-04-23 22:05:26下载
    积分:1
  • SamplePreview
    机器视觉相机中驱动使用例子,在机器视应用中非常有用,适合学习,希望对大家有帮助。(Machine vision camera driver uses the example, depending on the machine is very useful in applications for learn, we want to help.)
    2016-10-10 22:25:25下载
    积分:1
  • C# 32路继电器控制源码
    C# 32路继电器控制源码
    2019-10-22下载
    积分:1
  • WindowsAPI消息大全
    目前网上的WindowsMessage基本上都是WM_开头的,本文档汇集了所有类型的Windows消息及其对应的16进制字面量,包括ComboBox、ListView等等控件,并附带简短说明(All Windows Messages and consts)
    2020-06-22 13:00:02下载
    积分:1
  • C# CPUTemperature 实例源码下载
    C# CPUTemperature 实例源码下载
    2015-02-05下载
    积分:1
  • C#抓取IE浏览器网站整体截图实例源码
    C#抓取整个网站为一个图片
    2013-01-17下载
    积分:1
  • C# 实现定时关机实例源码
    C# 实现定时关机实例
    2013-01-18下载
    积分:1
  • c# 切换windows桌面背景
    c# 切换windows桌面背景
    2013-07-19下载
    积分:1
  • Src1
    这是一个SDK程序。本程序跟踪显示鼠标的坐标位置,同时,若有鼠标操作,可在窗口标题栏中显示操作信息,要是在窗口客户区中进行双击,就会在双击位置点上显示位置信息。 (This is an SDK program. This procedure tracking shows the coordinates of the mouse position, and if the mouse can be displayed in the window s title bar operating information, if the customer area of the window to double-click, double-click the location of points will be shown on location information.)
    2004-06-08 19:27:00下载
    积分:1
  • 696516资源总数
  • 106641会员总数
  • 4今日下载