private void FormLect_Load(object sender, EventArgs e) { SetAllLibraries(); if (_libraries != null) { _currentLibrary = _libraries.First(); } comboBoxLibChoice.DataSource = _libraries; comboBoxLibChoice.DisplayMember = "Name"; comboBoxLibChoice.ValueMember = "Id"; }
/// <summary> /// Choix de la librairie principale. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void comboBoxLibChoice_SelectedIndexChanged(object sender, EventArgs e) { _currentLibrary = _libraries.Find(l => l == comboBoxLibChoice.SelectedItem); }