private void updateWordButton_Click(object sender, EventArgs e)
        {
            if (selectedWord != null)
            {
                CreateOrUpdateDictionaryWordForm createOrUpdateDictionaryWordForm = new CreateOrUpdateDictionaryWordForm(selectedWord, selectedDascription, dictionary);
                if (createOrUpdateDictionaryWordForm.ShowDialog() == DialogResult.OK)
                {
                    UpdateUi();
                }

                if (search)
                {
                    searchButton_Click(sender, e);
                }
            }
            else
            {
                MessageBox.Show(
                    "Вы не выбрали понятие",
                    "Ошибка", MessageBoxButtons.OK);
            }
        }
 private void newWordButton_Click(object sender, EventArgs e)
 {
     CreateOrUpdateDictionaryWordForm createOrUpdateDictionaryWordForm = new CreateOrUpdateDictionaryWordForm(dictionary);
     if (createOrUpdateDictionaryWordForm.ShowDialog() == DialogResult.OK)
     {
         dictionary.Sort(new DictionaryWordComparator(sortDirection, sortBy));
         UpdateUi();
         if (search)
         {
             searchButton_Click(sender, e);
         }
     }
 }