/// <summary> /// prepares the "Language" combobox /// </summary> private void setLanguageCombobox() { List <enumBindTo> lstEnum = new List <enumBindTo>(); Array Names; // Speicherstruktur lstEnum.Clear(); Names = Enum.GetValues(Type.GetType("RegulatedNoise.enLanguage", true)); for (int i = 0; i <= Names.GetUpperBound(0); i++) { enumBindTo cls = new enumBindTo(); cls.EnumValue = (Int32)Names.GetValue(i); cls.EnumString = Names.GetValue(i).ToString(); lstEnum.Add(cls); } cmbLanguage.ValueMember = "EnumValue"; cmbLanguage.DisplayMember = "EnumString"; cmbLanguage.DataSource = lstEnum; }
/// <summary> /// prepares the "Language" combobox /// </summary> private void setLanguageCombobox() { List<enumBindTo> lstEnum = new List<enumBindTo>(); Array Names; // Speicherstruktur lstEnum.Clear(); Names = Enum.GetValues(Type.GetType("RegulatedNoise.enLanguage", true)); for (int i = 0; i <= Names.GetUpperBound(0); i++) { enumBindTo cls = new enumBindTo(); cls.EnumValue = (Int32)Names.GetValue(i); cls.EnumString = Names.GetValue(i).ToString(); lstEnum.Add(cls); } cmbLanguage.ValueMember = "EnumValue"; cmbLanguage.DisplayMember = "EnumString"; cmbLanguage.DataSource = lstEnum; }
/// <summary> /// prepares the "Language" combobox /// </summary> private void setLanguageCombobox() { List<enumBindTo> lstEnum = new List<enumBindTo>(); Array Names; // Speicherstruktur lstEnum.Clear(); Names = Enum.GetValues(Type.GetType("RegulatedNoise.enLanguage", true)); for (int i = 0; i <= Names.GetUpperBound(0); i++) { enumBindTo cls = new enumBindTo(); cls.EnumValue = (Int32)Names.GetValue(i); cls.EnumString = Names.GetValue(i).ToString(); lstEnum.Add(cls); } cmbLanguage.ValueMember = "EnumValue"; cmbLanguage.DisplayMember = "EnumString"; cmbLanguage.DataSource = lstEnum; cmbLanguage.SelectedValue = (Int32)RegulatedNoiseSettings.Language; // now we activate the EventHandler this.cmbLanguage.SelectedIndexChanged += new System.EventHandler(this.cmbLanguage_SelectedIndexChanged); }