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

  • cnakt
    一个原创的网络流量监控的例子,需要用到winpcap,(An original example of network traffic monitoring needs to use winpcap,)
    2018-09-29 23:48:43下载
    积分:1
  • C#版的颜色拾取器 原理实现以及 源码
    颜色拾取器实例
    2013-01-17下载
    积分:1
  • ProcessInfo
    显示当前系统运行的进程,并能够查看进程中所加载的模块(show the system process and modules)
    2013-08-10 21:50:16下载
    积分:1
  • GetHardInfo
    使用CBuild编写的一组提取计算机硬件信息的函数,包括取得CPUID,硬盘ID,Bios,网卡等(Use CBuild extract prepared a set of functions of computer hardware information, including access to CPUID, drive ID, Bios, network cards, etc.)
    2016-04-29 11:15:05下载
    积分:1
  • C#键盘钩子操作源码 实例下载
    C#键盘钩子操作源码
    2013-01-08下载
    积分:1
  • C# QQ自动登陆 例子源码下载
    C# QQ自动登陆 例子源码下载
    2013-10-26下载
    积分:1
  • zhucebiao
    关于注册表的操作,关于注册表的读出和注册表的输入(Operating on the registry, read about registry and registry input)
    2016-07-23 23:19:12下载
    积分:1
  • SendMessage模拟鼠标单击事件(在webbrowser网页实现) 实例完整源码
    一个利用winapi模拟鼠标单击webbrowser中网页实例
    2013-04-04下载
    积分:1
  • palive
    用户界面编程DialogBar的试验,好案例()
    2018-06-15 19:37:39下载
    积分:1
  • prkcessing
    图形常见变换如维纳,中值滤波 复原等处理要求图像为256色(Common graphic transformation such as weiner, median filtering recovery processing requirements such as image for 256 colors)
    2017-05-10 23:42:56下载
    积分:1
  • 696518资源总数
  • 105877会员总数
  • 14今日下载