/// <summary> /// Update the IP address information after retrieving it. /// </summary> public void UpdateExternalIpAddressRecord() { IpRecordFileHandler recordHandler = new IpRecordFileHandler(); IpRecord record = recordHandler.GetIpRecord(); string externalIp = getExternalIpAddress(); if (externalIp != null) { IpRecord newRecord = new IpRecord(externalIp, DateTime.Now); if (record == null || !string.Equals(record.IpAddress, externalIp)) { if (recordHandler.WriteIpAddressRecordToFile(newRecord)) { notifyIpAddressChange(newRecord); } // end if } // end if } // end if } // end method