private void SearchButton_Click(object sender, RoutedEventArgs e) { try { sa = this.SearchAlgorithmComboBox.SelectedIndex == 0 ? (SearchAlgorithm) new BidirectionalSearch() : new GreedySearch(); sa.searchDidFinishedWithData = SearchDidFinishedWithData; sa.AsynchronousSearch(this.Graph, new Vertex(rootVertexChkbx.Text), new Vertex(goalVertexChkbx.Text)); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void SearchButton_Click(object sender, RoutedEventArgs e) { try { sa = this.SearchAlgorithmComboBox.SelectedIndex == 0 ? (SearchAlgorithm) new BidirectionalSearch() : new GreedySearch(); sa.searchDidFinishedWithData = SearchDidFinishedWithData; sa.AsynchronousSearch(this.Graph, new Vertex(rootVertexChkbx.Text), new Vertex(goalVertexChkbx.Text)); } catch (Exception ex) { MessageBox.Show(ex.Message); } }