Exemplo n.º 1
0
        public void DisplayActiveNodesInfo()
        {
            var wiFiToString = IsWifi ? $"{SignalQuality.ToString().PadLeft(3)}%" : "";
            var toString     = $"{HostName.Trim().PadRight(20, ' ').Substring(0, 20)}, " +
                               $"{IpAddress.Trim().PadRight(15)}, {MacAddress}, {ConnectionsCount.ToString().PadLeft(3)}, {wiFiToString}";

            Console.WriteLine(toString);
        }
Exemplo n.º 2
0
        public void DisplayGeneralInfo()
        {
            var wiFiToString = IsWifi ? $"{SignalQuality.ToString().PadLeft(3)}%" : "";
            var toString     = $"{HostName.Trim().PadRight(20, ' ').Substring(0, 20)}, " +
                               $"{IpAddress.Trim().PadRight(15)}, {MacAddress}, {ConnectionsCount.ToString().PadLeft(3)}, {wiFiToString}";
            var originalFontColor = Console.ForegroundColor;
            var fontColor         = IsActive ? ConsoleColor.White : ConsoleColor.DarkGray;

            Console.ForegroundColor = fontColor;
            Console.WriteLine(toString);
            Console.ForegroundColor = originalFontColor;
        }