Пример #1
0
        private void ButtonClickAddNew(object sender, RoutedEventArgs e)
        {
            if (checkboxNewCategory.IsChecked != null)
            {
                string inputCategory;
                if ((bool)checkboxNewCategory.IsChecked)
                {
                    inputCategory = inputNewCategory.Text;
                    comboBoxCategory.Items.Add(inputCategory);
                    comboBoxCategoryModify.Items.Add(inputCategory);
                }
                else
                {
                    inputCategory = comboBoxCategory.SelectedItem.ToString();
                }
                MyDictionary.AddWord(inputName.Text, inputDescription.Text, inputCategory, path);
            }

            AdministrationWindow window = new AdministrationWindow();

            window.Show();
            this.Close();
        }