private void WaitSyncClick(object sender, RoutedEventArgs e)
{
try
{
InitSyncWithButton.IsEnabled = false;
WaitSyncFromButton.IsEnabled = false;
var peerInfo = new PeerInfo
{
ExternalEndPoint = new IPEndPoint(IPAddress.Parse(Destination.Text), Convert.ToInt32(DestinationPort.Text))
};
_socket.WaitForSync(peerInfo, "test");
EnableClientServerButtons();
Status.Text = Destination.Text + ":" + DestinationPort.Text + " synced with me";
}
catch (Exception ex)
{
Dispatcher.Invoke(new Action(() => ErrorBlock.Text = ex.Message + "\n" + ex.StackTrace));
}
}