Esempio n. 1
0
        private void ButtonClickAdmin(object sender, RoutedEventArgs e)
        {
            AdministrationWindow window = new AdministrationWindow();

            window.Show();
            this.Close();
        }
Esempio n. 2
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();
        }
Esempio n. 3
0
        private void ButtonClickUpdate(object sender, RoutedEventArgs e)
        {
            if (checkboxNewCategoryModify.IsChecked != null)
            {
                string inputCategoryModify;
                if ((bool)checkboxNewCategoryModify.IsChecked)
                {
                    inputCategoryModify = inputNewCategoryModify.Text;
                    comboBoxCategory.Items.Add(newCategory);
                    comboBoxCategoryModify.Items.Add(newCategory);
                }
                else
                {
                    inputCategoryModify = comboBoxCategoryModify.Text;
                }
                MyDictionary.UpdateWord(((Word)WordsList.SelectedItem).Name, inputNameModify.Text, inputDescriptionModify.Text, inputCategoryModify);
            }

            AdministrationWindow window = new AdministrationWindow();

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