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

  • 7.3
    修改系统寄存器 在UEFI的环境下,,,,,,(Modify System Register)
    2020-06-22 05:20:02下载
    积分:1
  • DISKSN
    修改硬盘序列号工具,可以用来修改硬盘序列号,对于绑定硬件的有用。(DISKSN TOOLS,FOR DISK SN,FOR WD ,FOR ,MATRIO,FOR SAMSUNG,FOR RI )
    2021-03-23 17:49:16下载
    积分:1
  • jiaotong
    简易的全国交通管理查询系统,包括列车查询系统和航班查询系统。它有查询城市,查询车次,查询航班等功能。(Simple national traffic management query system, including the train inquiry system and flight inquiry system. It has the query city, query trips, check flight.)
    2013-05-17 15:55:54下载
    积分:1
  • Mouse
    该程序能够改变鼠标形状,是一个非常好的例子.(The program can change the mouse shape is a very good example.)
    2009-12-02 18:49:35下载
    积分:1
  • 3242
    数字图像处理实习代码,包括图像转换,灰度变换、几何变换.....(Digital image processing practical code, including image conversion, gray-scale transformation, geometric transformation .....)
    2010-03-06 18:04:23下载
    积分:1
  • zhucebiao
    关于注册表的操作,关于注册表的读出和注册表的输入(Operating on the registry, read about registry and registry input)
    2016-07-23 23:19:12下载
    积分:1
  • C# 查看剪贴板内容 以及粘贴内容到剪贴板实例代码
    winform剪贴板常用操作
    2013-02-11下载
    积分:1
  • 95665122
    想看看鼎鼎大名的雷电的源代码吗?哈哈,下了就知道了,很爽吧()
    2018-02-24 09:29:15下载
    积分:1
  • desquirr
    decompiler, ida的插件代码,可以反编译asm(Decompiler, Ida plug-in code, the compiler can be anti-asm)
    2006-06-26 14:22:06下载
    积分:1
  • WinKey
    这是一个通过冻结winlogon程序实现的屏蔽win7下ctl+alt+del键的功能,仔细看,不别乱喷。(this is a app to keep out the win key!)
    2016-06-17 17:14:36下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载