1.1 --- a/Server/CecClient.cs Tue Jul 19 15:43:04 2016 +0200
1.2 +++ b/Server/CecClient.cs Tue Jul 19 17:01:21 2016 +0200
1.3 @@ -142,7 +142,7 @@
1.4
1.5 public override int ReceiveCommand(CecCommand command)
1.6 {
1.7 - Console.WriteLine(string.Format("CEC command Src:{0} Dst:{1} Ack: {2} Eom: {3} OpcodeSet: {4} Opcode: {5} Timeout: {6}",
1.8 + Console.WriteLine(string.Format("CEC command '{5}' from {0} to {1} - Ack: {2} Eom: {3} OpcodeSet: {4} Timeout: {6}",
1.9 iLib.ToString(command.Initiator),
1.10 iLib.ToString(command.Destination),
1.11 command.Ack.ToString(),
1.12 @@ -302,8 +302,9 @@
1.13 /// </summary>
1.14 public void Scan()
1.15 {
1.16 - Console.WriteLine("CEC bus information");
1.17 - Console.WriteLine("===================");
1.18 + string scanRes = "";
1.19 + scanRes += "CEC bus information\n";
1.20 + scanRes += "===================\n";
1.21 CecLogicalAddresses addresses = Lib.GetActiveDevices();
1.22 for (int iPtr = 0; iPtr < addresses.Addresses.Length; iPtr++)
1.23 {
1.24 @@ -320,17 +321,19 @@
1.25 string osdName = Lib.GetDeviceOSDName(address);
1.26 string lang = Lib.GetDeviceMenuLanguage(address);
1.27
1.28 - Console.WriteLine("device #" + iPtr + ": " + Lib.ToString(address));
1.29 - Console.WriteLine("address: " + strAddr);
1.30 - Console.WriteLine("active source: " + (bActive ? "yes" : "no"));
1.31 - Console.WriteLine("vendor: " + Lib.ToString(iVendorId));
1.32 - Console.WriteLine("osd string: " + osdName);
1.33 - Console.WriteLine("CEC version: " + Lib.ToString(iCecVersion));
1.34 - Console.WriteLine("power status: " + Lib.ToString(power));
1.35 + scanRes += "device #" + iPtr + ": " + Lib.ToString(address) + "\n";
1.36 + scanRes += "address: " + strAddr + "\n";
1.37 + scanRes += "active source: " + (bActive ? "yes" : "no") + "\n";
1.38 + scanRes += "vendor: " + Lib.ToString(iVendorId) + "\n";
1.39 + scanRes += "osd string: " + osdName + "\n";
1.40 + scanRes += "CEC version: " + Lib.ToString(iCecVersion) + "\n";
1.41 + scanRes += "power status: " + Lib.ToString(power) + "\n";
1.42 if (!string.IsNullOrEmpty(lang))
1.43 - Console.WriteLine("language: " + lang);
1.44 - Console.WriteLine("");
1.45 + scanRes += "language: " + lang + "\n";
1.46 + scanRes += "===================" + "\n";
1.47 }
1.48 +
1.49 + Console.Write(scanRes);
1.50 }
1.51
1.52 public void ListAdapters()