public static void Start()
        {
            int p = int.Parse(port);

            robotAgent.Start(p);
            Console.WriteLine("Local ip:" + robotAgent.localIP);
        }
 private void StartButton(object sender, EventArgs e)
 {
     if (!robotAgent.Active)
     {
         int port = int.Parse(portInput.Text);
         robotAgent.Start(port);
     }
     else
     {
         robotAgent.Close();
         timer2.Stop();
     }
 }