Exemple #1
0
 // Prim's Algorithm.
 private void toolStripRightSaveMinimumSpanTree_Click(object sender, EventArgs e)
 {
     if (ListBoxImport.SelectedIndex != -1)
     {
         graphAlObj.GetMST(ListBoxImport.SelectedItem.ToString());
         ListBoxResults.Items.Add("MST: " + ListBoxImport.SelectedItem);
     }
     else
     {
         MessageBox.Show("You have not selected a value from the list.", "Caution", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }