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

  • hive
    注册表隐藏就是将系统呈现给用户的注册表信息进行修改,使得用户或检测工具无法直观地发现事实上存在的注册表内容。(Hide the system registry is presented to the user' s registry information is modified so that the user or detection tool will not intuitive to find that in fact exist in the registry contents.)
    2009-10-21 08:52:52下载
    积分:1
  • MSIIVP
    简单的聊天系统,本程序是使用vc进行编程的,可以学习的()
    2018-04-10 14:59:50下载
    积分:1
  • CDirectoryChangeWatcher
    一个目录变化监控类,空闲时间写的,方便调用,可扩展(A directory change monitoring class, free time to write, easy call, scalable)
    2021-01-11 14:28:50下载
    积分:1
  • udp & NAT(Network Address Translators)& P2P 实例源码下载
    首先先介绍一些基本概念:    NAT(Network Address Translators),网络地址转换:网络地址转换是在IP地址日益缺乏的情况下产生的,它的主要目的就是为了能够地址重用。NAT分为两大类,基本的NAT和NAPT(Network Address/Port Translator)。    最开始NAT是运行在路由器上的一个功能模块。        最先提出的是基本的NAT,它的产生基于如下事实:一个私有网络(域)中的节点中只有很少的节点需要与外网连接(呵呵,这是在上世纪90年代中期提出的)。那么这个子网中其实只有少数的节点需要全球唯一的IP地址,其他的节点的IP地址应该是可以重用的。    因此,基本的NAT实现的功能很简单,在子网内使用一个保留的IP子网段,这些IP对外是不可见的。子网内只有少数一些IP地址可以对应到真正全球唯一的IP地址。如果这些节点需要访问外部网络,那么基本NAT就负责将这个节点的子网内IP转化为一个全球唯一的IP然后发送出去。(基本的NAT会改变IP包中的原IP地址,但是不会改变IP包中的端口)
    2017-01-08下载
    积分:1
  • 105
    仁脸识别是机器视觉和模式识别领域最富有挑战性的课题之一,同时也具有较为广泛的应用意义。人脸识别技术是一个非常活跃的研究领域,它覆盖了数字图像处理、模式识别、计算机视觉、神经网络、心理学、生理学、数学等诸多学科的内容(Ren-face recognition is the field of machine vision and pattern recognition, one of the most challenging issues, but also a wide range of applications has more significance. Face recognition technology is a very active research field, which covers the digital image processing, pattern recognition, computer vision, neural networks, psychology, physiology, mathematics and many other disciplines content)
    2008-12-11 16:17:33下载
    积分:1
  • kbhook
    用VC开发的驱动级键盘钩子源码,可以用户获取记录按键信息(Drive-level keyboard hook source)
    2013-10-12 17:58:16下载
    积分:1
  • pigdjas67
    By throwing an exception to indicate the occurrence of an error(By throwing an exception to indicate the occurrence of an erro)
    2018-12-25 13:29:14下载
    积分:1
  • WMIDemo
    WMI查询操作是学习wmi不错的例子,还是值得推荐的(WMI query is learning wmi good example is worthy of recommendation)
    2014-01-03 22:10:53下载
    积分:1
  • C# QQ发送消息源码下载(亲测可用)
    C# QQ发送消息源码下载(亲测可用)
    2014-08-14下载
    积分: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资源总数
  • 106914会员总数
  • 0今日下载