Beispiel #1
0
 public Watchdog()
 {
     _stopwatch = new Stopwatch();
     _tcpServer = new TCP_Server(1983);
     _tcpServer.AppDontReply += new Action(OnAppDontReplyOrHang);
     StartWatchingApplication();
 }
Beispiel #2
0
        public Windows()
        {
            MainClass.HideTaskbar();
            MainClass.HideDesktop();
            _stopwatch = new Stopwatch();
            _tcpServer = new TCP_Server();
            _tcpServer.AppDontReply += new Action(_tcpServer_AppDontReply);
            _selfId         = Process.GetCurrentProcess().Id;
            _timer          = new Timer(5000);
            _timer.Elapsed += new ElapsedEventHandler(Tick);

            /*while (true)
             *  {
             *      Thread.Sleep(30000);
             *      if (Ping()) break;
             *  }*/
            Thread.Sleep(10000);
            StartPayment();
        }