Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. namespace SendImg
  2. {
  3. class Program
  4. {
  5. static void Main(string[] args)
  6.  
  7. {
  8. String IP = args[0];
  9. String PUERTO = args[1];
  10. String RUTA = args[2];
  11. String TIPO = args[3];
  12.  
  13. Conexion Cte = new Conexion();
  14. Socket Cliente_bascula = Cte.conectar(IP, Int32.Parse(PUERTO));
  15.  
  16. if (Cliente_bascula != null && Cliente_bascula.Connected == true)
  17. {
  18. CommandTorrey myobj = new CommandTorrey();
  19. int iRtaFunct = myobj.TORREYSendImagesToScale(IP, RUTA, TIPO, Cliente_bascula);
  20.  
  21. if (iRtaFunct == 0)
  22. {
  23.  
  24. Console.WriteLine("La imagen se envio correctamente");
  25. }
  26. else
  27. {
  28. Console.WriteLine("Error en la transferencia de la imagen: " + iRtaFunct.ToString());
  29.  
  30. }
  31.  
  32. Cte.desconectar(ref Cliente_bascula);
  33. }
  34. else
  35. {
  36.  
  37. Console.WriteLine("No se pudo conectar a la bascula");
  38. }
  39.  
  40.  
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement