public MainWindow() { InitializeComponent(); tbPort.Text = @"23000"; List <string> strIPAdresses = SocketServerEx.GetAllIpAddresses(); foreach (string str in strIPAdresses) { ListBoxItem itm = new ListBoxItem(); itm.Content = str; cbIPAddresses.Items.Add(itm); } }
public MainWindow() { InitializeComponent(); tbPort.Text = @"23000"; List <string> strIPAdresses = SocketServerEx.GetAllIpAddresses(); foreach (string str in strIPAdresses) { ListBoxItem itm = new ListBoxItem(); itm.Content = str; cbIPAddress.Items.Add(itm); } //var localIPs = Dns.GetHostEntry(Dns.GetHostName()); //tbIpAddress.Text = localIPs.AddressList.First(x => x.AddressFamily == AddressFamily.InterNetwork).ToString(); //tbPort.Text = "23"; //btnStartServer.Click += BtnStartServer_Click; //btnClose.Click += BtnClose_Click; //btnSend.Click += BtnSend_Click; }