diff --git a/Model/ModelPatrol.cs b/Model/ModelPatrol.cs index 1c252a7..2566f95 100644 --- a/Model/ModelPatrol.cs +++ b/Model/ModelPatrol.cs @@ -18,6 +18,17 @@ namespace Emergency_platform{ ExecutePatrol(e,sender,protocol); }); this.EGOnMessage(); + GetStatusDelay(); + + } + public async void GetStatusDelay(){ + await Task.Delay(20000); + GuiDaoJiRet gui = TcpClientWrapper.SendDataRead(); + while(gui == null){ + await Task.Delay(5000); + gui = TcpClientWrapper.SendDataRead(); + } + Console.WriteLine("type = " + gui.data.type,"pos = " + gui.data.x + " , " + gui.data.y); } public async void ExecutePatrol(ResponsePatrol responsePatrol,string sender,ProtocolType protocolType){