private static void Connect() { var neighbors = robotAgent.GetConnectedAgentFromBC(); Neighbors(); Console.Write("Please input the index of the client you want to connect: "); var input = Console.ReadLine(); int index = int.Parse(input); robotAgent.AddTarget(neighbors[index]); }
private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e) { if (listBox1.SelectedItem == null) { return; } var select = listBox1.SelectedItem as string; if (select.Length < 5) { return; } if (robotAgent.Active) { robotAgent.AddTarget(select); } }