mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-03-03 11:37:01 +00:00
网络
This commit is contained in:
@@ -78,8 +78,16 @@ namespace CMLeonOS
|
||||
ShowError("Network device is not ready");
|
||||
}
|
||||
dhcp.SendDiscoverPacket();
|
||||
|
||||
IPAddress = NetworkConfiguration.CurrentAddress.ToString();
|
||||
Console.WriteLine($"Local IP: {IPAddress}");
|
||||
|
||||
string gateway = NetworkConfigManager.Instance.GetGateway();
|
||||
Console.WriteLine($"Gateway: {gateway}");
|
||||
|
||||
string dns = NetworkConfigManager.Instance.GetDNS();
|
||||
Console.WriteLine($"DNS Server: {dns}");
|
||||
|
||||
ShowSuccess("Network started");
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user