public override void StartServer() { if (CanStartServer) { _tcpServer.Start(_serverPort); CanStartServer = false; } }
private void BtnStartServer_Click(object sender, RoutedEventArgs e) { try { _tcpServer.Start(9999); btnStartServer.IsEnabled = false; } catch (Exception ex) { MessageBox.Show(ex.Message); } }