91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.02MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-09-03
  • 語言: C#
  • 標簽:

資源簡介

實在缺分,希望大家不要轉存哈,這里是我寫的播客,是對這套代碼的介紹及說明:http://www.cnblogs.com/bq-blog/articles/windowsservice.html

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Diagnostics;
using?System.Linq;
using?System.ServiceProcess;
using?System.Text;
using?System.Threading;
using?Common;

namespace?ListenService
{
????partial?class?DataMonitorService?:?Servicebase
????{
????????public?DataMonitorService()
????????{
????????????InitializeComponent();
????????}

????????private?ListenDataClass?sdc?=?new?ListenDataClass();
????????System.Timers.Timer?timer1;//計時器
????????protected?override?void?onstart(string[]?args)
????????{

????????????//?記錄服務啟動日志。
????????????LogTextHelper.Log(“服務啟動前準備.“);
????????????LogTextHelper.Log(“服務已經啟動,啟動時間:“?+?DateTime.Now.ToString(“yyyy-MM-dd?HH:mm:ss?“));
????????????//線程?檢查定時器
????????????if?(timer1?==?null)
????????????{
????????????????LogTextHelper.Log(“定時器null,開始初始化定時器“);
????????????????timer1?=?new?System.Timers.Timer();
????????????????//設置定時間隔時間,默認60秒,
????????????????int?SecondCount?=?60;
????????????????//獲取配置文件中的間隔時間,如果有將替換默認
????????????????string?sc?=?System.Configuration.ConfigurationManager.AppSettings[“syncSecond“];
????????????????if?(!string.IsNullOrEmpty(sc)?&&?ValidateUtil.IsNumber(sc))
????????????????{
????????????????????//將獲取配置文件的定時間隔?記錄下來???
????????????????????SecondCount?=?Convert.ToInt32(sc);
????????????????}
????????????????//1000毫秒=1秒,與定時間隔?相乘,計算共多少毫秒
????????????????timer1.Interval?=?1000?*?SecondCount;
????????????????//綁定監聽事件
????????????????timer1.Elapsed?+=?new?System.Timers.ElapsedEventHandler(sdc.SynData);
????????????????//啟動定時器
????????????????timer1.Enabled?=?true;
????????????????LogTextHelper.Log(“定時器初始化完成,定時器已經啟動。“);
????????????}
????????????else
????????????{
????????????????timer1.Enabled?=?true;
????????????????LogTextHelper.Log(“定時器初始化完成,定時器已經啟動。“);
????????????}
????????}

????????protected?override?void?onstop()
????????{
????????????//當服務結束時,結束定時器
????????????if?(timer1?!=?null)
????????????????timer1.Enabled?=?false;
????????????//?TODO:?在此處添加代碼以執行停止服務所需的關閉操作。
????????????LogTextHelper.Log(“服務已經結束,結束時間:“?+?DateTime.Now.ToString(“yyyy-MM-dd?HH:mm:ss?“));
????????}
????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????2081??2014-08-29?15:46??WcfServiceLibrary1\App.config

?????文件???????1179??2014-08-29?15:46??WcfServiceLibrary1\IService1.cs

?????文件???????6656??2014-08-29?15:46??WcfServiceLibrary1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件???????1369??2014-08-29?15:46??WcfServiceLibrary1\Properties\AssemblyInfo.cs

?????文件????????898??2014-08-29?15:46??WcfServiceLibrary1\Service1.cs

?????文件???????3181??2014-08-29?15:46??WcfServiceLibrary1\WcfServiceLibrary1.csproj

?????文件????????589??2014-08-29?15:46??WcfServiceLibrary1\WcfServiceLibrary1.csproj.user

?????文件????????257??2014-08-29?15:46??WcfServiceLibrary1\WcfServiceLibrary1.csproj.vspscc

?????文件???????3255??2014-08-29?17:01??ListenService.sln

?????文件????????256??2014-07-25?14:49??ListenService.vssscc

?????文件?????565248??2014-07-25?14:49??Library\GenericClass.Lib.dll

?????文件???????1155??2014-07-25?14:49??Library\log4net.config

?????文件?????288768??2014-07-25?14:49??Library\log4net.dll

?????文件?????161192??2014-07-25?14:49??Library\Microsoft.Practices.EnterpriseLibrary.Common.dll

?????文件??????90112??2014-07-25?14:49??Library\Microsoft.Practices.EnterpriseLibrary.Data.dll

?????文件??????64352??2014-07-25?14:49??Library\Microsoft.Practices.objectBuilder.dll

?????文件????????856??2016-08-04?10:21??ListenService\App.config

?????文件???????4612??2016-08-04?09:05??ListenService\Common\ConvertExtend.cs

?????文件??????27886??2016-08-04?09:05??ListenService\Common\ConvertHelper.cs

?????文件??????24319??2014-07-25?14:49??ListenService\Common\DBHelper.cs

?????文件???????1842??2016-08-04?09:00??ListenService\Common\LogTextHelper.cs

?????文件??????13221??2016-08-04?09:05??ListenService\Common\ValidateUtil.cs

?????文件???????2654??2016-08-04?09:04??ListenService\DataMonitorService.cs

?????文件???????1108??2014-07-25?14:49??ListenService\DataMonitorService.Designer.cs

?????文件????????155??2014-07-25?14:49??ListenService\Install.bat

?????文件???????4713??2016-08-04?09:05??ListenService\ListenService.csproj

?????文件????????257??2014-07-25?14:49??ListenService\ListenService.csproj.vspscc

?????文件????????716??2016-08-04?08:49??ListenService\obj\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????7374??2016-08-04?08:58??ListenService\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件???????1219??2016-08-04?09:07??ListenService\obj\Debug\ListenService.csproj.FileListAbsolute.txt

............此處省略107個文件信息

評論

共有 條評論