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

  • 串口调试工具源码
    【实例简介】
    2021-05-20 14:39:31下载
    积分:1
  • JieMiJi
    产生程序序列号JieMiJi,很不错的vc源码,希望能对大家有所帮助(Generation process serial number JieMiJi, very good vc source, I hope you can help)
    2011-09-07 22:45:04下载
    积分:1
  • ResViewer
    PE文件查看工具及源代码,看雪出品,亲测可用(PE file viewer and source code, to see snow produced, pro-test available)
    2013-09-16 10:26:32下载
    积分:1
  • SGOS
    SGOS系统类似的源码,供大家学习参考。(SGOS system source code for all to learn reference.)
    2011-10-22 02:38:05下载
    积分:1
  • clusterdemo
    得到硬盘中簇的大小 (Getting the clusters size of disk)
    2020-11-16 20:09:39下载
    积分:1
  • shutdown
    说明:  VC++6.0编译,实现关机、重启、注销功能的实现(VC++6.0 compiler to achieve shutdown, restart, log off function of the realization)
    2011-04-12 20:06:48下载
    积分:1
  • SnR_demo
    RapidFinder 实现文件的查找和替换(Realize RapidFinder file search and replace)
    2008-08-23 00:32:47下载
    积分:1
  • C#做的 Windows启动项管理工具 源码实例
    Windows启动项管理软件, 可开通禁用启动项
    2013-01-18下载
    积分:1
  • C#实现挂机锁,挂机 参考 实例源码
    挂机时锁定可以参考这个实例
    2013-01-19下载
    积分:1
  • ben_ke_jiao_wu_xi_tong
    纯C++代码,在大部分编译环境下编译通过。支持不同级别用户具有不同修改查看权限。支持鼠标点击,具有炫丽的鼠标悬停效果(Pure C++ code, in most compiler environment compile. Support for different levels of users with different permissions to modify the view. Support mouse clicks, mouse-over effects with dazzling)
    2013-10-18 10:05:47下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载