static void Main(string[] args) { Node node = new Node("localhost", 49712, 49702); node.Start(); Console.ReadLine(); node.Close(); }
private void startButton_Click(object sender, RoutedEventArgs e) { try { ServerIP.IsEnabled = false; ServerPort.IsEnabled = false; ListenPort.IsEnabled = false; stopButton.IsEnabled = true; startButton.IsEnabled = false; node = new Node(ServerIP.Text, int.Parse(ServerPort.Text), int.Parse(ListenPort.Text)); node.Start(); } catch { closeButton_Click(null, null); } }