Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace SendImg
- {
- class Program
- {
- static void Main(string[] args)
- {
- String IP = args[0];
- String PUERTO = args[1];
- String RUTA = args[2];
- String TIPO = args[3];
- Conexion Cte = new Conexion();
- Socket Cliente_bascula = Cte.conectar(IP, Int32.Parse(PUERTO));
- if (Cliente_bascula != null && Cliente_bascula.Connected == true)
- {
- CommandTorrey myobj = new CommandTorrey();
- int iRtaFunct = myobj.TORREYSendImagesToScale(IP, RUTA, TIPO, Cliente_bascula);
- if (iRtaFunct == 0)
- {
- Console.WriteLine("La imagen se envio correctamente");
- }
- else
- {
- Console.WriteLine("Error en la transferencia de la imagen: " + iRtaFunct.ToString());
- }
- Cte.desconectar(ref Cliente_bascula);
- }
- else
- {
- Console.WriteLine("No se pudo conectar a la bascula");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement