예제 #1
0
        private void serialPortsMenuItem_Click(object sender, RoutedEventArgs e)
        {
            var ports = Informator.GetAllSerialPorts();

            var info = "Actual serial ports:\r";

            foreach (var portName in ports)
            {
                info += string.Format(" - {0}\r", portName);
            }

            ShowMessage(info);
        }
예제 #2
0
        private void myIPMenuItem_Click(object sender, RoutedEventArgs e)
        {
            string message = "";

            var ips = Informator.GetAllLocalIPv4(NetworkInterfaceType.Ethernet);

            AddIpsToMessage("Ethernet IPs:", ips, ref message);

            ips = Informator.GetAllLocalIPv4(NetworkInterfaceType.Wireless80211);
            AddIpsToMessage("Wireless IPs:", ips, ref message);

            ShowMessage(message);
            logTextBox.ScrollToEnd();
        }