private void MainWindow_Loaded(object sender, RoutedEventArgs e) { try { _testServer = new OCRTestServer(IPAddress.Parse("127.0.0.1"), 2056, "OCRS", "OCRS" ); } catch (Exception ex) { MessageBox.Show("new OCRTestServer() threw exception: " + ex.Message); } try { ReceivedMessage.DataContext = _testServer; ConnectionState.DataContext = _testServer; LogArea.ItemsSource = _testServer.Logger; } catch (Exception ex) { MessageBox.Show("setting DataContexts threw exception: " + ex.Message); } }
private void MainWindow_Loaded (object sender, RoutedEventArgs e) { try { _testServer = new OCRTestServer(IPAddress.Parse("127.0.0.1"), 2056, "OCRS", "OCRS" ); } catch (Exception ex) { MessageBox.Show("new OCRTestServer() threw exception: " + ex.Message); } try { ReceivedMessage.DataContext = _testServer; ConnectionState.DataContext = _testServer; LogArea.ItemsSource = _testServer.Logger; } catch (Exception ex) { MessageBox.Show("setting DataContexts threw exception: " + ex.Message); } }