private void AccessAndFill(TerminalDevice d) { oTerminal myTerminal = new oTerminal(d.IPAddress, d.ID, d.Port, d.AccKey); if (myTerminal.isAlive()) { d.SerialNumber = myTerminal.GetSerialNumber(); d.CurrentRegUsersCount = myTerminal.QueryCurrentRegUsers(); d.LogsCount = myTerminal.QueryNumberOfLog(); d.MaxLogs = myTerminal.QueryMaxAllowRegUsers(); d.MaxLogs = myTerminal.QueryMaxLogCapacity(); d.TerminalPassword = myTerminal.GetTerminalPassword(); d.WebLogOnPassword = myTerminal.GetWEBLogOnPassword(1); d.DateOfTerminal = myTerminal.QueryDateOfTheTerminal(); d.TimeOfTerminal = myTerminal.QueryTimeOfTheTerminal(); } }
public string GetDeviceInfo(TerminalDevice device) { StringBuilder infoBuilder = new StringBuilder(); oTerminal myTerminal = new oTerminal(device.IPAddress, device.ID, device.Port, device.AccKey); if (myTerminal.isAlive()) { infoBuilder.Append("Serial No: " + myTerminal.GetSerialNumber()); infoBuilder.Append("Current Reg. Users: " + myTerminal.QueryCurrentRegUsers().ToString()); infoBuilder.Append("Number of Log: " + myTerminal.QueryNumberOfLog().ToString()); infoBuilder.Append("Max. allow Reg. Users: " + myTerminal.QueryMaxAllowRegUsers().ToString()); infoBuilder.Append("Max. Log Capacity: " + myTerminal.QueryMaxLogCapacity().ToString()); infoBuilder.Append("Terminal Password: "******"WEB Password: "******"Date: " + myTerminal.QueryDateOfTheTerminal()); infoBuilder.Append("Time: " + myTerminal.QueryTimeOfTheTerminal()); } return(infoBuilder.ToString()); }