private void ShowInfo() { if (ServerInfoBox.ActualWidth <= 0) { DoubleAnimation myAnimation = (DoubleAnimation)this.Resources["ShowServerInfo"]; ServerInfoBox.BeginAnimation(Frame.MaxWidthProperty, myAnimation, HandoffBehavior.SnapshotAndReplace); myAnimation.Completed += myAnimation_Completed; } }
public void HeartbeatFailDisconnect() { Disconn_Click(null, null); try { HostInfoLabel.Invoke((MethodInvoker) delegate { HostInfoLabel.Text = "Lost connection to host!"; }); ServerInfoBox.Invoke((MethodInvoker) delegate { ServerInfoBox.Text = "Lost connection to host!"; }); } catch (InvalidOperationException) { } selectedServer = null; connectedHost = null; }