void helper_QueryExternalIPAsync_Completed(object sender, Network.IPHelper.GetExternalIPEventArgs e) { WAN_address = Settings.Default.LastPublicIP; WAN_port = Settings.Default.Port.ToString(); Complete_Init(); }
void ipHelper_QueryExternalIPAsync_Completed(object sender, Network.IPHelper.GetExternalIPEventArgs e) { if (e.HasChanged) { Functions.WriteLineToLogFile("DNSHelper: External IP address changed..."); // Update DynDNS DynDnsUpdateResult result = DynDnsUpdateResult.LocalError; try { result = NotifyDynDNS(e.IP); Functions.WriteLineToLogFile("DNSHelper: Notify Dyndns result: " + result.ToString()); } catch (Exception ex) { Functions.WriteLineToLogFile("DNSHelper: Could not notify DynDNS: "); Functions.WriteExceptionToLogFile(ex); } } else { if (Settings.Default.DebugAdvanced) { Functions.WriteLineToLogFile("DNSHelper: External IP address has NOT changed."); } } }