private void getPathToolStripMenuItem_Click(object sender, EventArgs e)
{
int s = int.Parse(InputBox.Prompt("Path test", "Source"));
int d = int.Parse(InputBox.Prompt("Path test", "Dest"));
List<int> res = Pathfinder.BFS(s, d);
if (res == null)
{
MessageBox.Show("Path does not exist");
return;
}
StringBuilder sb = new StringBuilder();
foreach (int i in res)
{
sb.AppendFormat("{0} ", i);
}
if (MessageBox.Show(
string.Format("Do you want to copy to clipboard?\n\n{0}",
sb), "Path test", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Clipboard.SetText(sb.ToString());
}
}