資源簡介
看門狗,采用C#編寫,使用了process 就是監控程序,發生異常的時候可以有及時響應
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Diagnostics;
namespace?WatchDog
{
????class?AddCv
????{
????????public?int?Prosec;
????????public?string?Proname;
????????public?AddCv(string?proname?int?prosec)
????????{
????????????Prosec?=?prosec;
????????????Proname?=?proname;
????????}
????}
????class?Monitor
????{
????????public?static?bool?p_active?=?true;
????????private?static?string?n_pronames;
????????private?static?int?monsec=0;
????????public?bool?pactive
????????{
????????????set?{?p_active?=?value;?}
????????}
????????public?string?pronames
????????{
????????????set?
????????????{
????????????????n_pronames?=?value;
????????????????if(monsec==0)
????????????????monsec?=?1000;
????????????????ProcessMonitor(n_pr
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????260??2012-06-28?13:04??WatchDog\WatchDog\WatchDog\bin\Debug\conf.xm
?????文件???????8192??2012-06-28?12:15??WatchDog\WatchDog\WatchDog\bin\Debug\WatchDog.exe
?????文件??????26112??2012-06-28?12:15??WatchDog\WatchDog\WatchDog\bin\Debug\WatchDog.pdb
?????文件??????11608??2012-06-28?12:19??WatchDog\WatchDog\WatchDog\bin\Debug\WatchDog.vshost.exe
?????文件????????490??2010-03-17?22:39??WatchDog\WatchDog\WatchDog\bin\Debug\WatchDog.vshost.exe.manifest
?????文件????????149??2012-06-28?15:38??WatchDog\WatchDog\WatchDog\bin\Release\conf.xm
?????文件??????10240??2012-07-06?15:23??WatchDog\WatchDog\WatchDog\bin\Release\WatchDog.exe
?????文件??????26112??2012-07-06?15:23??WatchDog\WatchDog\WatchDog\bin\Release\WatchDog.pdb
?????文件??????11608??2012-07-06?14:37??WatchDog\WatchDog\WatchDog\bin\Release\WatchDog.vshost.exe
?????文件????????490??2010-03-17?22:39??WatchDog\WatchDog\WatchDog\bin\Release\WatchDog.vshost.exe.manifest
?????文件???????3222??2012-07-06?15:23??WatchDog\WatchDog\WatchDog\Monitor.cs
?????文件???????1383??2012-06-28?13:08??WatchDog\WatchDog\WatchDog\MyLog.cs
?????文件???????4021??2012-06-28?13:08??WatchDog\WatchDog\WatchDog\Myxm
?????文件???????5032??2012-06-28?12:15??WatchDog\WatchDog\WatchDog\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????395??2012-06-28?12:19??WatchDog\WatchDog\WatchDog\obj\x86\Debug\WatchDog.csproj.FileListAbsolute.txt
?????文件???????8192??2012-06-28?12:15??WatchDog\WatchDog\WatchDog\obj\x86\Debug\WatchDog.exe
?????文件??????26112??2012-06-28?12:15??WatchDog\WatchDog\WatchDog\obj\x86\Debug\WatchDog.pdb
?????文件???????5036??2012-07-06?15:23??WatchDog\WatchDog\WatchDog\obj\x86\Release\DesignTimeResolveAssemblyReferencesInput.cache
?????文件????????405??2012-07-06?15:23??WatchDog\WatchDog\WatchDog\obj\x86\Release\WatchDog.csproj.FileListAbsolute.txt
?????文件??????10240??2012-07-06?15:23??WatchDog\WatchDog\WatchDog\obj\x86\Release\WatchDog.exe
?????文件??????26112??2012-07-06?15:23??WatchDog\WatchDog\WatchDog\obj\x86\Release\WatchDog.pdb
?????文件???????3949??2012-07-06?15:23??WatchDog\WatchDog\WatchDog\Program.cs
?????文件???????1348??2012-06-27?14:25??WatchDog\WatchDog\WatchDog\Properties\AssemblyInfo.cs
?????文件???????2295??2012-06-28?10:41??WatchDog\WatchDog\WatchDog\WatchDog.csproj
?????文件????????866??2012-06-27?14:25??WatchDog\WatchDog\WatchDog.sln
????..A..H.?????19456??2012-06-28?17:11??WatchDog\WatchDog\WatchDog.suo
?????文件??????11776??2012-06-28?13:34??WatchDog\WatchDogServer\WDServer\WDServer\bin\Debug\WDServer.exe
?????文件??????32256??2012-06-28?13:34??WatchDog\WatchDogServer\WDServer\WDServer\bin\Debug\WDServer.pdb
?????文件??????11608??2012-06-28?13:11??WatchDog\WatchDogServer\WDServer\WDServer\bin\Debug\WDServer.vshost.exe
?????文件????????490??2010-03-17?22:39??WatchDog\WatchDogServer\WDServer\WDServer\bin\Debug\WDServer.vshost.exe.manifest
............此處省略67個文件信息
- 上一篇:C#微信企業號發送消息Sample
- 下一篇:用C#寫的一個截圖程序(附gif錄制)
評論
共有 條評論