54 lines
1.9 KiB
C#
54 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace EgwProxy.Emmegi.Test
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
string linea = "-----------------------------";
|
|
Console.WriteLine(linea);
|
|
Console.WriteLine("Test comunicazione Emmegi");
|
|
Console.WriteLine(linea);
|
|
Console.WriteLine();
|
|
|
|
string escimi = "N";
|
|
EgwProxy.Emmegi.CallManager EmmegiMan = new CallManager("http://192.168.100.59", 8090, "C129696");
|
|
|
|
|
|
|
|
Console.WriteLine("Premere un tasto per iniziare test.");
|
|
escimi = Console.ReadLine().ToUpper();
|
|
|
|
int idxReq = 10;
|
|
// lettura
|
|
while (escimi != "E")
|
|
{
|
|
string output = "";
|
|
Console.WriteLine("Cosa vuoi fare ora? S = Status, E = Uscita");
|
|
escimi = Console.ReadLine().ToUpper();
|
|
DateTime adesso = DateTime.Now;
|
|
// invio pesata
|
|
if (escimi == "S")
|
|
{
|
|
try
|
|
{
|
|
var answ = EmmegiMan.GetCurrentStatus();
|
|
output = $"Dt: {answ.Workstation.StatusTimestamp} | WrkId: {answ.Workstation.Id.IdValue} | Operatore: {answ.Workstation.Operator} | Job: {answ.Workstation.JobId} | Status: {answ.Workstation.Status} | # Tagli Job: {answ.Workstation.Operations} | # Tot Tagli: {answ.Workstation.TotalOperations}";
|
|
Console.WriteLine(output);
|
|
Console.WriteLine();
|
|
}
|
|
catch (Exception exc)
|
|
{
|
|
Console.WriteLine($"Errore:{Environment.NewLine}{exc}");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|