public CMainWindow() { InitializeComponent(); try { RichTextBox1.Rtf = Properties.Resources.BlockFreiWarnung; } catch { } // When the application window is created, we create our new connection class as well. MyTCPConnection = new ZusiTcpClientConnection("Zusi TCP Demo 1", ClientPriority.Low, "commandset.xml"); MyTCPConnection.StringReceived += TCPConnection_StringReceived; MyTCPConnection.FloatReceived += TCPConnection_FloatReceived; MyTCPConnection.DateTimeReceived += TCPConnection_DateTimeReceived; MyTCPConnection.PZBReceived += TCPConnection_PZBReceived; MyTCPConnection.BoolReceived += TCPConnection_BoolReceived; MyTCPConnection.IntReceived += TCPConnection_IntReceived; MyTCPConnection.DoorsReceived += TCPConnection_DoorsReceived; MyTCPConnection.BrakeConfigReceived += TCPConnection_BrakeConfigReceived; MyTCPConnection.ErrorReceived += TCPConnection_ErrorReceived; // We need to tell our connection object what measures to request from Zusi. // You may either use Zusi's native ID code or plain text as listed in the server's commandset.xml MyTCPConnection.RequestData("Geschwindigkeit"); //2561 . . . . . . . . . . . . . => FloatReceived MyTCPConnection.RequestData(2576); // "Fahrstufe" . . . . . . . . . . . . . . . => FloatReceived MyTCPConnection.RequestData(2610); // "Uhrzeit" . . . . . . . . . . . . . . . . => DateTimeReceived MyTCPConnection.RequestData(2637); // "LM Block, bis zu dem die Strecke frei ist" => StringReceived MyTCPConnection.RequestData(2649); // "PZB-System" . . . . . . . . . . . . . . => PZBReceived MyTCPConnection.RequestData(2594); // "LM LZB Ü-System" . . . . . . . . . . . . => BoolReceived }
public CMainWindow() { InitializeComponent(); try { RichTextBox1.Rtf = Properties.Resources.BlockFreiWarnung; } catch { } // When the application window is created, we create our new connection class as well. MyTCPConnection = new ZusiTcpClientConnection("Zusi TCP Demo 1", ClientPriority.Low, "commandset.xml"); MyTCPConnection.StringReceived += TCPConnection_StringReceived; MyTCPConnection.FloatReceived += TCPConnection_FloatReceived; MyTCPConnection.DateTimeReceived += TCPConnection_DateTimeReceived; MyTCPConnection.PZBReceived += TCPConnection_PZBReceived; MyTCPConnection.BoolReceived += TCPConnection_BoolReceived; MyTCPConnection.IntReceived += TCPConnection_IntReceived; MyTCPConnection.DoorsReceived += TCPConnection_DoorsReceived; MyTCPConnection.BrakeConfigReceived += TCPConnection_BrakeConfigReceived; MyTCPConnection.ErrorReceived += TCPConnection_ErrorReceived; // We need to tell our connection object what measures to request from Zusi. // You may either use Zusi's native ID code or plain text as listed in the server's commandset.xml MyTCPConnection.RequestData("Geschwindigkeit"); //2561 . . . . . . . . . . . . . => FloatReceived MyTCPConnection.RequestData(2576); // "Fahrstufe" . . . . . . . . . . . . . . . => FloatReceived MyTCPConnection.RequestData(2610); // "Uhrzeit" . . . . . . . . . . . . . . . . => DateTimeReceived MyTCPConnection.RequestData(2637); // "LM Block, bis zu dem die Strecke frei ist" => StringReceived MyTCPConnection.RequestData(2649); // "PZB-System" . . . . . . . . . . . . . . => PZBReceived MyTCPConnection.RequestData(2594); // "LM LZB Ü-System" . . . . . . . . . . . . => BoolReceived }