//generate private void generateIndex_Click(object sender, EventArgs e) { IndexGenerator dialog = new IndexGenerator(currentTrait); dialog.ShowDialog(); refreshIndex(false); currentTrait.indexSelect = currentTrait.index.Count - 1; indexList.SelectedIndex = currentTrait.indexSelect; refreshIndexProperties(false); IO.saved = false; }