Beispiel #1
0
        private void addCorpus_Click(object sender, RoutedEventArgs e)
        {
            var form = new ChangeInfoForm("Название корпуса:", "Добавить");

            if (form.ShowDialog() == true)
            {
                corpusManager.AddCorpus(form.TextInfo);
                UpdateCorpus?.Invoke();
            }
        }
Beispiel #2
0
        private void editCorpus_Click(object sender, RoutedEventArgs e)
        {
            var corpus = (Corpus)listCorpora.SelectedItem;
            var form   = new ChangeInfoForm("Название корпуса:", "Изменить");

            if (form.ShowDialog() == true)
            {
                corpusManager.EditCorpus(corpus, form.TextInfo);
                UpdateCorpus?.Invoke();
            }
        }
Beispiel #3
0
        private void editRule_Click(object sender, RoutedEventArgs e)
        {
            var rule = (Rule)listRules.SelectedItem;

            var form = new ChangeInfoForm("Название правила:", "Изменить");

            if (form.ShowDialog() == true)
            {
                ruleManager.RenameRule(rule, form.TextInfo);
            }
            UpdateRule?.Invoke();
        }
Beispiel #4
0
        private void editFile_Click(object sender, RoutedEventArgs e)
        {
            var corpus = (ICorpora)listCorpora.SelectedItem;
            var file   = (ICorpora)listFiles.SelectedItem;

            var form = new ChangeInfoForm("Название файла", "Изменить");

            if (form.ShowDialog() == true)
            {
                corpusManager.EditFile(corpus, file, form.TextInfo);
                UpdateFile?.Invoke();
            }
        }