|
@@ -1223,11 +1223,11 @@ public partial class DeviceDetailsWindow : Window
|
|
|
var lines = new List<string> { DisplayLabel };
|
|
var lines = new List<string> { DisplayLabel };
|
|
|
if (IsAddressModified)
|
|
if (IsAddressModified)
|
|
|
{
|
|
{
|
|
|
- lines.Add($"IP:{FormatKeys(_originalAddressKeys)} -> {FormatKeys(GetAddressKeys())}");
|
|
|
|
|
|
|
+ lines.Add($"IP:{FormatAddressSummary(_originalDhcp4, _originalAddressKeys)} -> {FormatAddressSummary(Dhcp4, GetAddressKeys())}");
|
|
|
}
|
|
}
|
|
|
if (IsGatewayModified)
|
|
if (IsGatewayModified)
|
|
|
{
|
|
{
|
|
|
- lines.Add($"网关:{FormatKeys(_originalGatewayKeys)} -> {FormatKeys(GetGatewayKeys())}");
|
|
|
|
|
|
|
+ lines.Add($"网关:{FormatGatewaySummary(_originalDhcp4, _originalGatewayKeys)} -> {FormatGatewaySummary(Dhcp4, GetGatewayKeys())}");
|
|
|
}
|
|
}
|
|
|
if (IsDnsModified)
|
|
if (IsDnsModified)
|
|
|
{
|
|
{
|
|
@@ -1272,6 +1272,16 @@ public partial class DeviceDetailsWindow : Window
|
|
|
return keys.Count == 0 ? "无" : string.Join(", ", keys);
|
|
return keys.Count == 0 ? "无" : string.Join(", ", keys);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private static string FormatAddressSummary(bool dhcp4, IReadOnlyList<string> keys)
|
|
|
|
|
+ {
|
|
|
|
|
+ return dhcp4 ? "自动获取" : FormatKeys(keys);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private static string FormatGatewaySummary(bool dhcp4, IReadOnlyList<string> keys)
|
|
|
|
|
+ {
|
|
|
|
|
+ return dhcp4 ? "自动获取" : FormatKeys(keys);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private void SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = "")
|
|
private void SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = "")
|
|
|
{
|
|
{
|
|
|
if (EqualityComparer<T>.Default.Equals(field, value))
|
|
if (EqualityComparer<T>.Default.Equals(field, value))
|