You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
using System ;
using System.Diagnostics ;
using System.Net.NetworkInformation ;
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" ) ) ;
string args = txt_moduleIP . Text + " " + txt_hostIP . Text ;
var proc = Process . Start ( viewer_path , args ) ;
}
catch ( Exception ex )
{
Console . WriteLine ( ex . Message ) ;
}
}
}
}