teixeira
Well-known member
Hi All,
I wanna make a class to check when my printer is connected or disconnected from the network.
This is for prevent user to send a job without the printer beeing online, and with this i wanna show some alarms.
This is using a normal socket connection, and im pinging the printer when i start the program and when im ready to send a job to it.
I use the ping class and after the event has been PingCompleted raisen, i wanna make some actions, until here all well, but as the ping request is sent
assincronously i having some problems, because i wanna wait for ping status before i go ahead, see my code:
I wanna make a class to check when my printer is connected or disconnected from the network.
This is for prevent user to send a job without the printer beeing online, and with this i wanna show some alarms.
This is using a normal socket connection, and im pinging the printer when i start the program and when im ready to send a job to it.
I use the ping class and after the event has been PingCompleted raisen, i wanna make some actions, until here all well, but as the ping request is sent
assincronously i having some problems, because i wanna wait for ping status before i go ahead, see my code:
Code:
/// <summary>
/// Pinga a Impressora com 32Bytes de lixo e espera o echo da mensagem para verificar se est