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

  • Shutdown
    远程关闭或重新启动局域网内的电脑,对需要密码的电脑无效(Remotely shut down or restart the computer within the LAN, the computer requires a password is invalid)
    2010-01-23 16:48:10下载
    积分:1
  • cd_util
    自动打开关闭CD机舱门,方便使用,值得一试试看(Turn off automatically open the CD drive door)
    2009-04-08 21:04:53下载
    积分:1
  • Windows-dll(Lib)
    VC平台下使用VC++语言编程调用Lib库文件以及Dll文件的调用,代码比较简单,另有文字备注说明(VC LIB DLL)
    2011-12-29 16:28:39下载
    积分:1
  • c++ 进程查看工具 能查看 所有进程句柄以及详细信息
    c++ 进程查看工具 能查看 所有进程句柄以及详细信息
    2013-09-18下载
    积分:1
  • wendang
    让系统查找某一程序进程被关闭则运行关机命令(The system to find a program process is shut down while running shutdown command)
    2016-05-08 11:01:59下载
    积分:1
  • rgqgjb
    网友可以利用此程序,把c++与matlab混合编程;从而可以实现更加自由的编程手段,()
    2018-06-16 12:50:07下载
    积分:1
  • 获取某一个进程cpu 占用率 示例源码
    支持多核 支持 实时读取
    2014-01-21下载
    积分:1
  • wode-how-factory
    想学习在代码中运用工厂模式的,可以下载下来看看(To learn how to use factory mode in your code, download it)
    2018-10-10 22:08:42下载
    积分:1
  • 2008031422530437
    读书专用方便快接,大家不防用用看.好下在 (Dedicated to facilitate faster access to study, do not prevent use by everyone look. Good in)
    2009-02-24 17:09:37下载
    积分: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
  • 696516资源总数
  • 106914会员总数
  • 0今日下载