Moved WanIp

This commit is contained in:
MaxXor 2015-08-18 07:33:35 +02:00
parent 5f84b24ed2
commit d1dc6a64d9
3 changed files with 7 additions and 6 deletions

View File

@ -383,7 +383,7 @@ namespace xClient.Core.Commands
"LAN IP Address", "LAN IP Address",
SystemCore.GetLanIp(), SystemCore.GetLanIp(),
"WAN IP Address", "WAN IP Address",
SystemCore.WanIp, GeoLocationHelper.GeoInfo.ip,
"Antivirus", "Antivirus",
SystemCore.GetAntivirus(), SystemCore.GetAntivirus(),
"Firewall", "Firewall",

View File

@ -76,6 +76,8 @@ namespace xClient.Core.Helper
private static void TryLocate() private static void TryLocate()
{ {
LocationCompleted = false;
try try
{ {
DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(GeoInformation)); DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(GeoInformation));
@ -100,7 +102,7 @@ namespace xClient.Core.Helper
} }
} }
} }
SystemCore.WanIp = GeoInfo.ip;
LastLocated = DateTime.UtcNow; LastLocated = DateTime.UtcNow;
LocationCompleted = true; LocationCompleted = true;
} }
@ -156,7 +158,7 @@ namespace xClient.Core.Helper
} }
} }
} }
SystemCore.WanIp = GeoInfo.ip;
LastLocated = DateTime.UtcNow; LastLocated = DateTime.UtcNow;
LocationCompleted = true; LocationCompleted = true;
} }
@ -169,7 +171,7 @@ namespace xClient.Core.Helper
LocationCompleted = false; LocationCompleted = false;
} }
if (string.IsNullOrEmpty(SystemCore.WanIp)) if (string.IsNullOrEmpty(GeoInfo.ip))
TryGetWanIp(); TryGetWanIp();
} }
@ -199,7 +201,7 @@ namespace xClient.Core.Helper
{ {
} }
SystemCore.WanIp = wanIp; GeoInfo.ip = wanIp;
} }
} }

View File

@ -42,7 +42,6 @@ namespace xClient.Core
public static string OperatingSystem { get; set; } public static string OperatingSystem { get; set; }
public static string MyPath { get; set; } public static string MyPath { get; set; }
public static string InstallPath { get; set; } public static string InstallPath { get; set; }
public static string WanIp { get; set; }
public static string AccountType { get; set; } public static string AccountType { get; set; }
public static string GetOperatingSystem() public static string GetOperatingSystem()