private void on_redetectConnectionButton_clicked(object o, EventArgs args)
{
// This button acts as if all other buttons were clicked.
base.Dialog.GdkWindow.Cursor = new Gdk.Cursor(Gdk.CursorType.Watch);
Button button = (Button)o;
button.Sensitive = false;
ThreadPool.QueueUserWorkItem(delegate {
string publicIP = DetectPublicIP();
bool portOpen = TestTCPPort();
Application.Invoke(delegate {
nodePortOpenCheckButton.Active = portOpen;
externalIPv4AddressEntry.Text = publicIP;
button.Sensitive = true;
base.Dialog.GdkWindow.Cursor = new Gdk.Cursor(Gdk.CursorType.LeftPtr);
});
});
}