//Кнопка "Сохранить" private void button5_Click(object sender, EventArgs e) { germanWord = textBox1.Text; russianWord = textBox2.Text; pluralForm = textBox3.Text; if (comboBox1.SelectedItem != null && isArticle == true) //если есть артикль { art = (article)comboBox1.SelectedItem; } else { art = article.none; } part = (partOfSpeech)comboBox2.SelectedItem; Word w = new Word(germanWord, russianWord, pluralForm, art, part); (this.Owner as Form1).dict.Add(w); // (this.Owner as Form1).clearListGermanWords(); (this.Owner as Form1).bs.ResetBindings(false); (this.Owner as Form1).listView1_Reaction(); button5.Visible = false; button6.Visible = false; flowLayoutPanel2.Visible = true; }
public Word(string german, string russian, string plural, article art, partOfSpeech partOfSp) { this.german = german; this.russian.Add(russian); this.plural = plural; this.art = art; this.PartOfSp = partOfSp; ShownAsDailyWord = true; countShownWords++; }