private void connectionLost() { if (connectionStatus) { connectionStatus = false; overlayGrid.Visibility = System.Windows.Visibility.Visible; mainTabControl.Visibility = System.Windows.Visibility.Collapsed; client = new IFConnectorClient(); receiver.Stop(); receiver.StartListening(); } }