public Form1() { InitializeComponent(); _tcpClient = new SVSTcpClient(); _tcpClient.OnConnected += OnConnected; _tcpClient.OnDisconnected += OnDisconnected; _tcpClient.OnRxData += OnRxData; _tcpServer = new TcpServer(); _tcpServer.Port = 2100; _tcpServer.Open(); _tcpServer.OnDataAvailable += _tcpServer_OnDataAvailable; _tcpServer.OnConnect += _tcpServer_OnConnect; _tcpServer.OnError += _tcpServer_OnError; svsPayload = new byte[11]; ConnectLed.State = LBLed.LedState.Off; ConnectLed.Show(); Address.SetAddressBytes(new byte[]{192,168,1,113}); IpPort.Text = "80"; comboType.SelectedIndex = 0; comboCommand.SelectedIndex = 0; comboParameters.SelectedIndex = 0; selectedCamera.Text = "0"; cmdMutex = new Mutex(); textTurretAngle.Text = "0"; comboHatches.SelectedIndex = 0; comboBattleShort.SelectedIndex = 0; }
public Form1() { InitializeComponent(); _tcpClient = new SVSTcpClient(); _tcpClient.OnConnected += OnConnected; _tcpClient.OnDisconnected += OnDisconnected; _tcpClient.OnRxData += OnRxData; _tcpServer = new TcpServer(); _tcpServer.Port = 2100; _tcpServer.Open(); _tcpServer.OnDataAvailable += _tcpServer_OnDataAvailable; _tcpServer.OnConnect += _tcpServer_OnConnect; _tcpServer.OnError += _tcpServer_OnError; svsPayload = new byte[11]; ConnectLed.State = LBLed.LedState.Off; ConnectLed.Show(); Address.SetAddressBytes(new byte[] { 192, 168, 1, 113 }); IpPort.Text = "80"; comboType.SelectedIndex = 0; comboCommand.SelectedIndex = 0; comboParameters.SelectedIndex = 0; selectedCamera.Text = "0"; cmdMutex = new Mutex(); textTurretAngle.Text = "0"; comboHatches.SelectedIndex = 0; comboBattleShort.SelectedIndex = 0; }