• 大小: 0.14M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: 程序  源码  

资源简介

看门狗,采用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.xml

     文件       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.xml

     文件      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\Myxml.cs

     文件       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个文件信息

评论

共有 条评论