private void comboBoxStringType_SelectedIndexChanged(object sender, EventArgs e) { if (comboBoxStringType.SelectedIndex >= 0) { string text = comboBoxStringType.Items[comboBoxStringType.SelectedIndex].ToString(); _tree.StringType = PreviewTools.ParseEnum <PreviewBaseShape.StringTypes>(text); } }