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

  • 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
  • C# 仿任务管理器源码下载 实现了 cpu/内存/进/硬盘等实时数据
    C# 仿任务管理器源码下载 实现了 cpu/内存/进程/硬盘等实时数据
    2014-01-21下载
    积分:1
  • 通过C#自带的头文件(类)获取Windows信息
    通过C#通过的类获取系统/硬件信息 
    2020-12-10下载
    积分:1
  • UDF
    FLUENT中的源项UDF,初学UDF可以下载下来学学。(this is a source UDF,IF you want it you can download .thank you! )
    2020-12-05 15:39:22下载
    积分:1
  • 多线异步实例 Thread Async
    多线程、异步
    2012-12-27下载
    积分:1
  • easyshell
    不错的后门代码,用了一些驱动技术来隐藏进程,隐藏注册表,希望对大家有所帮助(good backdoor code, used some technology-driven process to conceal, hide the registry, and I hope to help everyone)
    2007-04-16 03:55:07下载
    积分:1
  • SendMessage模拟鼠标单击事件(在webbrowser网页实现) 实例完整源码
    一个利用winapi模拟鼠标单击webbrowser中网页实例
    2013-04-04下载
    积分:1
  • Power02
    读取电池电量,显示电量和剩余时间,根据电量的多少显示托盘,读写注册表,开机启动,新手程序,请多批评(Read battery, battery and remaining time display, display tray according to the amount of power, read and write registry, boot, novice program, like him to criticize)
    2011-08-11 14:10:26下载
    积分:1
  • C#做的 Windows启动项管理工具 源码实例
    Windows启动项管理软件, 可开通禁用启动项
    2013-01-18下载
    积分: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
  • 696518资源总数
  • 105885会员总数
  • 31今日下载