private void button_Click(object sender, RoutedEventArgs e) { //call the service and calculate the shortest path and display it GraphServiceClient client = new GraphServiceClient(); var start = Convert.ToInt32(cbFromNode.SelectedValue); var finish = Convert.ToInt32(cbToNode.SelectedValue); List<int> list = client.ShortestPath(start, finish , vertices); List<string> path = new List<string>(); foreach (var i in list) { path.Add(nodeList[i]); } txtPath.Text = string.Join(" -> ", path); }
private void button_Click(object sender, RoutedEventArgs e) { //call the service and calculate the shortest path and display it GraphServiceClient client = new GraphServiceClient(); var start = Convert.ToInt32(cbFromNode.SelectedValue); var finish = Convert.ToInt32(cbToNode.SelectedValue); List <int> list = client.ShortestPath(start, finish, vertices); List <string> path = new List <string>(); foreach (var i in list) { path.Add(nodeList[i]); } txtPath.Text = string.Join(" -> ", path); }