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

  • Virtual-Desktop
    多虚拟桌面的实现!包括了多个虚拟桌面的管理,添加新的虚拟桌面等功能(Implementation of multiple virtual desktops! Including a number of virtual desktop management, adding new features such as virtual desktops)
    2011-09-28 23:52:43下载
    积分:1
  • 5932748
    Rle and huffman of the centralized coding and decoding()
    2017-11-08 07:12:09下载
    积分:1
  • DiskClean
    VC++垃圾文件清理工具源码,VC++垃圾文件清理工具源码(VC++ source code junk file cleanup tools, VC++ source code junk file cleanup tools)
    2011-05-25 21:19:53下载
    积分:1
  • c# 嵌入式开发 报警源码下载
    c# 嵌入式开发 报警系统源码下载
    2013-12-29下载
    积分:1
  • DISKSN
    修改硬盘序列号工具,可以用来修改硬盘序列号,对于绑定硬件的有用。(DISKSN TOOLS,FOR DISK SN,FOR WD ,FOR ,MATRIO,FOR SAMSUNG,FOR RI )
    2021-03-23 17:49:16下载
    积分:1
  • Regedit
    C++实现的读写注册表的功能,可以直接读取某个键的值,设定某个键的值和删除某个键的值,非常方便。(Read and write C++ implementation of the registry function, you can directly read the value of a key, set the value of a key to delete a key value, very convenient.)
    2013-10-27 19:41:13下载
    积分: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
  • SetDefaultPrinter
    说明:  通过修改,注册表,实现修改默认打印机功能(it is used to modify the setting of the defualted printer )
    2011-03-29 10:26:19下载
    积分:1
  • xuliehua
    vc基本序列化的程序源码,希望对大家有所帮助(vc basic sequence of the program source code, we want to help)
    2011-06-05 22:20:23下载
    积分:1
  • config
    config.c file from win2000 event log sources.
    2013-10-13 02:27:37下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载