using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Drawing; using System.Linq; using System.Net.NetworkInformation; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Client { public partial class add_module : Form { public add_module() { InitializeComponent(); } private void add_module_Load(object sender, EventArgs e) { foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces()) { if (ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet) { richTextBox1.Text += ni.Name + " => "; foreach (UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses) { if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { richTextBox1.Text+= ip.Address.ToString() + "\n"; } } } } } private void button1_Click(object sender, EventArgs e) { try { string viewer_path = System.IO.Path.GetFullPath(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\..\..\tracking and telemetry\viewer\viewer_exe\viewer.exe")); var proc = System.Diagnostics.Process.Start(viewer_path,txt_moduleIP.Text); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } }