/// <summary>
        /// The selected analysis algorithm changed.
        /// </summary>
        private async void OnAlgorithmChanged(object sender, RoutedEventArgs e)
        {
            CurrentConfig = ((Algorithm)algorithmComboBox.SelectedItem).Configuration;

            // if the algorithm doesn't support to chose between directed and undirected edges
            // set the combobox to the only mode the algorithm supports
            if (!CurrentConfig.SupportsDirectedAndUndirected)
            {
                directionComboBox.SelectedIndex = CurrentConfig.Directed ? 1 : 0;
            }
            directed = directionComboBox.SelectedIndex == 1;

            ResetStyles();
            UpdateGraphInformation();

            if (!preventLayout)
            {
                await RunLayout(false, false, true);
            }

            preventLayout = false;
        }
 public Algorithm(string displayName, AlgorithmConfiguration configuration)
 {
     DisplayName   = displayName;
     Configuration = configuration;
 }