private static void StartUpService() { try { pipeMessageData <object> message = new pipeMessageData <object>(); message.Type = pipeMessageType.StartRemote; pipeMessage pipe = new pipeMessage(); pipe.SendRequest(message); } catch (Exception) { } }
protected override void OnStart(string[] args) { //********************************************** pipeMessage pipes = new pipeMessage(); pipes.onMessage += Pipes_onMessage; pipes.StartPipeServer(); //******定时检测客户端有没有启动**************************************** //Task.Run(() => //{ // if (this.watchProcessRunning == true) // { // return; // } // this.watchProcessRunning = true; // while (watchProcessRunning) // { // this.StartupRemoteWindow(); // Thread.Sleep(60000); // } //}); this.StartupRemoteWindow(); }