private void button1_Click(object sender, EventArgs e) { //alpha if (!string.IsNullOrEmpty(textBox1.Text) && !Seqma.Contains(char.Parse(textBox1.Text))) { listBox1.Items.Add(textBox1.Text); Seqma.Add(char.Parse(textBox1.Text)); textBox1.Text = ""; } }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { if (listBox1.SelectedIndex >= 0) { try { Seqma.Remove(Convert.ToChar(listBox1.SelectedItem.ToString())); listBox1.Items.RemoveAt(listBox1.SelectedIndex); } catch (Exception exception) { ConsoleWriter.Failure(exception.Message); } } }