private void MinmaxCombo_SelectedIndexChanged(object sender, EventArgs e) { try { if (minmaxCombo.SelectedIndex == 0) { WorkArray workArray = new WorkArray(); IList list = this.listBoxFib.Items; string result; result = workArray.MaxValueIntegerToListInt(list).ToString(); this.textBoxValueMax.Text = result; this.listBoxFib.Text = result; } if (minmaxCombo.SelectedIndex == 1) { WorkArray workArray = new WorkArray(); IList list = this.listBoxFib.Items; string result; result = workArray.MinValueIntegerToListInt(list).ToString(); this.textBoxValueMax.Text = result; this.listBoxFib.Text = result; } } catch (Exception) { // throw new InitializationException { Message = "Список пуст" }; } }