Browse Source

fixed status get

master
Z 8 months ago
parent
commit
23191ad836
  1. 11
      Model/ModelPatrol.cs

11
Model/ModelPatrol.cs

@ -18,6 +18,17 @@ namespace Emergency_platform{ @@ -18,6 +18,17 @@ namespace Emergency_platform{
ExecutePatrol(e,sender,protocol);
});
this.EGOnMessage<ResponsePatrol>();
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){

Loading…
Cancel
Save